Commit graph

37 commits

Author SHA1 Message Date
Alice Mikhaylenko
8473c78b22 printers: Port dialogs to AdwWindow and AdwToolbarView 2023-08-25 08:00:43 +00:00
Maksym Hazevych
e00f773b2f Remove unnecessary visibility change 2023-03-29 14:26:55 +13:00
Maksym Hazevych
d831e5cb48 Replace all occurrences of 'gtk_widget_show'
Replace all occurrences of 'gtk_widget_show(smth)' with
'gtk_widget_set_visible(smth, TRUE)'.
2023-03-29 14:26:55 +13:00
Felipe Borges
294156c0f9 Drop most uses of deprecated gtk_style_context_add/remove_class
GtkStyleContext will be deprecated in gtk 4.10.
https://docs.gtk.org/gtk4/class.StyleContext.html

This preserves code blocks where additional GtkStyleContext operations
were used, such as gtk_style_context_save/restore.
2023-01-05 18:55:51 +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
Robert Ancell
98fd38278a printers: Don't pass ownership in get_ipp_attributes_async callback 2021-02-15 10:34:32 +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
703d833e2f printers: Don't pass PpPrinter references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:05 +00:00
Robert Ancell
7c1f84b4d3 printers: Don't pass PpMaintenanceCommand references around
An internal GTask will hold a reference to it for the duration of the async call.
2020-09-22 21:23:05 +00:00
Robert Ancell
6db24acc49 Replace whitelist/blacklist terms
For rationale see here:
https://chromium.googlesource.com/chromium/src/+/master/styleguide/inclusive_code.md#racially-neutral
2020-07-21 10:41:55 +12:00
Robert Ancell
b994237acd printers: Remove unused class members 2020-07-02 16:20:25 +00:00
Robert Ancell
287aee4371 printers: Don't initialize classes members to NULL/0/FALSE
These are the default values.
2020-07-02 16:20:25 +00: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
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
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
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
47cd15d911 printers: Use self variable to match coding style 2019-01-30 11:33:28 +13: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
877445cbaf printers: Use g_autoptr for GError handling 2018-09-17 15:19:21 +00:00
Robert Ancell
55d47bc83e printers: Plug memory leaks 2018-06-25 22:53:10 +00:00
Felipe Borges
ee42831fcd printers: Add print "Test Page" button to Options Dialog
https://bugzilla.gnome.org/show_bug.cgi?id=779708
2017-06-14 10:45:25 +02:00
Michael Catanzaro
50160be2c6 printers: Move options dialog spinner out of the action area
For an infinitesimal amount of time after opening the options dialog, a
spinner is displayed at the start of the action area while the dialog
loads asynchronously. Display the spinner in the center of the dialog
instead, using a GtkStack to switch between spinner mode and normal
mode. Test by removing the calls to printer_get_ppd_async(),
get_named_dest_async(), and get_ipp_attributes_async() from the bottom
of populate_options().

Why? (1) It looks better this way. (2) Need to stop using the action
area in order to switch to a header bar.

https://bugzilla.gnome.org/show_bug.cgi?id=755713

https://bugzilla.gnome.org/show_bug.cgi?id=779708
2017-05-29 19:25:51 +02:00
Felipe Borges
909eb2ac31 printers: Make the dialogs independent of the PpPrinterEntry lifetime
https://bugzilla.gnome.org/show_bug.cgi?id=779846
2017-03-13 09:20:23 +01:00
Marek Kasik
66eb1c9164 printers: Don't use methods of deprecated GtkMisc
Use GtkWidget's methods for settings of halign, valign and margin-start
instead of GtkMisc's methods for settings of xalign, yalign and xpad.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
15b5045ed3 printers: Don't update alignment padding for dialogs
The update of alignment padding is not needed since gtk+ 3.14.
It was needed for proper alignment of widgets of action area
with those from content area.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Yosef Or Boczko
84c792c7f4 printers: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:28:28 +02:00
Marek Kasik
8e1bfc521e printers: Replace deprecated function
Use gtk_container_add() instead of deprecated
gtk_scrolled_window_add_with_viewport().

https://bugzilla.gnome.org/show_bug.cgi?id=696766
2013-05-15 13:11:27 +02:00
Marek Kasik
39071d5b56 printers: Show printer name only in the title of options dialog
The name of the printer is sufficient information to describe the contents of
the dialog. "Options" isn't necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=690424
2013-02-15 18:33:46 +01:00
Marek Kasik
d33f14b70a printers: Move dialog names to their titles
https://bugzilla.gnome.org/show_bug.cgi?id=690447
2013-02-15 18:33:38 +01:00
Cosimo Cecchi
3064425711 printers: use a GResource for GtkBuilder UI definition
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:15 +01:00
Marek Kasik
1eb906515f printers: Use GPLv2+ for files created by Marek Kasik
This commit is related to the bug #683420.
2012-09-11 15:02:26 +02:00
Marek Kasik
6f8b9e8825 printers: Allow printer_get_ppd_async() to get PPD from remote host
Adds host_name and port parameters to printer_get_ppd_async(). If host_name
is NULL then it gets the PPD from local CUPS server. (#683229)
2012-09-04 14:09:05 +02:00
Marek Kasik
7ae3027b47 printer: Add "Options" dialog
Add Options dialog which allows users to set more options than current dialog.
The dialog reads printer's PPD file and add its options to the dialog together
with some preselected IPP options (#678637).
All operations in the dialog are asynchronous.
During implementation of this, the option for setting allowed users was removed
because this is not suitable for this panel (the option is intended for
administrators).
2012-07-16 15:26:33 +02:00