Commit graph

609 commits

Author SHA1 Message Date
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
Robert Ancell
3ed16310a1 printers: Fix printer delete signal passing an extra argument.
The extra argument doesn't seem to be used, but is confusing.
2018-09-17 16:07:48 +00:00
Robert Ancell
877445cbaf printers: Use g_autoptr for GError handling 2018-09-17 15:19:21 +00:00
Robert Ancell
09465579b7 printers: Use const for manufacturer string 2018-08-02 10:02:15 +00:00
Robert Ancell
b4e081d7f9 printers: Fix branch depending on uninitialized variable 2018-07-30 04:07:19 +00:00
Robert Ancell
ed78a6a120 printers: Fix double free / leak due to copy-paste error 2018-07-30 15:31:45 +12:00
Sam Hewitt
e91208eeb5 printers: update pixel_size of icons to avoid aliasing 2018-07-10 18:04:32 -04:00
Sam Hewitt
24174173be common: update pixel_size values to base 16 for icon clarity 2018-07-10 17:52:08 -04:00
Robert Ancell
3f5bc8369b printers: Fix warning about wrong data type 2018-06-26 15:57:20 +12:00
Robert Ancell
55d47bc83e printers: Plug memory leaks 2018-06-25 22:53:10 +00:00
Robert Ancell
a64ef75ad7 Simplify use of GCancellable
g_cancellable_cancell can be called without checking for a NULL value.
Use g_clear_object instead of g_object_unref
2018-06-01 21:03:19 +00:00
Marek Kasik
f3257ce82a printers: Focus search entry in new printer dialog
Focus search entry in the new printer dialog once user starts to type
so he does not need to click on it.

Closes #41
2018-05-10 16:47:10 +00:00
Benjamin Berg
a9d8ec5747 Move printers panel tests into tests folder 2018-04-17 15:26:59 +02:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Benjamin Berg
e1593b3c02 shell: Remove CcEditableEntry, it is not used anywhere 2018-04-17 14:59:31 +02:00
Felipe Borges
8879cd476a printers: Fix crash when panel is closed quickly
Fix a user-after-free while testing the connectivity to a cups
server. This is similar to the fix in commit 1d72a0b.

This is an addition to the changes introduced in commit 2ff5cfd
which allowed the connection testing to be cancellable.

Fixes #51
Fixes https://bugzilla.gnome.org/794632
2018-04-09 13:26:55 +02:00
Georges Basile Stavracas Neto
28ad1d1602 printers: Cache CUPS D-Bus proxy 2018-04-06 22:23:39 -03:00
Marek Kasik
5663a8189c Printers: Fix closing of Jobs dialog
When user presses Esc key on Jobs dialog when there
is a job which needs authentication then the dialog
is not closed. This commit fixes this issue.
2018-03-05 17:02:44 +01:00