Commit graph

163 commits

Author SHA1 Message Date
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
05dc928313 datetime: Add API to draw a text bubble on the timezone map
It's currently drawn either west or east of the position marker,
depending where we have more free space.

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
9a3265de24 datetime: Show the timezone map in the original, unscaled size
https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-20 02:21:06 +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
fd4df35093 datetime: Move pixbuf loading out of the draw signal handler
This moves the timezone location marker image loading code to init()
where most of other resources are loaded, making the draw callback
smaller and easier to read. As a plus, it also avoids needless
allocations during each time the map is drawn.

https://bugzilla.gnome.org/show_bug.cgi?id=706253
2013-08-19 18:42:01 +02:00
Kalev Lember
625583974a datetime: Use g_clear_object()
https://bugzilla.gnome.org/show_bug.cgi?id=706253
2013-08-19 18:41:36 +02:00
Kalev Lember
2dfde249ac datetime: New location marker image for the timezone map
The image was drawn by Andreas Nilsson <anilsson@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=706253
2013-08-19 18:40:32 +02:00
Kalev Lember
be79efe242 datetime: Alignment fixes for the location marker on timezone map
Make sure the marker is drawn pixel-aligned to avoid fuzziness, and
ensure that it actually ends up in the visible area.

https://bugzilla.gnome.org/show_bug.cgi?id=706253
2013-08-19 18:40:10 +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
Kalev Lember
c0201168f8 datetime: Resave the .ui file with recent Glade
No functional changes; this is only to minimize changes in subsequent commits
that touch the .ui file.

https://bugzilla.gnome.org/show_bug.cgi?id=694985
2013-08-06 16:09:09 +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
Allan Day
54bcb26f79 datetime: Update panel comments
Very few of the panel comments provide information that is very
useful. Update them to supplement the panel descriptions - this
will make the search results more helpful.

https://bugzilla.gnome.org/show_bug.cgi?id=694110
2013-02-19 10:41:43 +01:00
Cosimo Cecchi
8d5f2908b5 panels: add --sourcedir=$(srcdir) when generating resource list
Like b8e93fb333 but for all panels.
2013-01-07 16:23: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
Matthias Clasen
3d27d8caaf shell: Fittsify panels
Make it possible for panels to go all the way to the edge of the
shell. This is particularly important for panels that scroll, such
as the new power panel. All other panels are changed to compensate
for the loss of external padding.

https://bugzilla.gnome.org/show_bug.cgi?id=691229
2013-01-07 10:51:29 +01:00
Bastien Nocera
e419ee7d4e panels: Remove unused X-GNOME-Settings-Panel key 2012-12-11 17:09:04 +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
43f33b1387 datetime: Use constants for pin nail's location 2012-10-22 10:53:06 +02: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
William Jon McCann
0703d545a5 datetime: make the map insensitive when the panel is locked
https://bugzilla.gnome.org/show_bug.cgi?id=672445
2012-09-03 12:01:42 -04: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
Bastien Nocera
a4475970ee datetime: Use '&' instead of 'and'
Using "&" not only keeps the names shorter but would also keeps the
user focused on the other words which compose the name.

https://bugzilla.gnome.org/show_bug.cgi?id=676562
2012-06-06 17:45:15 +01: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
Alexandre Rostovtsev
824b3e70bc datetime: respect LINGUAS for timezone translations
https://bugzilla.gnome.org/show_bug.cgi?id=670051
2012-02-14 11:00:17 +00: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
Bastien Nocera
dc92ae2fe8 datetime: Don't run gdbus command twice 2012-01-23 13:52:41 +00:00
Colin Walters
c373335717 datetime: Fix srcdir != builddir 2012-01-21 11:08:00 -05: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
Florian Müllner
4cd7b6c6dc .desktop: Drop prefix from X-GNOME-Keywords
The field has now been included in the spec, so use the standardized
name.
2011-12-19 16:26:40 +01:00
Bastien Nocera
6665b60422 panels: Update for Shell API changes 2011-11-07 18:03:14 +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