Marek Kasik
923b726b3b
printers: Provide a scheme to address parser
...
Add a scheme to the address which we test for correctness
by g_network_address_parse_uri(). It does not work without it.
Use "none" scheme if user did not entered one.
Use port number 0 if user did not specify any.
Fixes #679
2019-10-08 18:05:56 +02:00
Robert Ancell
9a2e821fe5
Initialize autoptr values to NULL.
...
These cases were safe, but if the code changed this risked freeing uninitialized
memory.
2019-10-03 10:58:38 +13:00
Felipe Borges
e497ad900d
printers: Check whether URI is valid while searching for printers
...
Fixes #679
2019-10-01 18:56:23 +02:00
Philip Chimento
8c08abd0a3
printers: Give printer name fewer characters in width
...
At the default window size, the printer name label is too wide and
collapses the UI into phone mode. (This is the only panel that shows up
in phone mode by default.) Giving the printer name fewer characters
avoids this.
2019-09-17 07:15:28 +00:00
Philip Chimento
389ee0dfe5
printers: Use CUPS httpConnect2() if available
...
In CUPS 1.7 httpConnect() and httpConnectEncrypt() were deprecated and
replaced with httpConnect2(). This checks if httpConnect2() is available
and if so, replaces the uses of the deprecated functions.
In the CUPS source code, httpConnect() and httpConnectEncrypt() are now
wrappers around httpConnect2(), so we make sure to use the same
arguments as in the CUPS source code so the two code paths are sure to
be identical:
2c030c7a06/cups/http.c (L412)
2c030c7a06/cups/http.c (L477)
2019-09-16 14:09:40 -07:00
Philip Chimento
96137369a5
build: Fix CUPS PPD deprecation warning
...
In https://bugzilla.gnome.org/show_bug.cgi?id=696766 it was decided to
build with _PPD_DEPRECATED defined, to suppress the warnings about the
deprecation of the CUPS PPD API, since there was no full replacement
yet. Unfortunately this didn't make it intact through the port to Meson,
so fix it here.
2019-09-16 14:09:40 -07:00
Robert Ancell
b842a33316
printers: Move callbacks into .ui file
2019-09-10 12:36:39 +12:00
Robert Ancell
015c79411a
printers: Use gtk_stack_set_visible_child instead of names
2019-09-10 12:36:39 +12:00
Robert Ancell
0ca1632890
printers: Drop unused GtkBuilder IDs
2019-09-10 12:36:39 +12:00
Robert Ancell
60ea08cc64
printers: Make the options dialog a full widget using GtkTemplate
2019-09-10 12:36:38 +12:00
Robert Ancell
6d23ac0892
printers: Make .ui filename match the .c filename
2019-09-10 12:33:11 +12:00
Robert Ancell
d4b47bd9ff
printers: Sort variables
2019-09-10 00:18:53 +00:00
Robert Ancell
1b999f36e2
printers: Use gtk_stack_set_visible_child instead of names
2019-09-10 00:18:53 +00:00
Robert Ancell
2c28987e41
printers: Connect signals in swapped form
2019-09-10 00:18:53 +00:00
Robert Ancell
d4adf67549
printers: use gtk_dialog_run
2019-09-10 00:18:53 +00:00
Robert Ancell
a50ce39689
printers: Drop unused class structure
2019-09-10 00:18:53 +00:00
Robert Ancell
3a027bddd0
printers: Set transient window externally to dialog code
2019-09-10 00:18:53 +00:00
Robert Ancell
7f67f6b24f
printers: Don't use gtk_widget_show_all
...
It is removed in GTK+ 4
2019-09-10 00:18:53 +00:00
Robert Ancell
fcde07c770
printers: Remove pp_details_dialog_free, use gtk_widget_destroy
2019-09-10 00:18:53 +00:00
Robert Ancell
fb92795854
printers: Make .ui filename match the .c filename
2019-09-10 00:18:53 +00:00
Robert Ancell
97985a664e
Remove unused GNOMELOCALEDIR defines
2019-09-09 21:45:53 +00:00
Marek Kasik
2b1f76f8ea
printers: Revert previous 2 commits
...
I'm sorry, I pushed to wrong branch. This code is
for testing now and will be proposed later, after
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/merge_requests/108
will be merged.
2019-05-24 19:12:00 +02:00
Marek Kasik
21df888699
printers: Do not notify about job edited by user
...
Let gnome-settings-daemon know about intention to edit a job
so it does not show notification for this action as it
was initiated manually by user.
Do this via g-s-d's DBus method DoNotNotifyJob.
2019-05-24 19:07:55 +02:00
Marek Kasik
86c7505dee
printers: Use correct type for print job id
...
There was pointer to integer used instead of integer for job_id in 2 functions.
This actually works somehow but I'm changing it to proper integer.
2019-05-24 19:07:52 +02:00
Georges Basile Stavracas Neto
75f150d5a2
shell: Add position to cc_shell_embed_widget_in_header()
...
So we can control where the widget should be added to. The
main window only supports left and right positions.
https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Benjamin Berg
bec0f5f588
printers: Add context to Resolution printing option
...
For now, this patch only adds the context to the Resolution option to
disambiguate it from the display panel. This makes the code more complex
though, and will be changed again to add the context to all options
(making the strings identical to the ones in GTK+).
Fixes #394 for the printing panel
2019-02-26 19:42:13 +01:00
Robert Ancell
092f24d62d
printers: Remove unused variables
2019-02-07 11:22:33 +13:00
Robert Ancell
2105e27bde
printers: Fix compile warning
...
Missing GTK_LABEL cast.
2019-02-06 21:28:42 +00:00
Robert Ancell
e9b9966e7d
printers: Use g_autoptr with strings
2019-02-05 10:26:15 +13:00
Robert Ancell
2c6eb2b4fd
printers: Fix GCancellable leak
...
Use the dialog cancellable instead of leaking one each time the PPD is set.
2019-01-30 11:41:07 +13:00
Robert Ancell
e20fd185c8
printers: Use dialog cancellable in async call
...
Otherwise this could crash if the dialog is destroyed before the PPD is set.
2019-01-30 11:41:07 +13:00
Robert Ancell
3dda349aa3
printers: Use a single GCancellable for PpDetailsDialog
...
The cancellable is only used to cancel when the dialog is destroyed, so you can
share it for all calls.
2019-01-30 11:41:07 +13:00
Robert Ancell
47cd15d911
printers: Use self variable to match coding style
2019-01-30 11:33:28 +13:00
Robert Ancell
a3c251301e
printers: Don't initialize variable that defaults to correct value
2019-01-30 11:33:28 +13:00
Robert Ancell
13d72a79a7
printers: Replace ifdefs with #pragma once
2019-01-30 11:33:28 +13:00
Robert Ancell
85604ab4f0
printers: Simplify finalize/dispose methods
...
Use g_clear_* functions to simplify code and ensure values are set to NULL after freeing.
2019-01-30 11:33:28 +13:00
Robert Ancell
4042cb5d33
printers: Replace GObject boilerplace with G_DECLARE_TYPE
2019-01-30 11:33:28 +13:00
Jeremy Bicha
2e250f9dc8
printers: allow driver name to be selected from details dialog
...
The field can be copy-and-pasted elsewhere
and this allows screen readers to read this field.
2019-01-03 16:23:03 -05:00
Jeremy Bicha
61470a2a01
printers: Set mnemonic widget for labels
...
This allows screen readers to read the label for each widget.
2019-01-03 16:21:10 -05:00
Robert Ancell
fb09d9c090
printers: Use g_error_matches where appropriate
2018-12-10 10:13:28 +13:00
Robert Ancell
983857e827
printers: Use g_clear_object with cancellable
...
Safer than g_object_unref.
Also remove explicit initialization to NULL - all values start as NULL.
2018-11-28 11:48:49 +00:00
Robert Ancell
dd9ddf4c9c
printers: Remove goto
...
Not necessary since the use of g_autoptr
2018-11-28 11:48:49 +00:00
Robert Ancell
241121fa20
printers: Use g_autoptr
2018-11-28 11:48:49 +00:00
Robert Ancell
9e0b40b549
printers: Check error parameter is valid
2018-11-28 11:48:49 +00:00
Robert Ancell
bf463f2662
printers: Use consistent GTask return pattern
2018-11-28 11:48:49 +00:00
Robert Ancell
e436cf1f60
printers: Remove unused variable
2018-11-28 11:48:49 +00:00
Robert Ancell
172ab6ef6c
printers: Fix incorrect g_task_run_in_thread reference usage
...
There is a reference held during this call so don't need to
explicitly unref inside the function.
2018-11-28 11:48:49 +00:00
Robert Ancell
4d20e682c2
printers: Remove unnecessary GSDData structure
2018-11-28 11:48:49 +00:00
Robert Ancell
323fee6d3b
printers: Replace deprecated GSimpleAsyncResult with GTask
2018-11-28 11:48:49 +00:00
Philip Withnall
c07b357311
panels: Add X-GNOME-UsesNotifications to several desktop files
...
gnome-settings-daemon emits notifications related to these four control
panels. If we add X-GNOME-UsesNotifications to their desktop files, the
user will be able to control the notifications.
https://wiki.gnome.org/Initiatives/GnomeGoals/NotificationSource
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-01 17:22:21 +00:00