Commit graph

222 commits

Author SHA1 Message Date
Automeris naranja
ac7b1d910d general: Use em dash in some places
Em dash is the correct punctuation mark to separate parts
of a sentence, not an en dash.

https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use
2024-04-18 08:42:50 +00:00
Automeris naranja
c6c02d16d9 color: Minor writing style tweak
- In the AdwPreferencesPage description, use an
en dash before "learn more" and add a period.

This will be consistent with the
Privacy > Diagnostics page description writing
style:
ad142445a2
2024-04-03 20:02:36 -03:00
Automeris naranja
d30ebf9945 color: Rename "colors_page" to "color_page"
The AdwPreferencesPage id is "colors_page",
but the plural isn't correct.

Follow-up from 8e44e69e37
2024-04-03 19:10:59 -03:00
Automeris naranja
8e44e69e37 color: Modernize the panel a bit
- Use AdwPreferencesPage/AdwPreferencesGroup
- Use AdwStatusPage when there are no devices
that can be color managed
2024-04-03 21:58:21 +00:00
Automeris naranja
7e4a5e0295 color: Use CCListRowInfoButton to show color profile info
CcListRowInfoButton is used in several places in Settings,
so this change will improve UI/UX consistency.
2024-04-02 16:34:49 +00:00
Automeris naranja
cb8819657b general: Rename "computer" strings to "device"
"Computer" isn't a suitable term for other device
form factors. Also, there are several strings in
Settings that already use "device", and cc-color-panel.ui
uses a mix of "computer" and "device" strings, which is
weird.
2024-03-11 15:19:55 +00:00
Philip Withnall
2d6469ce6b color: Correctly capitalise button labels
As per the HIG, button labels should be in title case.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-03-11 15:02:34 +00:00
Daniel Tang
6a083318af color: Fix GTK4 invisible start calibration button
"action_area" was unused. internal-child is invalid in GTK4,
so the row with the start button doesn't load. This makes the
calibration feature impossible to use. Removing the unused
unrecognized attribute allows the start button to load again.

Fixes: https://askubuntu.com/q/1504329/1004020
Fixes: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2043119
2024-03-11 13:43:47 +00:00
Alice Mikhaylenko
1967c1d731 color: Make it fit on narrow widths
- Ellipsize buttons
- Remove unnecessary margins
- Stop making buttons homogeneous
2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
49b1c59c34 color: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Felipe Borges
0c9498d1f8 Mark some strings as translatable
These are strings that are presented in the UI that were not marked
for translation.

Fixes #2596
2023-08-11 12:07:00 +02:00
Christopher Davis
8635a5abea color: Use GtkFileDialog
The GtkFileChooser interface is deprecated in favor of
GtkFileDialog.
2023-06-06 13:33:29 +00:00
Robert Ancell
606957c048 color: Fix name of parent class variable 2023-06-06 07:54:38 +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
Felipe Borges
6179d585a6 color: Make it easier to translate panel description string
This helps translators understand what are the placeholders in
the visible string.

+#. Translators: This will be presented as the text of a link to the documentation
+#. translators: Text used in link to privacy policy
+#: panels/color/cc-color-panel.c:2021
+#: panels/diagnostics/cc-diagnostics-panel.c:137
+msgid "Learn more"

+#. Translators: %s is a link to the documentation with the label "Learn more"
+#: panels/color/cc-color-panel.c:2023
+msgid "Each device needs an up to date color profile to be color managed. %s"
2023-05-04 10:06:26 +00:00
sunflowerskater
2d310918fa color: Dim information text & fix "Learn more" link alignment 2023-05-04 10:06:26 +00:00
Maksym Hazevych
08c2e69851 Resolving suggestions 2023-03-29 14:26:55 +13:00
Maksym Hazevych
81d7a8a85e Use gtk_window_present and gtk_window_close 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
Marco Trevisan (Treviño)
4b400736bc color-panel: Do not try to access to null pointer in destruction
During destruction toolbar_devices is nullified, but
gtk_widget_in_destruction() does not perform a NULL-check, and we could
crash:

==22708== Invalid read of size 1
==22708== at 0x505CC0B: gtk_widget_in_destruction (gtkwidget.c:10643)
==22708== by 0x189553: gcm_prefs_list_box_row_selected_cb (cc-color-panel.c:1708)
==22708== by 0x4A61714: g_cclosure_marshal_VOID__OBJECTv (gmarshal.c:1910)
==22708== by 0x4A5E148: _g_closure_invoke_va (gclosure.c:895)
==22708== by 0x4A784F3: g_signal_emit_valist (gsignal.c:3462)
==22708== by 0x4A78722: g_signal_emit (gsignal.c:3612)
==22708== by 0x4F5B121: gtk_list_box_remove (gtklistbox.c:2420)
==22708== by 0x4F5B222: gtk_list_box_dispose (gtklistbox.c:439)
==22708== by 0x4A63338: g_object_unref (gobject.c:3891)
==22708== by 0x4EAA994: gtk_box_dispose (gtkbox.c:230)
==22708== by 0x4A63338: g_object_unref (gobject.c:3891)
==22708== by 0x4EAA994: gtk_box_dispose (gtkbox.c:230)
==22708== Address 0xfffffffffffffeb2 is not stack'd, malloc'd or (recently) free'd

See: https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2009913
2023-03-21 15:34:44 +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
Mohammed Sadiq
2893f8e3f9 color: Select first device row only if non-NULL
Otherwise we might read some invalid memory resulting in a crash
2022-11-15 16:45:00 +05:30
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
Robert Ancell
2536f946eb color: Remove dead code
This code was disabled as part of the GTK4 port (d00cc39)
2022-06-17 01:42:12 +00:00
Christopher Davis
200e524aab color: Don't update toolbar buttons when the toolbar is in destruction
GtkListBox's dispose function removes all rows, and
`gtk_list_box_remove ()` sends `row-selected`. In turn,
as we listen to row-selected, we end up calling
functions on our toolbar while it may be in the
process of disposing. This causes a crash.

This commit introduces an early return if the toolbar is
being destroyed.
2022-02-01 14:06:18 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +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
Christopher Davis
981a8cea7b panels: Use .boxed-list instead of .content
The `.content` style class is deprecated in favor
of the `.boxed-list` style class, which is named
after the design pattern it's used for.
2021-12-16 12:52:44 -08:00
Georges Basile Stavracas Neto
d00cc3929e [WIP] color: Port to GTK4
This is very rough still. The calibration code
is entirely untested.
2021-12-14 22:34:21 -03:00
Bastien Nocera
a9c398e5d9 color: Remove profile upload feature
As it was already removed in colord itself:
98f83acc91 (diff-cb19db05cc548372b27ebee7d47bc00b6788ad05da6f5d7fff107c45bbfba38f)

This removes the only direct libsoup 2.x dependency in
gnome-control-center.
2021-11-18 16:39:44 +01:00
Robert Ancell
ed41626c67 color: Search path for gcm-viewer/gcm-calibrate rather than rely on exact location 2020-12-13 21:45:56 +00:00
Benjamin Berg
dd2ecbfa9d color: Fix order of arguments to gcm_prefs_device_changed_cb
Commit f1893b8e8 (color: Connect signals with g_signal_connect_object
in swapped form) changed the connect call to use G_CONNECT_SWAPPED, but
it did not change the order of the arguments for the
gcm_prefs_device_changed_cb function.

Fixes: #1082
2020-08-18 21:00:36 +00:00
Yuri Chornoivan
e7050ab6f4 Fix minor typos 2020-07-20 10:38:09 +03:00
Adrien Plazas
f06379e30c Replace HdyColumn by HdyClamp
In libhandy 1, HdyClamp replaces HdyColumn. This stops setting values
when they match HdyClamp's defaults.
2020-07-20 08:04:28 +02:00
Robert Ancell
f1893b8e8b color: Connect signals with g_signal_connect_object in swapped form 2020-03-30 16:18:49 +13:00
Robert Ancell
93b14a4339 panel: Move shared GCancellable code into panel class
Make the panel class provide a cancellable that will be cancelled when the panel
is destroyed. Panel implementations can use this and not have to mangage the
cancellable themselves. Consolidate cases where panels had multiple cancellables
that were all being used for this behaviour.
2020-02-03 09:36:24 +13:00
Robert Ancell
871f10bcf4 color: Make .ui filename match the .c filename 2019-09-09 21:58:00 +00:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Robert Ancell
8ecdd32971 color: Fix compile warning on g_clear_pointer 2019-02-07 11:22:11 +13:00
Adrien Plazas
b4520d07b5 color: Make the row labels ellipsizable
This better allows to better handle a narrow window.
2019-01-29 10:35:18 +00:00
Adrien Plazas
eaeb64d85e color: Use a HdyColumn
This helps the panel to fit in narrower windows.
2019-01-29 10:35:18 +00:00
Robert Ancell
3695c22ab5 datetime: Make .ui filename match the .c filename 2018-11-12 16:41:01 +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
Kalev Lember
edc52c170d color: Fix fallout from the GtkTemplate port
Correct a typoed variable name so that calibration works again, instead
of crashing.

GLib-GObject-WARNING **: 15:52:50.561: invalid cast from 'GtkBox' to 'GtkEntry'
2018-09-15 17:30:44 +02:00
Georges Basile Stavracas Neto
7d58972623 Revert "color: Cache D-Bus proxies"
This reverts commit 8e56ea35f3.
2018-08-27 12:56:20 +00:00
Sam Hewitt
24174173be common: update pixel_size values to base 16 for icon clarity 2018-07-10 17:52:08 -04:00