Commit graph

255 commits

Author SHA1 Message Date
Benjamin Berg
3bf6ea7794 datetime: Improve NTP switch handling fixing update loop
We cannot simply set the state/active property of the switch without
also triggering the notify:: or state-set signals at the same time. As
such, we need to block the "set-state" handler when we update the
"state" of the switch.

Also, while at it, change the switch to react to "state-set" and only
update the "state" after we received the response from the system.

Fixes: #1299
2021-05-07 03:46:13 +00:00
Mohammed Sadiq
55ea4cabda datetime: Implement the new time-date editor dialog design 2020-09-15 03:07:41 +00:00
Mohammed Sadiq
c2b0f8cb1d datetime: Fix activating time and timezone rows
These rows seems not activatable by default and thus not able to edit those values
2020-08-10 13:06:30 +00:00
Adrien Plazas
0c71793e7c Stop using the action HdyActionRow child type
It has been dropped and is now the default child type.
2020-07-20 08:04:28 +02: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
lionirdeadman
5b573b7e25 Seperate timezone and date controls as per recent design mockups. 2020-07-17 03:32:02 +00:00
Mohammed Sadiq
7683a09ff7 datetime: Use the new time editor 2020-06-15 04:55:39 +00:00
Robert Ancell
9bc6d2d3f1 datetime: Replace ifdefs with #pragma once 2019-11-27 21:56:10 +00:00
Andre Klapper
397a0ce673 Correct incorrect timezone on world map for North Korea
Fixes #713
2019-10-17 10:05:56 +13:00
Andre Klapper
a3af25fd8a Correct incorrect timezone on world map for Venezuela
Fixes #714
2019-10-14 20:12:26 +00:00
Andre Klapper
e4b1df23a4 Correct incorrect timezone on world map for Sri Lanka
Fixes #709
2019-10-13 21:51:21 +00:00
Benjamin Berg
8d9affbd6a datetime: Allow changing the timezone when auto-update is prohibited
When the user disables the use of location services in the privacy
panel, then the timezone will never be updated automatically. Automatic
timezone may still be enabled though, so we need to allow the user to
change the timezone when location services are disabled or when
automatic timezone updating is disabled.
2019-09-11 18:39:54 +02:00
Robert Ancell
97985a664e Remove unused GNOMELOCALEDIR defines 2019-09-09 21:45:53 +00:00
Ting-Wei Lan
299647f970 build: Include generated sources in declared dependencies
Sometimes ninja decides to compile tests/interactive-panels/main.c,
which requires shell/resources.h, before shell/resources.h is generated.

The fix is to use 'sources' argument of declare_dependency to properly
declare the dependency on generated headers.

A fix for tests/datetime and panels/datetime is also included in the
commit to fix a similar problem.

Closes https://gitlab.gnome.org/GNOME/gnome-control-center/merge_requests/472
2019-08-25 09:42:22 +00:00
Michael Catanzaro
a22da99aaf Replace unsafe setlocale() use with uselocale()
setlocale() is not threadsafe except when used only to query the locale
without changing it. Let's use uselocale() instead, which changes the
locale only on the calling thread. Much better.
2019-07-03 17:15:33 -05:00
Georges Basile Stavracas Neto
75f150d5a2 shell: Add position to cc_shell_embed_widget_in_header()
So we can control where the widget should be added to. The
main window only supports left and right positions.

https://gitlab.gnome.org/GNOME/gnome-control-center/issues/528
2019-05-21 12:59:36 -03:00
Adrien Plazas
3c65262a05 datetime: Use HdyActionRow
This better handles the available space and simplifies the code.
2019-01-29 10:28:28 +00:00
Adrien Plazas
fd0b45d6c3 datetime: Use a scrolled window and a column
This better allows to handle short windows and better handle the
available width.
2019-01-29 10:28:28 +00:00
Jeremy Bicha
021140d859 datetime: Use accessible-description instead of -name for Hour & Minute
In my testing, default orca didn't seem to read the "Hour" or "Minute"
words when we used accessible-name but it does work with
accessible-description.

This is the only place we used accessible-name in gnome-control-center
but we use accessible-description in a few other places.
2019-01-05 12:48:31 +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
Robert Ancell
417fc57392 datetime: Use g_signal_connect_object for all signal handlers
This ensures they wont be called when the handling object is destroyed.
Also connect all in "swapped" form for improved readability.
2018-10-18 01:13:49 +00:00
Robert Ancell
c0f41daff0 shell: Remove the lock button from the shell
Only the date time panel used it, all other panels add their own shell using
cc_shell_embed_widget_in_header which was added after the date time panel was
written. Update the date time panel to use this method.
2018-10-18 00:25:40 +00:00
Robert Ancell
6ce1a1dce6 datetime: Don't use gtk_widget_show_all
It is removed in GTK+ 4
2018-10-10 04:01:11 +00:00
Robert Ancell
216736b8dd datetime: Fix warning running callback before objects are created
The following warning occurs when the datetime panel is created:
(gnome-control-center:3173): GLib-GIO-CRITICAL **: 09:18:38.531: g_settings_get_value: assertion 'G_IS_SETTINGS (settings)' failed

This is due to the callback being called before the settings object is created
2018-10-09 20:30:16 +00:00
Petr Kubánek
89fabad809 datetime: grayout automatic timezone
Automatic timezone does not work if location sharing is disabled in privacy.

Grays out automatic timezone setting if location sharing is disabled in privacy
settings. Enable automatic timezone seting if location sharing is enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=788714
2018-09-11 02:11:44 +00:00
Robert Ancell
dd61d98ec5 datetime: Move callbacks into .ui file 2018-06-01 20:35:30 +00:00
Robert Ancell
6a72e73d0c datetime: Use GtkTemplate 2018-05-29 16:34:28 +00:00
Georges Basile Stavracas Neto
197ed1ed55 datetime: Update backwards file
This is just a plain copy of the most recent (2017-10)
backwards file from tzinfo.
2018-05-09 15:38:12 -03:00
Benjamin Berg
b15be07738 Move datetime tests into tests subdirectory 2018-04-17 15:26:59 +02:00
Benjamin Berg
c2f601a9d4 Move common panel code from shell/ to panel/common
This creates a new static library called libwidget which the shell links
against.
2018-04-17 15:26:59 +02:00
Piotr Drąg
7265bd53a0 Add translator comments to .desktop files
Icons are confusing translators, and gettext
is unlikely to get fixed any time soon.
2018-02-23 18:49:35 +01:00
Dominique Leuenberger
5a66372deb datetime: Allow changing the timezone if polkit says so
As changing the time can have security implications, such as expiring
passwords, while changing the timezone doesn't, it's not unusual to
have a setup where org.freedesktop.timedate1.set-timezone is allowed
while other time-related actions aren't.

Therefore, if org.freedesktop.timedate1.set-timezone is allowed, there's
no reason to require that the user unlocks the panel to enable them to
change the timezone.

https://bugzilla.gnome.org/show_bug.cgi?id=646185
2018-01-26 11:07:59 -02:00
Iñigo Martínez
0dd386f405 build: Migrate from Intltool to Gettext
Recent versions of Gettext are able to translate several formats
that are used in GNOME applications. This patch migrates from
Intltool to Gettext by using meson's i18n features.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:31 +01:00
Iñigo Martínez
811ba929d4 build: Move timezone languages to LINGUAS file
The timezone panel uses translations for the existing timezone
names. This was using a set of predefined languages inside the
meson's build file.

This set of languages has been moved to the LINGUAS file.

https://bugzilla.gnome.org/show_bug.cgi?id=787588
2018-01-23 10:49:16 +01:00
Robert Ancell
d71f705d77 datetime: Use g_auto for variables
https://bugzilla.gnome.org/show_bug.cgi?id=788221
2018-01-18 12:30:37 -02:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Georges Basile Stavracas Neto
b23ef59926 shell-model: Remove old categories
Since we don't maintain two different shells anymore, there
is no need to maintain the two different sets of categories
in the desktop files.

This commit also drops the "#ifdef CC_ENABLE_ALT_CATEGORIES"
blocks, since the previous commit removed that define.

https://bugzilla.gnome.org/show_bug.cgi?id=790923
2017-11-28 17:03:51 -02:00
Robert Ancell
e779a30927 datetime: Use G_DEFINE_TYPE 2017-09-26 20:20:45 -04:00
Piotr Drąg
847f29c844 Update Polish translation 2017-08-23 03:57:27 +02:00
Allan Day
87568e9250 Harmonize list box row layouts
While it isn't possible, or even advisable, to make all the list
box rows the same height, using a number of standard heights will
make the control center feel more harmoneous.

Adust the height of the list box rows in Color, Date & Time,
Mouse & Touchpad, Network, Privacy, Region & Language, Sharing
and Universal Access. Makes standard rows that contain labels
and/or controls 58px tall. Some other rows, such as those which
contain two lines of text, are allowed to be taller.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:48 +02:00
Allan Day
8a8e53ab8a Standardize vertical spacing of panels
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.

Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.

Bluetooth, displays and printers are not addressed.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:42 +02:00
Richard Schwarting
1a310bb11d datetime: Change 'Tortola' translations to Toronto
Multiple translations erroneously listed Toronto as "Tortola". There is
a city named Tortola, and appears as the next city in these records.
But in none of these languages is Tortola a translation of Toronto.

https://bugzilla.gnome.org/show_bug.cgi?id=785922
2017-08-07 21:44:39 +02:00
Alan Coopersmith
f090d7e3a0 tz.c: compiler warning: implicit declaration of function ‘islower’
https://bugzilla.gnome.org/show_bug.cgi?id=783641

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-06-12 16:54:35 +02:00
Silvère Latchurié
c890872843 datetime: Fix the style of the date/time selection dialog
Fix the size of the AM/PM button. Add padding to the time widgets and to the panel.

https://bugzilla.gnome.org/show_bug.cgi?id=778146
2017-05-17 17:30:07 +02:00
Bastien Nocera
85cd910af5 datetime: 12h time format is now always available
Following a change in GDateTime, AM/PM format is now always available
even if the support is missing in the locale used.

Remove the code used to detect AM/PM support in the locale, and bump the
GLib requirements to the version that includes this GDateTime change.

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

https://bugzilla.gnome.org/show_bug.cgi?id=780863
2017-04-03 11:32:43 +02:00
Bastien Nocera
3f0510cac8 build: Better libm checks
Use AC_CHECK_LIBM instead of AC_CHECK_LIB(m,...
and use $(LIBM) instead of hardcoding "-lm" in Makefiles.
2017-02-08 19:21:53 +01:00
Bastien Nocera
1ff213fd18 datetime: Fix timezone-gfx test with builddir != srcdir 2016-09-13 12:34:35 +02:00