Commit graph

89 commits

Author SHA1 Message Date
Matthias Clasen
c462c34b28 datetime: Set the filechooser clock format too
GTK+ now uses a 12h/24h setting in the org.gtk.Settings.FileChooser
schema to switch the time display in the file chooser. Set this
to be in sync with the global time format preference we have.

https://bugzilla.gnome.org/show_bug.cgi?id=722942
2014-01-26 09:47:51 -05:00
Kalev Lember
24faa84d05 datetime: Explicitly destroy toplevel dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=709443
2013-10-07 10:35:52 +02:00
Kalev Lember
47fb0c426f Revert "datetime: Don't leak the dialogs"
This caused criticals when on_permission_changed callback tried to
access priv->datetime_dialog or priv->timezone_dialog before they had
been set up.

Another attempt at fixing the leak in the following patch.

This reverts commit 545c886543.

https://bugzilla.gnome.org/show_bug.cgi?id=709443
2013-10-07 10:35:52 +02:00
Kalev Lember
7ae60ad2cf datetime: Disconnect from GtkStack signals before widget destruction
This fixes a regression from commit 545c886 that caused criticals when
leaving the datetime panel.

https://bugzilla.gnome.org/show_bug.cgi?id=709443
2013-10-07 10:35:52 +02:00
Kalev Lember
2234970583 datetime: Store am_pm_stack in priv structure
This is in preparation for the next patch.

https://bugzilla.gnome.org/show_bug.cgi?id=709443
2013-10-07 10:35:52 +02:00
Rui Matos
a401a914eb datetime: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Rui Matos
545c886543 datetime: Don't leak the dialogs
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:02 +02:00
Kalev Lember
17a8595ddc datetime: Sync AM/PM button's accessible name with the text displayed
Instead of hardcoding the accessible name as "Switch between AM and
PM.", set it to "AM" or "PM" depending on which label the stack switcher
is currently showing.

https://bugzilla.gnome.org/show_bug.cgi?id=708219
2013-09-17 14:31:22 +02:00
Kalev Lember
47e8406ed6 datetime: Connect arrow up/down keynav across list boxes
https://bugzilla.gnome.org/show_bug.cgi?id=707942
2013-09-15 16:58:43 +02:00
Kalev Lember
5f21f92f7f datetime: Plug a small memory leak 2013-09-12 22:32:46 +02:00
Kalev Lember
16e251ea98 datetime: Use new g_date_time %z format modifier
Use new %:::z format string to display timezone offset in a slightly
nicer way. This is also needed for consistency with the timezone
notifications from gnome-settings-daemon.

Also bump glib dependency to 2.37.7 for the new modifier.

https://bugzilla.gnome.org/show_bug.cgi?id=707253
2013-09-02 19:05:46 +02:00
Kalev Lember
c68f9eca50 datetime: Show the automatic timezone switch
The backend in gnome-settings-daemon is now functional, so we can expose
the option in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=707252
2013-09-02 19:05:46 +02:00
Kalev Lember
88f4c30c04 datetime: Use GObject property binding for the NTP switch
This makes it possible to remove the code for manually keeping the NTP
switch and the timedated1 DBus proxy properties in sync, and also makes
it easy to share code with the automatic timezone switch.

https://bugzilla.gnome.org/show_bug.cgi?id=707252
2013-09-02 19:04:40 +02:00
Kalev Lember
853fb8cc90 datetime: Move polkit initialization earlier
... so that in the following commit, we can rely on the permissions
being available.

While at this, also create a DATETIME_PERMISSION for the PolicyKit
action ID at the top of the file.

https://bugzilla.gnome.org/show_bug.cgi?id=707252
2013-09-02 19:04:40 +02:00
Kalev Lember
d7847fe7a1 datetime: Exit early if the timedate1 service isn't available
We cannot meaningfully change (or display) any Date & Time system
settings without the timedate1 DBus service, so just exit early.

https://bugzilla.gnome.org/show_bug.cgi?id=707252
2013-09-02 19:04:40 +02:00
Kalev Lember
a709ae41eb datetime: Rename settings to clock_settings
https://bugzilla.gnome.org/show_bug.cgi?id=707252
2013-09-02 19:04:40 +02:00
Kalev Lember
ab1d1b0c54 datetime: Hide the NTP switch when the service is unavailable
https://bugzilla.gnome.org/show_bug.cgi?id=706378
2013-08-29 16:48:54 +02:00
Kalev Lember
c5812c3ccc datetime: Mark the time format strings as translatable
... and add translator comments explainings what they do. The RTL
languages are likely going to want to show them in a different order.

We should eventually move to just using GnomeWallClock and/or
g_date_time_format with %c that already have translated the time format
strings. However, in case this doesn't make it in time for 3.10, mark
the current strings in g-c-c as translatable to get some translation
coverage.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 15:49:59 +02:00
Kalev Lember
da9d4a76c9 datetime: Show information about the selected timezone
... using the text bubble API from the previous commit. We're currently
displaying the time zone abbreviation, UTC offset, city and country
name, and the current time.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 15:49:59 +02:00
Kalev Lember
718118963e datetime: Implement timezone search with autocompletion
This is first cut at implementing the new timezone dialog design.
Instead of having drop down menus with the city and the continent, we're
now switching to a search entry that has autocompletion.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 15:49:50 +02:00
Rui Matos
19d3e96d6a datetime: Ensure that translated strings for timezones are UTF-8
This was fixed in commit 2c4bba74e0 but
then got lost in a code refactor in commit
3686cf7eb8.

https://bugzilla.gnome.org/show_bug.cgi?id=706350
2013-08-20 13:49:52 +01:00
Kalev Lember
6fddedad84 datetime: Toggle the NTP switch when clicking on the row
Pointed out by Allan Day on IRC.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:30:31 +02:00
Kalev Lember
20670b5360 datetime: Shuffle initialization code around
Move subdialog setup code out of the main init function and to
respective setup_*_dialog() functions.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:21:21 +02:00
Kalev Lember
f5cb98c94f datetime: Implement new design for the time subdialog
https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:21:21 +02:00
Kalev Lember
60e448b77a datetime: Move the 24h/12h selection to the main overview
... and use a combobox for choosing between the options.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:21:21 +02:00
Kalev Lember
f90edf44b1 datetime: Clean up error handling
Avoid using two GError variables in a single function to reduce
programmer confusion. Instead, only use one and clear it with
g_clear_error() when we need to reuse it.

Pointed out by Rui Matos.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:17:32 +02:00
Kalev Lember
a0d156d19a datetime: Implement listbox based overview
... and move existing date/time and timezone settings to separate subdialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:17:32 +02:00
Kalev Lember
e665689e23 datetime: Use g_clear_object()
https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-09-08 10:02:24 +02:00
Ryan Lortie
8d813defb1 datetime: support new timedated CanNTP property
Set the NTP switch insensitive in the case that timedated has a CanNTP
property and that property is set to false.

https://bugzilla.gnome.org/show_bug.cgi?id=695253
2013-03-06 21:48:57 -05:00
Cosimo Cecchi
d2ce735f12 datetime: use a GResource for GtkBuilder UI definition and icons
https://bugzilla.gnome.org/show_bug.cgi?id=691132
2013-01-07 10:57:05 +01:00
Bastien Nocera
3686cf7eb8 shell: Make all control-center plugins static
This makes loading faster, with less I/O, avoids unnecessary
code duplication (around 1k lines shaved), and ensures that
all the panels link and work appropriately.

By the same token, it will stop external panels from being
created, and loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=690036
2012-12-11 17:07:39 +01:00
Debarshi Ray
8afea39c60 datetime: Do not offer the 12 hr clock in locales without AM/PM
https://bugzilla.gnome.org/show_bug.cgi?id=673721
2012-11-08 12:29:44 +01:00
Bastien Nocera
2ab1f21723 datetime: Update current time when tz changes
https://bugzilla.gnome.org/show_bug.cgi?id=665137
2012-09-27 22:12:52 +02:00
Ray Strode
b0e7a5efa8 panels: add register macro
Bastien says he doesn't like the blank class_finalize
functions in every panel and he would like a wrapper
macro to hide them.

This commit does that.
2012-08-21 14:32:33 -04:00
Florian Müllner
afe99e36fd datetime: Add get_help_uri() implementation
https://bugzilla.gnome.org/show_bug.cgi?id=675471
2012-05-18 18:48:37 +02:00
Bastien Nocera
bd41bd788b datetime: Fix broken time setting on 32-bit machines
time_t might be a 32-bit integer, which wouldn't be big enough
to contain the number of microseconds since Epoch (since it can
only fit the number of seconds from Epoch until 2038).

https://bugzilla.redhat.com/show_bug.cgi?id=795792
2012-03-12 16:41:31 +01:00
Bastien Nocera
d70bd4b82a datetime: Fix crashers when systemd is unavailable
https://bugzilla.gnome.org/show_bug.cgi?id=670016
2012-02-14 10:57:29 +00:00
Tomas Bzatek
90f78394f6 datetime: Port to systemd's timedated service
https://bugzilla.gnome.org/show_bug.cgi?id=658352
2012-01-19 22:29:41 +00:00
Tomas Bzatek
befa8cc748 datetime: Fix showing actual clock format on panel open
A small regression after recent switch to radio buttons.
2011-10-07 17:51:20 +02:00
Colin Walters
f708c36fc3 datetime: Use GnomeWallClock instead of periodic timeout
We don't actually use the ::clock property string here - this
is just making it so we don't need to wake up once a second.

https://bugzilla.gnome.org/show_bug.cgi?id=658011
2011-09-21 00:45:41 +02:00
Bastien Nocera
76783e8e27 datetime: Use radio buttons for 24h time
Instead of a switch. For most locales "24h time" doesn't
really have an opposite (as those don't use AM/PM).

https://bugzilla.gnome.org/show_bug.cgi?id=640059
2011-08-26 17:01:23 +01:00
Florian Müllner
ee73a6cf2b datetime: Fix date sensitivity on permission changes
Setting the date manually should be disabled when using NTP, but
the "Network Time" setting is not taken into account when updating
sensitivities after permission changes. As a result, the date is
always editable after unlocking the panel - to fix, take the NTP
setting into account on permission changes.

https://bugzilla.gnome.org/show_bug.cgi?id=652240
2011-06-10 00:12:11 +02:00
Matthias Clasen
be35c2a834 Datetime: Don't add a lockbutton
Instead, implement get_permission to get a lockbutton
in the toolbar.

https://bugzilla.gnome.org/show_bug.cgi?id=650292
2011-05-23 16:10:04 +01:00
Matthias Clasen
5e05b920c4 Datetime: use a gdbus-codegen-erated wrapper
Instead of handrolled, copy-pasted async code for talking to
the date-time-mechanism, use gdbus-codegen to generate one
that looks nicer and is just all-around better.
2011-05-17 11:29:32 -04:00
Bastien Nocera
b28923cc90 datetime: Use GTK+ lock button 2011-05-07 17:46:55 +01:00
Bastien Nocera
647f2a836d datetime: Fix time editing widgets order for RTL
https://bugzilla.gnome.org/show_bug.cgi?id=645425
2011-03-21 21:06:29 +00:00
Alexander Larsson
7c3011c352 Fix include not found for gsettings-desktop-schemas/gdesktop-enums.h
pkg-config --cflags gsettings-desktop-schemas lists:
 $incdir/gsettings-desktop-schemas
and that directory contains a gdesktop-enums.h file, so including
<gsettings-desktop-schemas/gdesktop-enums.h> will fail unless
the parent directory also accidentally got added as -I.
2011-03-18 15:50:05 +01:00
Bastien Nocera
56cd9069ee datetime: Don't crash when the timezone is unknown
Passing "posixrules" to cc_timezone_map_set_timezone() certainly
won't work that well.

https://bugzilla.redhat.com/show_bug.cgi?id=684593
2011-03-15 01:58:29 +00:00
Bastien Nocera
639e87724e datetime: Make 24h setting changeable without unlocking
https://bugzilla.gnome.org/show_bug.cgi?id=643891
2011-03-11 13:16:51 +00:00
Bastien Nocera
0d2903f1c4 datetime: Change combobox when map is clicked
https://bugzilla.redhat.com/show_bug.cgi?id=684072
2011-03-11 13:02:36 +00:00