AdwBanner is a new adaptive widget that replaces GtkInfoBar.
AdwBanner adapts better to mobile sizes and has an API
that fits with how we use infobars.
This commit changes CcPermissionInfobar to use an AdwBanner
internally instead of a GtkInfoBar. It also re-implements
part of GtkLockButton, as AdwBanner does not support adding
arbitrary widgets.
The current usage of CUPS IPP API does not work for temporary queues, because the g-c-c sends the request without creating a local printer first, so the request is sent to non-existing printer.
If you use the destination from cupsGetNamedDest() for printing, CUPS library does the local printer creation internally and printing test page will work even for temporary queues.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2148481
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.
For when we show the "No Printers Found" page.
This has no impact but allow us to be consistent with the empty-state
styling as it changes and evolves in AdwStatusPage.
Fixes#2197
The empty state of the printer panel is not consistent with other panels
of the GNOME Settings app.
There are two empty states, either the system cannot connect to the
printer service or there are no printers registered yet.
To fix this issue, AdwStatusPage has been introduced for both cases,
which takes care of the layout and reduces the amount of code needed to
create these two pages. With this change, both empty states of the
printer panel have the same look as other panels in their empty state.
The `X-GNOME-Bugzilla-*` entries were for use by bug-buddy, a GNOME 2
technology that's been gone for over a decade. These entries are
obsolete and can be removed from all desktop files.
The `X-GNOME-Settings-Panel` entry is also obsolete as far as I can
tell and only these panels had it in their desktop file: notifications,
sharing, sound and user-accounts. These entries can also be removed.
After removing the `X-GNOME-Bugzilla-*` entries, the desktop files have
no more variables in them. The meson `configure_file` step is therefor
pointless—there are no variables to configure. As such the
`*.desktop.in.in` files are renamed to `*.desktop.in` to reflect this
and `meson.build` files are modified to remove `configure_file` step.
Change the add printer button text, from the empty state section, to "Add Printer..."
(previously was "Add a Printer...") so it gets consistent with the add printer button
from the headerbar (in Printers panel) and with other buttons in Settings that end with
ellipsis, such as the "Add Picture..." from the Appearance panel, which doesn't have the
article also.
Check whether the currently removed printer was last. Also
check whether there are other printer being removed by CUPS
right now (their amount is still part of self->num_dests).
Do this check also in actualize_printers_list_cb() to catch
corner cases from timing point of view. This will handle them
with some delay if they show up.
When undone, just check whether the number of printers is higher
than 0 and show the printers-list page.
Fixes#2023
This is detectable with -Wincompatible-pointer-types and warns with
[1/7] Compiling C object panels/printers/libprinters.a.p/cc-printers-panel.c.o
../panels/printers/cc-printers-panel.c: In function ‘cc_printers_panel_init’:
../panels/printers/cc-printers-panel.c:1228:59: warning: passing argument 3 of ‘gtk_builder_add_objects_from_resource’ from incompatible pointer type [-Wincompatible-pointer-types]
1228 | objects, &error);
| ^~~~~~~
| |
| gchar ** {aka char **}
In file included from /usr/include/gtk-4.0/gtk/gtkbuildable.h:26,
from /usr/include/gtk-4.0/gtk/gtk.h:56,
from /usr/local/include/libadwaita-1/adwaita.h:9,
from ../shell/cc-panel.h:25,
from ../panels/printers/cc-printers-panel.h:21,
from ../panels/printers/cc-printers-panel.c:23:
/usr/include/gtk-4.0/gtk/gtkbuilder.h:122:66: note: expected ‘const char **’ but argument is of type ‘gchar **’ {aka ‘char **’}
122 | const char **object_ids,
| ~~~~~~~~~~~~~~~^~~~~~~~~~
[7/7] Linking target tests/network/test-wifi-panel-text
As described in #1976, the printers panel shows two Add Printer buttons when the
printers list is empty. Adds a check that sets the Add Printer button in the toolbar
to be invisible when the empty-state page is shown (and thus the other Add Printer
button is visible), creating a less confusing UI.
Closes#1976
Currently when you rename a printer through the print details page
there is no indication of errors produced by CUPS, most notable
about any invalid characters used. Adds a function to check
for invalid characters and shows a warning to users. No
attempt will be made to rename the printer if it contains an
invalid character. Users are currently shown an elevation prompt
before this fix
https://www.cups.org/doc/man-lpstat.html
Partially addresses #1008
Add a label immediately below the printer name entry in printer
details that warns the user if the printer name contains
invalid characters (or other errors) per the CUPS spec.
PpPpdOptionWidget and PpIppOptionWidget both use combo boxes for
certain types of selections. With GTK4, combo boxes no longer
support scrolling[0], which in turn causes problems setting some
things in the PpOptionsDialog[1].
This replaces instances of GtkComboBox with GtkDropDown which do
support scrolling. This change was applied to both PpIppOptionWidget
and PpPpdOptionWidget as both are used in PpOptions dialog.
Since the configuration values passed to CUPS can no longer be stored
in a GtkTreeModel alongside the displayed values, some logic changes
to update_widget_real in PpPpdOptionWidget to maintain the reference
to the ppd_option_t so the selected index can be mapped to the
configuration value.
[0] - https://gitlab.gnome.org/GNOME/gtk/-/issues/3674
[1] - https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1704
Destroy PpPPDSelectionDialog in dispose method of PpNewPrinterDialog
as its transient-for property was unset by previous commit
and the dialog is not destroyed automatically now.
Unset transient-for for PpPPDSelectionDialog in its responce callback
since due some reason its parent PpNewPrinterDialog is destroyed first
and once the PpPPDSelectionDialog is being destroyed it tries to
unset the transient-for but unsuccesfully resulting in warnings like:
"instance with invalid (NULL) class pointer"
"g_signal_handlers_disconnect_matched: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed"
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
This should significantly simplify these panels, by not forcing
them to override GObject.constructed all the time. Most panels
were quite straightfoward.
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.
[...]
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.
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.