Commit graph

310 commits

Author SHA1 Message Date
Alice Mikhaylenko
4680f362f3 Port to AdwNavigationSplitView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
a7afbea0d3 datetime: Port to AdwToolbarView 2023-08-25 08:00:43 +00:00
Alice Mikhaylenko
205a3b7d91 datetime: Port dialogs to AdwWindow 2023-08-25 08:00:43 +00:00
Automeris naranja
8a8973f860 datetime: Explain that Clock & Calendar settings affect the date & time info from Shell's top bar
The Clock & Calendar settings are a bit vague.
Add an explanation to inform that these settings will affect the
date & time information from Shell's top bar.

Fixes https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2592
2023-08-07 10:28:17 +00:00
Robert Ancell
1485414714 datetime: Fix name of parent class variable 2023-06-06 07:54:38 +00:00
Robert Ancell
644df7697b datetime: Do signal handlers in swapped form 2023-05-30 08:36:22 +00:00
Felipe Borges
e97429f0f6 Make dialogs close when pressing the Escape key
Fixes #2503
2023-05-25 23:24: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
Felipe Borges
2cf57ffb10 datetime: Merge "Clock" and "Calendar" sections
According to mockups at
https://gitlab.gnome.org/Teams/Design/settings-mockups/-/raw/master/date-and-time/date-and-time.png
2023-05-22 13:18:31 +00:00
Felipe Borges
79636a8eb9 datetime: Move "Time Format" row out of "Clock" section
https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1277#note_1751622
2023-05-22 13:18:31 +00:00
Lains
7615bb5ccb datetime: Add top bar clock and calendar switches
For changing the clock display (weekday, seconds, date) and week numbers on the calendar

These switches should change:
- Whether or not the clock display has the week day (e.g. Mon).
- Whether or not the clock display has the date (e.g. Jun 6).
- Whether or not the clock display has seconds (e.g. 12:30:45).
- Whether or not the clock's popup calendar should show the week's number.

Fixes #257
2023-05-22 13:18:31 +00:00
Nelson Benítez León
6fb6ba1dc9 meson: improve comment and fix deprecated functions
- Clarify that 'mm-glib' dep is for ModemManager (not Network
   Manager which is below). The comment also helps people
   which may confuse it with glibmm library.

 - Fix following Meson warning about two deprecated functions:
   WARNING: Deprecated features used:
   * 0.56.0: {'dependency.get_pkgconfig_variable', 'meson.source_root'}
2023-05-02 11:33:31 +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
Chris Mayo
0d1ae3d4f4 datetime: Fix Time Format ComboRow
Failed to set property AdwEnumListModel.enum-type to GDesktopClockFormat: Unsupported GType 'GDesktopClockFormat' for value of type 'GType'

meson.build code adapted from background/meson.build.
2023-04-17 12:14:58 +00:00
Chris Mayo
92c4b6a706 Fix panel crashes due to unknown types in UI descriptions
Error building template class 'CcSearchPanel' for an instance of type 'CcSearchPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDisplayPanel' for an instance of type 'CcDisplayPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcMousePanel' for an instance of type 'CcMousePanel': .:0:0 Invalid object type 'CcIllustratedRow'

Error building template class 'CcKeyboardPanel' for an instance of type 'CcKeyboardPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcRegionPanel' for an instance of type 'CcRegionPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUaPanel' for an instance of type 'CcUaPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcAvatarChooser'
Error building template class 'CcUserPanel' for an instance of type 'CcUserPanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcTzDialog'
cc_tz_dialog_get_selected_location: assertion 'CC_IS_TZ_DIALOG (self)' failed
dumped core
Error building template class 'CcDateTimePanel' for an instance of type 'CcDateTimePanel': .:0:0 Invalid object type 'CcListRow'

Error building template class 'CcInfoOverviewPanel' for an instance of type 'CcInfoOverviewPanel': .:0:0 Invalid object type 'CcHostnameEntry'
2023-04-17 12:14:58 +00:00
Automeris naranja
fe5257bc9e general: Remove a11y labels when they aren't needed
A11y labels aren't needed when using the "activatable-widget"
property, because the relation is set automatically:

https://gitlab.gnome.org/GNOME/libadwaita/-/blob/main/src/adw-action-row.c#L661
2023-04-12 18:34:20 -03:00
Robert Ancell
dd06bf7c11 datetime: Fix NTP switch getting out of sync.
The state needs to be set to the state that was requested before the D-Bus call.
The existing code used the state received from D-Bus, which will be the previous state.
2023-03-30 09:19:34 +13:00
Robert Ancell
00e303998e datetime: Use g_object_bind_property to show NTP state 2023-03-30 09:17:21 +13:00
Robert Ancell
a3d99c78f6 datetime: Fix widget names and types 2023-03-29 11:04:24 +00: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
Alessandro Bono
7c356d8c7d datetime: Decouple active and state properties usage
The ability to tweak the state property was mainly introduced in
order to implement delayed state change via the state-set signal.
Since GTK 4.9.3[1] the active and state properties are no more
interchangeable.

[1] https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5442

Closes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2330
2023-03-03 18:16:57 +00:00
Mohammed Sadiq
b5e02cdbe5 Remove no longer used timezone map 2022-12-04 21:38:34 +00:00
Mohammed Sadiq
5e41174475 datetime: Use the new timezone dialog
This commit also removes the deprecated GtkListStore usage
2022-12-04 21:38:34 +00:00
Mohammed Sadiq
eda96f8bc5 datetime: Implement the new timezone selection dialog
which fits better on small screen and is more accessible than a map.
This is based on GNOME Clocks world clock[0] and GNOME Settings[1] designs

[0] https://gitlab.gnome.org/Teams/Design/app-mockups/-/blob/master/clocks/clocks.png
[1] https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/date-and-time/time-zone-picker.png
2022-12-04 21:38:34 +00:00
Mohammed Sadiq
39267eb2a6 datetime: Add cc-tz-row 2022-12-04 21:38:34 +00:00
Mohammed Sadiq
da777d3edd datetime: Add cc-tz-item 2022-12-04 21:38:34 +00:00
Mohammed Sadiq
1885b2c4f3 datetime: Display month in 2 columns
So that it fits better in smaller screens and the user
doesn't have to scroll to select some months.

This commit implements the updated design[0]

[0] https://gitlab.gnome.org/Teams/Design/settings-mockups/-/blob/master/time-date/time-date-adaptive.png
2022-12-01 01:21:24 +00:00
Mohammed Sadiq
e23ff1befc Add cc-month-row
This will be used to show month in the month selection grid
2022-12-01 01:21:24 +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
Jakub Steiner
064c6a807d timezone: Use blank map 2022-07-07 11:37:39 +00:00
Carlos Garnacho
f923c3ca01 datetime: Drop timezone highlighting
In most situations it is sufficient with the hint bubble being
displayed, or city name search, rely on these.
2022-07-07 11:37:39 +00:00
Carlos Garnacho
65d83189e9 datetime: Drop colormap
This image file is nowadays unused, except for loading/destroying it.
We can simply drop this.
2022-07-07 11:37:39 +00:00
Lukáš Tyrychtr
46932dcffe Fix indent 2022-05-30 22:24:47 +00:00
Lukáš Tyrychtr
fd7691c0b9 Add a missing label to the automatic timezone switch 2022-05-30 22:24:47 +00:00
Mohammed Sadiq
4b2d32e53f datetime: Fix crash when loading the panel
When the month row value is changed, the signal callback uses
the year value from the year spin button.  So set year value
before month is set so that the year is set to a valid value
thus avoiding a crash with invalid year.
2022-02-01 13:59:33 +00:00
Jakub Steiner
13376ecb8b Add individual app icons 2022-01-31 14:08:22 +00:00
Georges Basile Stavracas Neto
043d4fab74 datetime: Switch day row to AdwActionRow
Another small cleanup.
2022-01-26 23:47:36 -03:00
Georges Basile Stavracas Neto
b7876233e9 datetime: Switch year row to AdwActionRow
Another nice, small cleanup
2022-01-26 23:46:10 -03:00
Georges Basile Stavracas Neto
65c53a4c57 datetime: Switch Month row to AdwComboRow
It fits it much better, and allows for a great cleanup.
2022-01-26 23:43:43 -03:00
Pablo Correa Gómez
7c91fc1400 datetime: get month_label from GtkFlowBox widget
Using g_date_time_format to get the name of the month
translates the name according to LC_TIME. This is inconsistent
with all other labels displayed, which get translated according
to LC_MESSAGES. By taking the label from the corresponding
entry in the GtkFlowBox, we avoid the incosistency

Fixes #1507
2022-01-25 11:42:41 +00:00
Georges Basile Stavracas Neto
2e73952d28 datetime: Add go-next-symbolic to dialog rows
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1587
2022-01-21 16:13:21 +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
Christopher Davis
24fbb5e49a cc-datetime-panel: Use AdwComboRow
The API is nicer, and it's the recommended widget to use
for dropdown rows.
2022-01-06 11:47:10 -08:00
Christopher Davis
0a5515463d cc-datetime-panel: Use AdwPreferencesGroup
Lets us get rid of our manual listboxes.
2022-01-06 11:42:08 -08:00
Christopher Davis
d3756aaf26 cc-datetime-panel: Move activation handling to rows 2022-01-06 11:42:08 -08:00
Christopher Davis
3b90e5b43f cc-datetime-panel: Set activatable-widget on rows with switches 2022-01-06 11:42:08 -08:00
Christopher Davis
52a32574fb cc-datetime-panel: Remove keynav-failed handling 2022-01-06 11:42:08 -08:00
Colin Watson
14a2672e28 datetime: Fix handling of Irish timezone on map
The timezone map tries to highlight regions of the world that keep the
same time, approximating this by their non-daylight-savings UTC offset.
There's no reasonable API for this, and it goes wrong in various cases,
such as Irish Standard Time which is legally defined as the country's
summer time with a negative DST offset in winter.

Hardcoding this is unpleasant, but there doesn't seem to be a better
solution, and in any case there's already similar hardcoding implied by
the segmented map images in panels/datetime/data/timezone_*.png.  I've
tried to make it practical to fix other similar disagreements between
the detected offset and the groupings implied by map images, though for
now I've conservatively fixed only the case I'm familiar with.

Fixes: #1341
2021-12-17 14:49:24 +00:00