Commit graph

244 commits

Author SHA1 Message Date
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
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Bastien Nocera
1428b52fdc datetime: Port tests to GTest
test-timezone is still disabled though, as it is too noisy still.
2016-06-10 17:10:35 +02:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Cosimo Cecchi
2fa79c35cc datetime: add -lm to libraries
https://bugzilla.gnome.org/show_bug.cgi?id=764296
2016-04-14 12:31:49 -07:00
Bastien Nocera
ec5d9d05a7 datetime: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764727
2016-04-08 11:31:24 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Jiro Matsuzawa
7b9a76c609 datetime: Fix mnemonic conflict
https://bugzilla.gnome.org/show_bug.cgi?id=736606
2016-01-18 15:50:20 +01:00
Frédéric Péters
cc600a918b datetime: update timezones for new "Pyongyang Time"
https://bugzilla.gnome.org/show_bug.cgi?id=753643
2015-08-18 00:16:44 +02:00
Bastien Nocera
557dc46d97 datetime: Load backward file from GResource
So it doesn't warn when not installed in the target prefix yet.

https://bugzilla.gnome.org/show_bug.cgi?id=752831
2015-07-26 23:48:48 +02:00
Bastien Nocera
f7467d2175 datetime: Make it possible to focus the time spin buttons
https://bugzilla.gnome.org/show_bug.cgi?id=752609
2015-07-20 12:08:59 +02:00
Bastien Nocera
ac59708d3f datetime: Fix incorrect sensitivity when permission is missing
When the permission is missing, we shouldn't make the rows sensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=709774
2015-07-10 17:14:02 +02:00