Commit graph

632 commits

Author SHA1 Message Date
Sam Hewitt
a5f6efaddb Update and clean up symbolic icon assets
- refresh the symbolic icons to sync some style changes and update the source sheet
- rename assets for the privacy subpanel's symbolic icons
- delete deprecated/unused symbolic icons
- add new icon for system panel
- add new icon for remote desktop so it isn't using displays icons
2024-02-10 16:17:35 +00:00
Automeris naranja
5cd007b7d2 printers: Add padding to the sidebar items from "Printer Options" 2024-02-09 07:22:31 +00:00
Automeris naranja
85729203ff pp-options-dialog: Add .suggested-action style class to "Test Page" button 2024-02-08 10:03:12 +00:00
Automeris naranja
a6a9bdf1f1 pp-options-dialog: Add mnemonic to "Test Page" button 2024-02-08 10:03:12 +00:00
Matthijs Velsink
3a253bc4b1 general: Use g_clear_handle_id to remove GSources
Using `g_clear_handle_id()` in combination with `g_source_remove()` can
save a lot of boiler plate code.

This removes about 110 lines of code for free.
2024-02-06 09:22:07 +00:00
velsinki
996d03f426 printers: Sync string in .c file with .ui file
A period at the end of a string in pp-jobs-dialog.ui was removed in
!2231, but the actual translatable string in pp-jobs-dialog.c was not
modified.

This does that.
2024-02-06 09:08:57 +00:00
Monster
53771ae5cd printers: Remove periods from descriptions 2024-02-05 10:56:59 +00:00
Niels De Graef
fb9cfae3f6 printers-entry: Mark labels with a mnemonic widget
This commit adds the "mnemonic-widget" property to some of the labels in
the `CcPrinterEntry` template. One of the advantages is that this also
automatically adds a "labelled-by" a11y relationship between them.
2024-01-18 11:54:50 +00:00
Marek Kasik
d12db2f1a3 printers: Move ownership of GHashTable to the recipient
Once we call callback passed to the get_ipp_attributes_async()
we should not try to free produced data but keep this to the
caller.

Fixes #2843
2024-01-15 16:46:17 +01:00
Jakub Steiner
758f87b783 data: use outline symbolics
- Use the up-to-date style for symbolics (2px outline). Notifications, Printers and Info/About
  work fine as outlines.
- filled silouehette symbolic are only to be used where a 2px outline is impossible
  to cram to 16x16px canvas.
2023-12-14 13:07:39 +00:00
Automeris naranja
3feeb4c6f0 printer-entry: Add tooltip to the ellipsis button 2023-11-29 10:12:30 +00:00
Automeris naranja
759eccf61b printers: Add tooltip to the search button
"Controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-10-20 10:49:48 +00:00
Alice Mikhaylenko
5436dc024f printers: Make adaptive 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
d0f28e7ab5 printers: Remove an unnecessary margin 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
8132563956 printers: Move search bar above the banner 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
49a0bf2f33 printers: Use a regular clamped boxed list for printers 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
3a94c78aad printers: Port the printer menu to GMenuModel 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
a597ba706d printers: Slightly modernize the entry layout 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
8473c78b22 printers: Port dialogs to AdwWindow and AdwToolbarView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
3e0363b41b printers: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
782698e4b5 printers: Port to GtkWidget template 2023-08-25 08:00:43 +00:00
Tobias Wiese
284ddccf0e printers: Fix size calculation for normalized printer name
The worst-case size of the normalized printer name is twice the
original length (if a space is inserted between each character) plus one
byte for the terminating null byte.

Fixes #2619

Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
2023-08-24 10:15:24 +02:00
Alice Mikhaylenko
232d4e6ff5 printer-entry: Use a card for the printer rows 2023-08-02 12:51:48 +00:00
Automeris naranja
9469c3c674 printers: Add mnemonics to the "Add Printer" buttons 2023-06-27 16:21:37 -03:00
Robert Ancell
ceec631a45 printers: Connect signal handlers in swapped form 2023-06-07 09:12:54 +12:00
sunflowerskater
266c55715a general: Add tooltips to headerbar controls
Acc. HIG, "controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-06-06 13:27:00 +00:00
Pablo Correa Gómez
7f7b65545c all: meson: do not specify resources from gresource files as dependencies
Meson extracts them by itself and add them as dependencies for the target.
It means one less location to keep track of files, and a lot less boilerplate
around the meson files
2023-05-24 08:34:14 +00:00
sunflowerskater
c95dcf2a9a general: Add placeholder text to various search entries
Acc. HIG, "text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2190
2023-04-21 12:40:42 +00:00
Christopher Davis
d25c0e345d general: Use AdwBanner in CcPermissionInfobar
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.
2023-04-11 12:23:16 +00:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
e00f773b2f Remove unnecessary visibility change 2023-03-29 14:26:55 +13:00
Maksym Hazevych
5b988a6943 Replace all occurrences of 'gtk_widget_hide'
Replace all occurrences of 'gtk_widget_hide(smth)' with
'gtk_widget_set_visible(smth, FALSE)'.
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
Zdenek Dohnal
fb07b65cee printers: Use CUPS dest API for printing test page instead CUPS IPP API
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
2023-02-16 15:12:27 +00:00
Marek Kasik
092cef515d printers: Fix deleting of printers when exiting
Call sync method to remove a printer when exiting Printers panel.
The deletion could not pass otherwise.

Fixes #2174
2023-01-16 14:32:01 +00: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
Eric Daigle
2c68c0064a printers: Set search button/entry as sensitive when printers list is empty
Currently, the search function is available when there are no printers. However, it does nothing.

This commit set the search button and entry as sensitive.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2021
2023-01-02 12:29:15 +00:00
Felipe Borges
d36f795dd4 printers: Use AdwStatusPage in the "Add Printer" dialog
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
2022-12-13 14:22:40 +00:00
Hendrik Müller
7e0357cae3 printers: Improved empty state of printer panel
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.
2022-12-01 01:29:10 +00:00
Jake Dane
89443fe550 desktop: Remove obsolete Bugzilla entries
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.
2022-10-20 13:20:09 +00:00
Felipe Borges
12bbd3ea0c printers: Set "use-underline" for Authenticate button in Jobs dialog
The label of the button indicates a mnemonic (_Authenticate).

Fixes #2062
2022-09-19 15:01:05 +02:00
sunflowerskater
53ff717b4d printers: Use the same sentence for "Add Printer" in button and empty-state
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.
2022-08-24 08:46:55 +00:00
Marek Kasik
5ceabcb5c7 printers: Show empty-state after removal of the last printer
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
2022-08-18 17:01:02 +02:00
Felipe Borges
4ea4f41e20 printers: Pass correct argument to gtk_builder_add_objects_from_resource
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
2022-08-18 15:33:38 +02:00
Eric Daigle
a71c3ac3c3 cc-printers-panel: don't show two Add Printer buttons at once
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
2022-08-11 13:08:02 +00:00
Bilal Elmoussaoui
bb86c36147 panels: Use icon-name property instead
Don't embed a custom GtkImage as that would lack the appropriate style
classes
that GtkButton/GtkMenuButton would automatically add for us
2022-07-20 14:15:57 +02:00
Lukáš Tyrychtr
e39de651a2 Fix formatting 2022-06-20 23:04:56 +00:00
Lukáš Tyrychtr
bd74296222 We don't need the declaration after all 2022-06-20 23:04:56 +00:00
Lukáš Tyrychtr
2148e23d97 Printer panel a11y fixes 2022-06-20 23:04:56 +00:00