Commit graph

623 commits

Author SHA1 Message Date
Marek Kasik
8fe87ac6ef printers: Use bold font for title of details dialog
All other dialogs have bold titles, this should too.

Issue #1587
2022-02-11 13:18:15 +01:00
Marek Kasik
2a2d7ec111 printers: Make search entry symetric
Allow search entry of new printer dialog to expand so that it fills
the available area. It does not fill it now so there is more free
space on the right than on the left.

Issue #1587
2022-02-11 13:18:15 +01:00
Marek Kasik
cc75a07a69 printers: Fix blurred icons of printers
Change align of the printers icons to CENTER from FILL so that the icons
are not stretched.

Issue #1587
2022-02-11 13:18:15 +01:00
Sam Hewitt
65b109763b Cleanup private use symbolics
- remove references to deprecated app symbolics
- reduce file size of private-use icons
- update dated icons
2022-02-04 18:12:41 +00:00
Marek Kasik
20adb5632f printers: Remove redundant UI properties
Remove redundant UI properties from PPDSelectionDialog's UI file.
2022-02-04 17:50:04 +01:00
Marek Kasik
613a2d8b5b printers: Fix UI file of PPDSelectionDialog
A regression from the GTK4 port.
2022-02-04 17:15:53 +01:00
Marek Kasik
52fdf0435e printers: Expand PpPrinterEntry when window resizes
A regression from the GTK4 port.
2022-02-04 17:15:53 +01:00
Marek Kasik
e7a1501d13 printers: Do not ellipsize title of details dialog
A regression from the GTK4 port.
2022-02-04 17:15:53 +01:00
Marek Kasik
634d622c7a printers: Show file chooser dialog when selecting PPD
A regression from the GTK4 port.
2022-02-04 17:15:53 +01:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Georges Basile Stavracas Neto
4300a4a290 panels: Use new CcPanel helpers for title widgets
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
2022-01-20 02:23:42 +00:00
Georges Basile Stavracas Neto
0ab20af9ba panels: Switch to CcPanel content
Start porting panels to the new panel format. This commit
temporarily makes panels have two titlebar, which will be
fixed soon.
2022-01-20 02:23:42 +00:00
Jan Beich
37b29c32cb meson: drop unused argument for i18n.merge_file()
Ignored in Meson < 0.60.0, deprecated since 0.60.1 and fatal since 0.61.0.

panels/applications/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/background/meson.build:10:5: ERROR: Function does not take positional arguments.
panels/camera/meson.build:10:5: ERROR: Function does not take positional arguments.
[...]
2022-01-07 17:22:43 +00:00
Georges Basile Stavracas Neto
8141af469c printers: Port to GTK4
Fortunately for us GtkTreeView still operates pretty
much exactly like in GTK3. Other than that, it's a
dense junction of all that we've done so far to port
other panels.
2021-12-14 22:34:21 -03:00
zhuyaliang
51760441b3 printers: Add adjust printer task priority button
Add a new  button to the 'PpJobRow',This button can adjust the priority of tasks in the print queue to the highest
2021-11-10 15:10:20 +00:00
Brandon Nielsen
c3c58aae38 Code cleanup based on feedback. 2021-07-26 16:03:05 +00:00
Brandon Nielsen
a73a095d76 ppd_list is not a copy, don't free it.
Both consumers of PpPPDSelectionDialog (PpNewPrinterDialog,
PpDetailsDialog) free the PPDList they pass to
pp_ppd_selection_dialog_set_ppd_list and they do not pass a copy, so
PpPPDSelectionDialog should not free the pointer on dispose.

This fixes a racy segfault when closing a PpDetailsDialog after PPD
selection (introduced with this series), did not appear with
PpNewPrinterDialog for some reason.
2021-07-26 16:03:05 +00:00
Brandon Nielsen
b19325167d gtk_widget_show over gtk_widget_show_all. 2021-07-26 16:03:05 +00:00
Brandon Nielsen
6223858c5e Formatting cleanup. 2021-07-26 16:03:05 +00:00
Brandon Nielsen
16aa95bdc8 Return a PpNewPrinter instead of PpPrintDevice, use gtk_show_all
pp_new_printer_dialog_get_new_print_device is replaced with
pp_new_printer_dialog_get_new_printer which returns a PpNewPrinter.

gtk_show_all is used instead of gtk_dialog_run for PpNewPrinterDialog
and PpPPDSelectionDialog.

This is in response to feedback:
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/930#note_1202114
2021-07-26 16:03:05 +00:00
Brandon Nielsen
179bda1b64 Make PpNewPrinterDialog a GtkDialog instead of GObject
This is accomplished by moving the calls to pp_printer_add_async
directly to CcPrintersPanel. pp_printer_delete_async calls are already
done directly in the CcPrintersPanel so there is consistency gained by
this implementation in addition to PpNewPrinterDialog actually being a
GtkDialog.

A pp_new_printer_dialog_get_new_print_device method has been added to
PpNewPrinterDialog to allow getting the PpPrintDevice selected by the
user to add. This can be called anytime after a response callback
with a GTK_RESPONSE_OK reponse_id.

PpNewPrinterDialog still does asynchronous operations to populate the
dialog, but the create dialog -> receive signal -> destroy dialog flow
can all be handled like a traditional GtkDialog without additional
callbacks or signalling.
2021-07-26 16:03:05 +00:00
Eric
1fc8b772a4 printers: Make "Add…" button consistent with user accounts panel
The "Add..." toolbar button on the printers panel is currently hidden until the panel is unlocked.
This commit makes the button visible but insensitive when the panel is locked (becoming sensitive when unlocked),
as suggested in #1213. It also changes the text from "Add..." to "Add Printer..."
and updates the subtitle in the infobar to "Unlock to Add Printers and Change Settings."
These changes make the button's UI consistent with the Accounts panel's "Add User..." toolbar button.

Closes #1213
2021-06-09 13:34:01 +00:00
Robert Ancell
2ee5f1422a printers: Ensure PPD copy is always deleted 2021-02-15 10:34:32 +13:00
Robert Ancell
81392210f2 printers: Add note about callback that passed ownership 2021-02-15 10:34:32 +13:00
Robert Ancell
797c36dc0a printers: Improve memory management of backend list 2021-02-15 10:34:32 +13:00
Robert Ancell
5b086c44e8 printers: Don't pass ownership in get_all_ppds_async callback 2021-02-15 10:34:32 +13:00
Robert Ancell
98fd38278a printers: Don't pass ownership in get_ipp_attributes_async callback 2021-02-15 10:34:32 +13:00
Robert Ancell
d970ae48b4 printers: Don't pass ownership in get_ppd_names_async callback 2021-02-15 10:34:32 +13:00
Robert Ancell
0d913f7283 printers: Remove use of goto 2021-02-15 10:34:32 +13:00
Robert Ancell
cede2f5a81 printers: Use g_autoptr for utility functions 2021-02-15 10:34:32 +13:00
Robert Ancell
005b18f2f1 printers: Make helper functions for callback data 2021-02-15 10:34:32 +13:00
Brandon Nielsen
c239521e9d Change PpPPDSelectionDialog to GtkDialog
The dialog is now displayed by calling gtk_dialog_run and
gtk_window_set_transient_for in the window displaying the dialog.
Cleanup is handled using gtk_widget_destroy.

Destructors in the windows using the dialog no longer cleanup the dialog
as it is assumed it will be either cleaned up after the response
callback, or handled by the destroy_with_parent property set on the
dialog itself.
2021-01-08 02:49:32 +00:00
Robert Ancell
6622b39632 printers: Make PpJobRow widget 2020-12-14 09:51:19 +13:00
Robert Ancell
cd070d2e5a printers: Clear up use of gpointer value 2020-12-14 09:51:19 +13:00
Robert Ancell
ae1a37b009 printers: Remove use of gtk_widget_show_all
It is removed in GTK 4.
2020-11-26 16:02:57 +00:00
Robert Ancell
ce23d7e0b1 printers: Ensure objects are destroyed when dialog destroyed 2020-11-24 12:31:21 +13:00
Robert Ancell
2c46436636 printers: Remove redundant variable set to NULL 2020-11-24 12:24:38 +13:00
Robert Ancell
5e2e4a55af printers: Cancel adding printer if PPD dialog is cancelled 2020-11-24 12:23:42 +13:00
Robert Ancell
388e59e66a printers: Fix string leaks in new printer dialog 2020-11-24 12:23:42 +13:00
Robert Ancell
7fb336e17b printers: Make printers panel have a smaller minimum width.
Allow the ink-level to overlap with the buttons.
2020-11-19 23:24:31 +00:00
Robert Ancell
06eb07bbd6 printers: Remove dead PPD dialog code 2020-11-10 14:47:20 +13:00
Robert Ancell
7bbbef5fde printers: Fix autoptr object not being initialized to NULL.
Won't cause a problem in this case but should be done for safety.

Introduced in ad226b420c
2020-11-02 09:25:04 +13:00
Robert Ancell
509beee6dc printers: Fix leak of printer name in callbacks.
printer_set_ppd_async and printer_set_ppd_file_async copy the printer name, but
this isn't freed in any cases that use these callback (the string isn't even
used at all).
2020-10-29 23:10:05 +00:00
Robert Ancell
ad226b420c printers: Use g_autoptr with GThread 2020-10-30 11:42:14 +13:00
Robert Ancell
902f90e5ea printers: Add methods for getting printer name and location
Remove the GObject properties that aren't type safe.
2020-10-29 20:36:48 +00:00
Marek Kasik
c18875c623 printers: Do not cleanup task after getting bus
Use g_steal_pointer() on task in get_bus_cb() in pp-printer.c
to not invalidate a pointer passed to a DBus call.
Cleanup the task in callback of the DBus call.
2020-10-29 20:19:01 +00:00
Robert Ancell
2def271824 printers: Add pp_job_new and associated methods.
The previous code was leaking a string (job title), used an integer pointer
instead of an integer for an id and requited a lot of memory management for a
string array. There was a lot of boilerplate code required for property
management which was not being used much. This is why type safe methods are a
much better idea than GObject properties. :)
2020-10-27 13:03:56 +00:00
Brandon Nielsen
9364deba3e Code cleanup as per HACKING. 2020-09-25 01:59:57 +00:00
Brandon Nielsen
68dca0e748 Consumers clean up the PPD list, not the dialog itself. 2020-09-25 01:59:57 +00:00
Brandon Nielsen
bee87f1b0a Spaces over tabs. 2020-09-25 01:59:57 +00:00