Merge lp:~larsu/unity-control-center/add-sound-indicator-visible-checkbox into lp:~ubuntu-desktop/unity-control-center/trunk
- add-sound-indicator-visible-checkbox
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~larsu/unity-control-center/add-sound-indicator-visible-checkbox |
Merge into: | lp:~ubuntu-desktop/unity-control-center/trunk |
Diff against target: |
16260 lines (+8170/-3411) 110 files modified
configure.ac (+15/-29) debian/changelog (+134/-0) debian/control (+15/-7) debian/rules (+7/-9) debian/ucc-unity-launcher.py (+24/-0) debian/unity-control-center.install (+1/-0) debian/unity-control-center.migrations (+1/-0) panels/Makefile.am (+1/-0) panels/appearance/appearance.ui (+105/-10) panels/appearance/bg-pictures-source.c (+124/-40) panels/appearance/bg-pictures-source.h (+2/-0) panels/appearance/cc-appearance-panel.c (+151/-51) panels/bluetooth/Makefile.am (+13/-6) panels/bluetooth/bluetooth.gresource.xml (+6/-0) panels/bluetooth/bluetooth.ui (+24/-2) panels/bluetooth/cc-bluetooth-panel.c (+30/-10) panels/color/cc-color-panel.c (+1/-1) panels/common/list-languages.c (+0/-2) panels/datetime/Makefile.am (+58/-0) panels/datetime/com.canonical.controlcenter.datetime.policy.in (+21/-0) panels/datetime/datetime-dialog.ui (+864/-0) panels/datetime/datetime-prefs-locations.c (+681/-0) panels/datetime/datetime-prefs-locations.h (+35/-0) panels/datetime/datetime-prefs.c (+860/-0) panels/datetime/icons/scalable/unity-datetime-panel.svg (+861/-0) panels/datetime/settings-shared.h (+50/-0) panels/datetime/unity-datetime-panel.desktop.in.in (+12/-0) panels/datetime/utils.c (+468/-0) panels/datetime/utils.h (+66/-0) panels/display/cc-display-panel.c (+130/-18) panels/display/display-capplet.ui (+107/-44) panels/info/Makefile.am (+12/-1) panels/info/cc-info-panel.c (+109/-246) panels/info/info.ui (+12/-191) panels/info/logo-generator.vala (+47/-0) panels/info/unity-info-panel.desktop.in.in (+1/-1) panels/keyboard/gnome-keyboard-panel.ui (+1/-0) panels/mouse/gnome-mouse-properties.c (+1/-1) panels/mouse/gnome-mouse-test.c (+1/-1) panels/network/net-device-wifi.c (+5/-5) panels/power/cc-power-panel.c (+1/-1) panels/printers/cc-printers-panel.c (+2/-2) panels/printers/pp-ppd-option-widget.c (+3/-3) panels/region/cc-region-panel.c (+9/-9) panels/region/gnome-region-panel-input.c (+288/-42) panels/screen/cc-screen-panel.c (+2/-0) panels/sound/gvc-balance-bar.c (+6/-4) panels/sound/gvc-channel-bar.c (+46/-27) panels/sound/gvc-channel-bar.h (+3/-0) panels/sound/gvc-combo-box.c (+3/-2) panels/sound/gvc-mixer-dialog.c (+82/-40) panels/sound/gvc-sound-theme-chooser.c (+2/-1) panels/user-accounts/Makefile.am (+15/-15) panels/user-accounts/data/Makefile.am (+1/-12) panels/user-accounts/data/account-dialog.ui (+3/-1) panels/user-accounts/data/account-fingerprint.ui (+1/-1) panels/user-accounts/data/history-dialog.ui (+175/-0) panels/user-accounts/data/icons/Makefile.am (+0/-32) panels/user-accounts/data/password-dialog.ui (+7/-2) panels/user-accounts/data/photo-dialog.ui (+1/-0) panels/user-accounts/data/user-accounts-dialog.ui (+137/-45) panels/user-accounts/frob-account-dialog.c (+3/-3) panels/user-accounts/um-account-dialog.c (+110/-43) panels/user-accounts/um-account-dialog.h (+3/-2) panels/user-accounts/um-fingerprint-dialog.c (+12/-18) panels/user-accounts/um-fingerprint-dialog.h (+2/-2) panels/user-accounts/um-history-dialog.c (+377/-0) panels/user-accounts/um-history-dialog.h (+41/-0) panels/user-accounts/um-password-dialog.c (+125/-62) panels/user-accounts/um-password-dialog.h (+2/-2) panels/user-accounts/um-photo-dialog.c (+21/-22) panels/user-accounts/um-photo-dialog.h (+2/-2) panels/user-accounts/um-realm-manager.c (+13/-4) panels/user-accounts/um-realm-manager.h (+1/-0) panels/user-accounts/um-user-manager.c (+0/-734) panels/user-accounts/um-user-manager.h (+0/-121) panels/user-accounts/um-user-module.c (+1/-1) panels/user-accounts/um-user-panel.c (+351/-190) panels/user-accounts/um-user-panel.h (+13/-15) panels/user-accounts/um-user.c (+0/-991) panels/user-accounts/um-user.h (+0/-109) panels/user-accounts/um-utils.c (+333/-7) panels/user-accounts/um-utils.h (+18/-0) panels/user-accounts/user-accounts.gresource.xml (+23/-0) panels/wacom/Makefile.am (+15/-19) panels/wacom/calibrator/Makefile.am (+0/-3) panels/wacom/calibrator/gui_gtk.c (+2/-2) panels/wacom/cc-wacom-nav-button.c (+7/-2) panels/wacom/cc-wacom-page.c (+69/-46) panels/wacom/cc-wacom-panel.c (+10/-8) panels/wacom/cc-wacom-stylus-page.c (+8/-11) panels/wacom/gnome-wacom-properties.ui (+3/-3) panels/wacom/gsd-enums.h (+1/-1) panels/wacom/gsd-input-helper.c (+36/-3) panels/wacom/gsd-input-helper.h (+3/-0) panels/wacom/gsd-wacom-device.c (+239/-45) panels/wacom/gsd-wacom-device.h (+26/-3) panels/wacom/unity-wacom-panel.desktop.in.in (+1/-1) panels/wacom/wacom.gresource.xml (+16/-0) po/POTFILES.in (+8/-1) shell/Makefile.am (+6/-0) shell/cc-editable-entry.c (+127/-1) shell/cc-editable-entry.h (+9/-0) shell/cc-shell-model.c (+6/-2) shell/completions/unity-control-center.in (+56/-0) shell/control-center.c (+8/-2) shell/gnome-control-center.c (+209/-13) shell/gnome-control-center.h (+3/-0) shell/list-panel.sh (+8/-0) shell/shell.ui (+0/-3) |
To merge this branch: | bzr merge lp:~larsu/unity-control-center/add-sound-indicator-visible-checkbox |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Desktop | Pending | ||
Review via email: mp+209025@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-03-03.
Commit message
Add "Show sound volume in the menu bar" check box
Description of the change
Add "Show sound volume in the menu bar" check box
- 12742. By Lars Karlitski
-
Merge trunk
Unmerged revisions
- 12742. By Lars Karlitski
-
Merge trunk
- 12741. By Lars Karlitski
-
Add "Show sound volume in the menu bar" check box
- 12740. By Lars Karlitski
-
Rename indicator_settings to sound_settings
- 12739. By PS Jenkins bot
-
Releasing 14.04.3+
14.04.20140226- 0ubuntu1 - 12738. By Sebastien Bacher
-
Backport some bugfixes and small improvements Fixes: 1280742
- 12737. By Robert Ancell
-
Compile with unity-settings-
daemon instead of gnome-settings- daemon Fixes: 1277585 - 12736. By Eleni Maria Stea
-
In display add_dict_entry:
replaced the gvariant arrays with gvariant builder to simplify the code - 12735. By Sebastien Bacher
-
shell: don't set a secondary icon, GtkSearchEntry already has one
- 12734. By Sebastien Bacher
-
shell: backport fixes from gnome-3-8. Those include some tweaks to the
command line options, improvements to the keyboard navigation in the icons
grid, and support for bash completion - 12733. By PS Jenkins bot
-
Releasing 14.04.3+
14.04.20140225- 0ubuntu1
Preview Diff
1 | === modified file 'configure.ac' |
2 | --- configure.ac 2014-01-28 22:26:00 +0000 |
3 | +++ configure.ac 2014-03-03 10:09:16 +0000 |
4 | @@ -1,4 +1,4 @@ |
5 | -m4_define([unity_control_center_version], 14.04.2) |
6 | +m4_define([unity_control_center_version], 14.04.3) |
7 | AC_INIT([unity-control-center], [unity_control_center_version]) |
8 | |
9 | AC_CONFIG_SRCDIR([shell]) |
10 | @@ -70,17 +70,6 @@ |
11 | |
12 | AC_CHECK_LIB(m, floor) |
13 | |
14 | -AC_ARG_ENABLE([systemd], |
15 | - AS_HELP_STRING([--enable-systemd], [Use systemd]), |
16 | - [with_systemd=$enableval], |
17 | - [with_systemd=no]) |
18 | -if test "$with_systemd" = "yes" ; then |
19 | - SYSTEMD=libsystemd-login |
20 | - AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd is available]) |
21 | -else |
22 | - SYSTEMD= |
23 | -fi |
24 | - |
25 | # IBus support |
26 | IBUS_REQUIRED_VERSION=1.4.99 |
27 | |
28 | @@ -102,19 +91,19 @@ |
29 | dnl ============================================== |
30 | |
31 | GLIB_REQUIRED_VERSION=2.31.2 |
32 | -GTK_REQUIRED_VERSION=3.5.13 |
33 | +GTK_REQUIRED_VERSION=3.10.0 |
34 | PA_REQUIRED_VERSION=2.0 |
35 | CANBERRA_REQUIRED_VERSION=0.13 |
36 | GDKPIXBUF_REQUIRED_VERSION=2.23.0 |
37 | POLKIT_REQUIRED_VERSION=0.103 |
38 | -GSD_REQUIRED_VERSION=3.6.0 |
39 | NETWORK_MANAGER_REQUIRED_VERSION=0.8.992 |
40 | LIBNOTIFY_REQUIRED_VERSION=0.7.3 |
41 | GNOME_DESKTOP_REQUIRED_VERSION=3.5.91 |
42 | SCHEMAS_REQUIRED_VERSION=3.7.2.2 |
43 | -LIBWACOM_REQUIRED_VERSION=0.6 |
44 | +LIBWACOM_REQUIRED_VERSION=0.7 |
45 | CLUTTER_REQUIRED_VERSION=1.11.3 |
46 | GOA_REQUIRED_VERSION=3.5.90 |
47 | +ACCOUNTSSERVICE_REQUIRED_VERSION=0.6.30 |
48 | |
49 | COMMON_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION |
50 | glib-2.0 >= $GLIB_REQUIRED_VERSION |
51 | @@ -130,10 +119,8 @@ |
52 | PKG_CHECK_MODULES(SHELL, $COMMON_MODULES libgnome-menu-3.0 gio-unix-2.0 x11) |
53 | PKG_CHECK_MODULES(APPEARANCE_PANEL, $COMMON_MODULES libxml-2.0 gnome-desktop-3.0 |
54 | gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION) |
55 | -PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES |
56 | - gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION |
57 | - polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION |
58 | - gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION) |
59 | +PKG_CHECK_MODULES(DATETIME_PANEL, $COMMON_MODULES timezonemap |
60 | + polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) |
61 | PKG_CHECK_MODULES(DISPLAY_PANEL, $COMMON_MODULES gnome-desktop-3.0 >= 3.1.0 x11) |
62 | PKG_CHECK_MODULES(INFO_PANEL, $COMMON_MODULES libgtop-2.0 gl x11 |
63 | polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION webkitgtk-3.0) |
64 | @@ -142,10 +129,10 @@ |
65 | x11) |
66 | PKG_CHECK_MODULES(MEDIA_PANEL, $COMMON_MODULES) |
67 | PKG_CHECK_MODULES(MOUSE_PANEL, $COMMON_MODULES xi >= 1.2 |
68 | - gnome-settings-daemon >= $GSD_REQUIRED_VERSION x11) |
69 | + unity-settings-daemon x11) |
70 | PKG_CHECK_MODULES(NETWORK_PANEL, $COMMON_MODULES) |
71 | PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1 |
72 | - gnome-settings-daemon >= $GSD_REQUIRED_VERSION) |
73 | + unity-settings-daemon) |
74 | PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8) |
75 | PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES |
76 | polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION) |
77 | @@ -165,7 +152,9 @@ |
78 | gnome-desktop-3.0 |
79 | gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED_VERSION |
80 | pwquality |
81 | - $SYSTEMD) |
82 | + accountsservice >= $ACCOUNTSSERVICE_REQUIRED_VERSION) |
83 | + |
84 | +AM_PROG_VALAC([0.20.0]) |
85 | |
86 | GDESKTOP_PREFIX=`$PKG_CONFIG --variable prefix gsettings-desktop-schemas` |
87 | AC_SUBST(GDESKTOP_PREFIX) |
88 | @@ -245,9 +234,10 @@ |
89 | have_wacom=no |
90 | else |
91 | PKG_CHECK_MODULES(WACOM_PANEL, $COMMON_MODULES |
92 | - gnome-settings-daemon >= $GSD_REQUIRED_VERSION |
93 | + unity-settings-daemon |
94 | xi >= 1.2 x11 libwacom >= $LIBWACOM_REQUIRED_VERSION |
95 | gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION) |
96 | + AC_DEFINE(BUILD_WACOM, 1, [Define to 1 to build the Wacom panel]) |
97 | have_wacom=yes |
98 | fi |
99 | ;; |
100 | @@ -412,6 +402,8 @@ |
101 | panels/appearance/unity-appearance-panel.desktop.in |
102 | panels/bluetooth/Makefile |
103 | panels/bluetooth/unity-bluetooth-panel.desktop.in |
104 | +panels/datetime/Makefile |
105 | +panels/datetime/unity-datetime-panel.desktop.in |
106 | panels/display/Makefile |
107 | panels/display/unity-display-panel.desktop.in |
108 | panels/keyboard/Makefile |
109 | @@ -477,7 +469,6 @@ |
110 | panels/user-accounts/Makefile |
111 | panels/user-accounts/data/Makefile |
112 | panels/user-accounts/data/unity-user-accounts-panel.desktop.in |
113 | -panels/user-accounts/data/icons/Makefile |
114 | panels/wacom/Makefile |
115 | panels/wacom/calibrator/Makefile |
116 | panels/wacom/unity-wacom-panel.desktop.in |
117 | @@ -513,11 +504,6 @@ |
118 | else |
119 | AC_MSG_NOTICE([ Appearance panel Flickr support disabled]) |
120 | fi |
121 | -if test "x$with_systemd" = "xyes"; then |
122 | - AC_MSG_NOTICE([** systemd (Systemd session tracking)]) |
123 | -else |
124 | - AC_MSG_NOTICE([ Using ConsoleKit for session tracking]) |
125 | -fi |
126 | if test "x$have_wacom" = "xyes"; then |
127 | AC_MSG_NOTICE([** wacom (Wacom tablet panel)]) |
128 | else |
129 | |
130 | === modified file 'debian/changelog' |
131 | --- debian/changelog 2014-01-31 10:50:22 +0000 |
132 | +++ debian/changelog 2014-03-03 10:09:16 +0000 |
133 | @@ -1,3 +1,137 @@ |
134 | +unity-control-center (14.04.3+14.04.20140226-0ubuntu1) trusty; urgency=low |
135 | + |
136 | + [ Robert Ancell ] |
137 | + * Compile with unity-settings-daemon instead of gnome-settings-daemon |
138 | + (LP: #1277585) |
139 | + |
140 | + [ Sebastien Bacher ] |
141 | + * shell: backport fixes from gnome-3-8. Those include some tweaks to |
142 | + the command line options, improvements to the keyboard navigation in |
143 | + the icons grid, and support for bash completion |
144 | + * shell: don't set a secondary icon, GtkSearchEntry already has one |
145 | + * Backport some bugfixes and small improvements (LP: #1280742) |
146 | + |
147 | + [ Eleni Maria Stea ] |
148 | + * In display add_dict_entry: replaced the gvariant arrays with |
149 | + gvariant builder to simplify the code |
150 | + |
151 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 26 Feb 2014 20:01:37 +0000 |
152 | + |
153 | +unity-control-center (14.04.3+14.04.20140225-0ubuntu1) trusty; urgency=low |
154 | + |
155 | + [ Sebastien Bacher ] |
156 | + * update to the GNOME 3.8 codebase, remove quite some custom code to |
157 | + use libaccountsservice. The update also includes a view of the login |
158 | + history informations and bugfixes. |
159 | + |
160 | + [ Eleni Maria Stea ] |
161 | + * fixed race condition when the monitor is not detected correctly (and |
162 | + the monitor name is null) added a mark in 1.0 (default value) (LP: |
163 | + #1283297) |
164 | + |
165 | + [ Lars Uebernickel ] |
166 | + * sound/gvc-{balance,channel}-bar: let scales use all the available |
167 | + space |
168 | + |
169 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 25 Feb 2014 09:34:37 +0000 |
170 | + |
171 | +unity-control-center (14.04.3+14.04.20140224-0ubuntu1) trusty; urgency=low |
172 | + |
173 | + [ Sebastien Bacher ] |
174 | + * Use new sound key, avoid depending on indicator-sound |
175 | + |
176 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 24 Feb 2014 14:36:20 +0000 |
177 | + |
178 | +unity-control-center (14.04.3+14.04.20140221-0ubuntu1) trusty; urgency=low |
179 | + |
180 | + [ Sebastien Bacher ] |
181 | + * bluetooth: let hide the bluetooth indicator, thanks Charles Kerr |
182 | + (LP: #829690) |
183 | + |
184 | + [ Dimitri John Ledkov ] |
185 | + * Regenerate versioned logo. |
186 | + |
187 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Fri, 21 Feb 2014 18:46:27 +0000 |
188 | + |
189 | +unity-control-center (14.04.3+14.04.20140220.2-0ubuntu1) trusty; urgency=low |
190 | + |
191 | + [ William Hua ] |
192 | + * Support legacy method of launching IBus setup panels. |
193 | + * Fix incorrect unref which was causing a critical on the region |
194 | + panel. |
195 | + |
196 | + [ Lars Uebernickel ] |
197 | + * sound: various UI tweaks Most importantly, add a "allow louder than |
198 | + 100%" checkbox (feeding from a key in com.canonical.indicator.sound) |
199 | + that controls whether output volume can be amplified. |
200 | + |
201 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 20 Feb 2014 21:18:01 +0000 |
202 | + |
203 | +unity-control-center (14.04.3+14.04.20140220.1-0ubuntu1) trusty; urgency=low |
204 | + |
205 | + [ Sebastien Bacher ] |
206 | + * info: backport fixes and cleanings from gnome-3-8 |
207 | + * [bluetooth] backport some upstream changes |
208 | + |
209 | + [ Iain Lane ] |
210 | + * gsettings-ubuntu-schemas should be in Depends, not Build Depends |
211 | + |
212 | + [ Marco Trevisan (TreviƱo) ] |
213 | + * Appearance: Add Application Menu settings to Unity behaviour tab |
214 | + |
215 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 20 Feb 2014 18:22:53 +0000 |
216 | + |
217 | +unity-control-center (14.04.3+14.04.20140220-0ubuntu1) trusty; urgency=low |
218 | + |
219 | + [ Eleni Maria Stea ] |
220 | + * Add a slider that can change the fonts-scale-factor gsetting (per |
221 | + monitor text scaling factor) |
222 | + |
223 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Thu, 20 Feb 2014 10:43:50 +0000 |
224 | + |
225 | +unity-control-center (14.04.3+14.04.20140219-0ubuntu1) trusty; urgency=low |
226 | + |
227 | + [ Robert Ancell ] |
228 | + * Fix various compile warnings. |
229 | + * Stop using deprecated GtkStock. |
230 | + * Stop using deprecated GdkColor. |
231 | + * Use appropriate GSettings API for checking existence of schemas. |
232 | + * Backport Wacom panel from GNOME Control Center 3.8 |
233 | + |
234 | + -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Wed, 19 Feb 2014 10:42:13 +0000 |
235 | + |
236 | +unity-control-center (14.04.3-0ubuntu1) trusty; urgency=medium |
237 | + |
238 | + * Add option to toggle username in session indicator (LP: #1116497) |
239 | + |
240 | + [ Sebastian Bacher ] |
241 | + * debian/control.in: |
242 | + - Build-Depends on dh-migrations |
243 | + * debian/unity-control-center.migrations, debian/ucc-unity-launcher.py: |
244 | + - script to migration the g-c-c Unity's launcher entry to u-c-c |
245 | + * debian/rules: |
246 | + - clean some leftover references to g-c-c |
247 | + - use dh_migrations. |
248 | + |
249 | + -- Robert Ancell <robert.ancell@canonical.com> Tue, 18 Feb 2014 12:12:04 +1300 |
250 | + |
251 | +unity-control-center (14.04.2-0ubuntu1) trusty; urgency=medium |
252 | + |
253 | + * Merge in datetime panel from indicator-datetime |
254 | + * Backport commit to fix notebook spacing issues. |
255 | + * Let the launcher icons be scaled down to 16. (LP: #1168409). |
256 | + * keyboard: wrap information label in the shortcuts panel. (LP: #1276119). |
257 | + |
258 | + -- Robert Ancell <robert.ancell@canonical.com> Fri, 14 Feb 2014 14:28:24 +1300 |
259 | + |
260 | +unity-control-center (14.04.1-0ubuntu5) trusty; urgency=medium |
261 | + |
262 | + * debian/control: |
263 | + - Run with either gnome-settings-daemon or unity-settings-daemon |
264 | + (LP: #1277487) |
265 | + |
266 | + -- Robert Ancell <robert.ancell@canonical.com> Fri, 07 Feb 2014 16:22:09 +0000 |
267 | + |
268 | unity-control-center (14.04.1-0ubuntu4) trusty; urgency=medium |
269 | |
270 | * don't set the alignment of a frame that doesn't exist, fixes a warning |
271 | |
272 | === modified file 'debian/control' |
273 | --- debian/control 2014-01-28 22:26:00 +0000 |
274 | +++ debian/control 2014-03-03 10:09:16 +0000 |
275 | @@ -6,14 +6,16 @@ |
276 | Build-Depends: autotools-dev, |
277 | cdbs (>= 0.4.41), |
278 | debhelper (>= 9), |
279 | + dh-migrations, |
280 | desktop-file-utils, |
281 | gtk-doc-tools, |
282 | gnome-common, |
283 | gnome-pkg-tools (>= 0.10), |
284 | - gnome-settings-daemon-dev (>= 3.8.4), |
285 | + unity-settings-daemon-dev, |
286 | gsettings-desktop-schemas-dev (>= 3.7.2.2), |
287 | hardening-wrapper, |
288 | intltool (>= 0.37.1), |
289 | + libaccountsservice-dev (>= 0.6.30), |
290 | libcanberra-gtk3-dev, |
291 | libcheese-gtk-dev (>= 2.91.91.1), |
292 | libcolord-dev, |
293 | @@ -28,7 +30,7 @@ |
294 | libgnomekbd-dev, |
295 | libgoa-1.0-dev (>= 3.5.90), |
296 | libgstreamer-plugins-base0.10-dev, |
297 | - libgtk-3-dev (>= 3.5.13), |
298 | + libgtk-3-dev (>= 3.10.0), |
299 | libgtop2-dev, |
300 | libibus-1.0-dev (>= 1.5.0), |
301 | libnm-glib-dev (>= 0.9) [linux-any], |
302 | @@ -39,8 +41,8 @@ |
303 | libpulse-dev (>= 1:2.0), |
304 | libpwquality-dev, |
305 | libupower-glib-dev (>= 0.9.1), |
306 | - libsystemd-login-dev, |
307 | - libwacom-dev (>= 0.6), |
308 | + libtimezonemap1-dev, |
309 | + libwacom-dev (>= 0.7), |
310 | libx11-dev, |
311 | libxft-dev (>= 2.1.2), |
312 | libxkbfile-dev, |
313 | @@ -49,8 +51,10 @@ |
314 | locales, |
315 | network-manager-dev (>= 0.9) [linux-any], |
316 | shared-mime-info, |
317 | + ttf-ubuntu-font-family, |
318 | libwebkitgtk-3.0-dev, |
319 | libgl1-mesa-dev, |
320 | + valac (>= 0.20.0), |
321 | Vcs-Bzr: http://code.launchpad.net/~ubuntu-desktop/gnome-control-center/ubuntu |
322 | |
323 | Package: unity-control-center |
324 | @@ -66,8 +70,9 @@ |
325 | gnome-icon-theme (>= 2.24), |
326 | gnome-icon-theme-symbolic, |
327 | gnome-menus (>= 2.12.0), |
328 | - gnome-settings-daemon (>= 3.8.4), |
329 | + unity-settings-daemon, |
330 | gsettings-desktop-schemas (>= 3.5.91), |
331 | + gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224), |
332 | Recommends: cups-pk-helper, |
333 | gnome-session-bin, |
334 | ubuntu-system-service, |
335 | @@ -77,8 +82,10 @@ |
336 | policykit-1-gnome, |
337 | libcanberra-pulse, |
338 | system-config-printer-gnome |
339 | -Conflicts: gnome-control-center (<< 1:3.6.3-0ubuntu50) |
340 | -Replaces: gnome-bluetooth (<< 3.4.0) |
341 | +Conflicts: gnome-control-center (<< 1:3.6.3-0ubuntu50), |
342 | + unity-control-center-datetime |
343 | +Replaces: gnome-bluetooth (<< 3.4.0), |
344 | + unity-control-center-datetime |
345 | Breaks: gnome-power-manager (<< 3.0), |
346 | gnome-session (<< 3.0), |
347 | libglib2.0-0 (<< 2.28.6-2), |
348 | @@ -91,6 +98,7 @@ |
349 | gstreamer0.10-pulseaudio, |
350 | libcanberra-gtk-module, |
351 | x11-xserver-utils |
352 | +Provides: unity-control-center-datetime |
353 | Description: utilities to configure the GNOME desktop |
354 | This package contains configuration applets for the GNOME desktop, |
355 | allowing to set accessibility configuration, desktop fonts, keyboard |
356 | |
357 | === modified file 'debian/rules' |
358 | --- debian/rules 2013-12-02 00:26:01 +0000 |
359 | +++ debian/rules 2014-03-03 10:09:16 +0000 |
360 | @@ -11,14 +11,12 @@ |
361 | |
362 | DEB_CONFIGURE_SCRIPT := ./autogen.sh |
363 | DEB_CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ |
364 | - --disable-update-mimedb \ |
365 | - --enable-systemd |
366 | - |
367 | -DEB_DH_MAKESHLIBS_ARGS_gnome-control-center = --no-act |
368 | - |
369 | -binary-post-install/gnome-control-center-data:: |
370 | - rm -rf debian/capplets-data/usr/share/applications/mimeinfo.cache |
371 | - rm -rf debian/capplets-data/usr/share/pkgconfig |
372 | - dh_installmime -p$(cdbs_curpkg) |
373 | + --disable-update-mimedb |
374 | + |
375 | +DEB_DH_MAKESHLIBS_ARGS_unity-control-center = --no-act |
376 | + |
377 | +binary-post-install/unity-control-center:: |
378 | + dh_migrations -p$(cdbs_curpkg) |
379 | + ./panels/info/logo-generator --logo panels/info/UbuntuLogoBlank.png --text "ubuntu 14.04 LTS" --output debian/unity-control-center/usr/share/unity-control-center/ui/UbuntuLogo.png |
380 | |
381 | common-binary-post-install-arch:: list-missing |
382 | |
383 | === added file 'debian/ucc-unity-launcher.py' |
384 | --- debian/ucc-unity-launcher.py 1970-01-01 00:00:00 +0000 |
385 | +++ debian/ucc-unity-launcher.py 2014-03-03 10:09:16 +0000 |
386 | @@ -0,0 +1,24 @@ |
387 | +#!/usr/bin/python |
388 | +# -*- coding: utf-8 -*- |
389 | +# Copyright (C) 2013 Canonical |
390 | + |
391 | +from gi.repository import Gio |
392 | +import os,sys |
393 | + |
394 | +if "com.canonical.Unity.Launcher" not in Gio.Settings.list_schemas(): |
395 | + print("No unity schemas found, no migration needed") |
396 | + sys.exit(0) |
397 | + |
398 | +gsettings=Gio.Settings(schema="com.canonical.Unity.Launcher", path="/com/canonical/unity/launcher/") |
399 | +launcher_list = gsettings.get_strv("favorites") |
400 | + |
401 | +# Replace g-c-c by u-c-c in the unity launcher |
402 | +try: |
403 | + idx=launcher_list.index("application://gnome-control-center.desktop") |
404 | + launcher_list[idx]="application://unity-control-center.desktop" |
405 | +except ValueError: |
406 | + pass |
407 | +# gsettings doesn't work directly, the key is somewhat reverted. Work one level under then: dconf! |
408 | +from subprocess import Popen, PIPE, STDOUT |
409 | +p = Popen(['dconf', 'load', '/com/canonical/unity/launcher/'], stdout=PIPE, stdin=PIPE, stderr=STDOUT) |
410 | +p.communicate(input="[/]\nfavorites={}".format(launcher_list).encode('utf-8')) |
411 | |
412 | === modified file 'debian/unity-control-center.install' |
413 | --- debian/unity-control-center.install 2013-12-11 23:12:25 +0000 |
414 | +++ debian/unity-control-center.install 2014-03-03 10:09:16 +0000 |
415 | @@ -2,6 +2,7 @@ |
416 | usr/bin |
417 | usr/lib/*/unity-control-center-1/panels/*.so |
418 | usr/share/applications |
419 | +usr/share/bash-completion |
420 | usr/share/man |
421 | usr/share/unity-control-center |
422 | usr/share/desktop-directories |
423 | |
424 | === added file 'debian/unity-control-center.migrations' |
425 | --- debian/unity-control-center.migrations 1970-01-01 00:00:00 +0000 |
426 | +++ debian/unity-control-center.migrations 2014-03-03 10:09:16 +0000 |
427 | @@ -0,0 +1,1 @@ |
428 | +debian/ucc-unity-launcher.py |
429 | |
430 | === modified file 'panels/Makefile.am' |
431 | --- panels/Makefile.am 2013-12-03 03:04:42 +0000 |
432 | +++ panels/Makefile.am 2014-03-03 10:09:16 +0000 |
433 | @@ -1,6 +1,7 @@ |
434 | SUBDIRS= \ |
435 | appearance \ |
436 | common \ |
437 | + datetime \ |
438 | screen \ |
439 | power \ |
440 | color \ |
441 | |
442 | === modified file 'panels/appearance/appearance.ui' |
443 | --- panels/appearance/appearance.ui 2014-01-28 22:26:00 +0000 |
444 | +++ panels/appearance/appearance.ui 2014-03-03 10:09:16 +0000 |
445 | @@ -363,9 +363,6 @@ |
446 | <property name="can_focus">False</property> |
447 | <property name="toolbar_style">icons</property> |
448 | <property name="icon_size">1</property> |
449 | - <style> |
450 | - <class name="inline-toolbar"/> |
451 | - </style> |
452 | <child> |
453 | <object class="GtkToolButton" id="add_button"> |
454 | <property name="visible">True</property> |
455 | @@ -393,6 +390,9 @@ |
456 | <property name="homogeneous">True</property> |
457 | </packing> |
458 | </child> |
459 | + <style> |
460 | + <class name="inline-toolbar"/> |
461 | + </style> |
462 | </object> |
463 | <packing> |
464 | <property name="expand">False</property> |
465 | @@ -883,10 +883,111 @@ |
466 | </packing> |
467 | </child> |
468 | <child> |
469 | + <object class="GtkSeparator" id="separator4"> |
470 | + <property name="visible">True</property> |
471 | + <property name="can_focus">False</property> |
472 | + </object> |
473 | + <packing> |
474 | + <property name="expand">False</property> |
475 | + <property name="fill">True</property> |
476 | + <property name="position">3</property> |
477 | + </packing> |
478 | + </child> |
479 | + <child> |
480 | + <object class="GtkBox" id="unity_menus_box"> |
481 | + <property name="visible">True</property> |
482 | + <property name="can_focus">False</property> |
483 | + <property name="margin_left">10</property> |
484 | + <property name="margin_right">10</property> |
485 | + <property name="border_width">0</property> |
486 | + <property name="orientation">vertical</property> |
487 | + <property name="spacing">2</property> |
488 | + <child> |
489 | + <object class="GtkLabel" id="label3"> |
490 | + <property name="visible">True</property> |
491 | + <property name="can_focus">False</property> |
492 | + <property name="xalign">0</property> |
493 | + <property name="label" translatable="yes"><b>Application Menu</b></property> |
494 | + <property name="use_markup">True</property> |
495 | + </object> |
496 | + <packing> |
497 | + <property name="expand">False</property> |
498 | + <property name="fill">True</property> |
499 | + <property name="position">0</property> |
500 | + </packing> |
501 | + </child> |
502 | + <child> |
503 | + <object class="GtkBox" id="unity_menus_type_box"> |
504 | + <property name="visible">True</property> |
505 | + <property name="can_focus">False</property> |
506 | + <property name="margin_left">10</property> |
507 | + <property name="margin_top">9</property> |
508 | + <property name="orientation">vertical</property> |
509 | + <child> |
510 | + <object class="GtkRadioButton" id="unity_global_menus"> |
511 | + <property name="label" translatable="yes">In top bar</property> |
512 | + <property name="visible">True</property> |
513 | + <property name="can_focus">True</property> |
514 | + <property name="receives_default">False</property> |
515 | + <property name="xalign">0</property> |
516 | + <property name="active">True</property> |
517 | + <property name="draw_indicator">True</property> |
518 | + <property name="group">unity_local_menus</property> |
519 | + </object> |
520 | + <packing> |
521 | + <property name="expand">False</property> |
522 | + <property name="fill">True</property> |
523 | + <property name="position">1</property> |
524 | + </packing> |
525 | + </child> |
526 | + <child> |
527 | + <object class="GtkRadioButton" id="unity_local_menus"> |
528 | + <property name="label" translatable="yes">In window title bars</property> |
529 | + <property name="visible">True</property> |
530 | + <property name="can_focus">True</property> |
531 | + <property name="receives_default">False</property> |
532 | + <property name="xalign">0</property> |
533 | + <property name="draw_indicator">True</property> |
534 | + <property name="group">unity_global_menus</property> |
535 | + </object> |
536 | + <packing> |
537 | + <property name="expand">False</property> |
538 | + <property name="fill">True</property> |
539 | + <property name="position">2</property> |
540 | + </packing> |
541 | + </child> |
542 | + </object> |
543 | + <packing> |
544 | + <property name="expand">False</property> |
545 | + <property name="fill">True</property> |
546 | + <property name="position">2</property> |
547 | + </packing> |
548 | + </child> |
549 | + </object> |
550 | + <packing> |
551 | + <property name="expand">False</property> |
552 | + <property name="fill">True</property> |
553 | + <property name="padding">5</property> |
554 | + <property name="position">4</property> |
555 | + </packing> |
556 | + </child> |
557 | + <child> |
558 | + <object class="GtkSeparator" id="menu_separator"> |
559 | + <property name="visible">True</property> |
560 | + <property name="can_focus">False</property> |
561 | + </object> |
562 | + <packing> |
563 | + <property name="expand">False</property> |
564 | + <property name="fill">True</property> |
565 | + <property name="position">5</property> |
566 | + </packing> |
567 | + </child> |
568 | + <child> |
569 | <object class="GtkBox" id="box5"> |
570 | <property name="height_request">36</property> |
571 | <property name="visible">True</property> |
572 | <property name="can_focus">False</property> |
573 | + <property name="margin_top">10</property> |
574 | <child> |
575 | <object class="GtkButton" id="button-restore-unitybehavior"> |
576 | <property name="label" translatable="yes">Restore Default Behaviours</property> |
577 | @@ -909,15 +1010,9 @@ |
578 | <packing> |
579 | <property name="expand">False</property> |
580 | <property name="fill">True</property> |
581 | - <property name="position">3</property> |
582 | + <property name="position">6</property> |
583 | </packing> |
584 | </child> |
585 | - <child> |
586 | - <placeholder/> |
587 | - </child> |
588 | - <child> |
589 | - <placeholder/> |
590 | - </child> |
591 | </object> |
592 | <packing> |
593 | <property name="position">1</property> |
594 | |
595 | === modified file 'panels/appearance/bg-pictures-source.c' |
596 | --- panels/appearance/bg-pictures-source.c 2013-12-02 02:45:53 +0000 |
597 | +++ panels/appearance/bg-pictures-source.c 2014-03-03 10:09:16 +0000 |
598 | @@ -45,6 +45,14 @@ |
599 | GHashTable *known_items; |
600 | }; |
601 | |
602 | +const char * const content_types[] = { |
603 | + "image/png", |
604 | + "image/jpeg", |
605 | + "image/bmp", |
606 | + "image/svg+xml", |
607 | + NULL |
608 | +}; |
609 | + |
610 | static char *bg_pictures_source_get_unique_filename (const char *uri); |
611 | |
612 | static void |
613 | @@ -127,32 +135,91 @@ |
614 | object_class->finalize = bg_pictures_source_finalize; |
615 | } |
616 | |
617 | +static int |
618 | +sort_func (GtkTreeModel *model, |
619 | + GtkTreeIter *a, |
620 | + GtkTreeIter *b, |
621 | + BgPicturesSource *bg_source) |
622 | +{ |
623 | + CcAppearanceItem *item_a; |
624 | + CcAppearanceItem *item_b; |
625 | + const char *name_a; |
626 | + const char *name_b; |
627 | + int retval; |
628 | + |
629 | + gtk_tree_model_get (model, a, |
630 | + 1, &item_a, |
631 | + -1); |
632 | + gtk_tree_model_get (model, b, |
633 | + 1, &item_b, |
634 | + -1); |
635 | + |
636 | + name_a = cc_appearance_item_get_name (item_a); |
637 | + name_b = cc_appearance_item_get_name (item_b); |
638 | + |
639 | + retval = g_utf8_collate (name_a, name_b); |
640 | + |
641 | + g_object_unref (item_a); |
642 | + g_object_unref (item_b); |
643 | + |
644 | + return retval; |
645 | +} |
646 | + |
647 | static void |
648 | picture_scaled (GObject *source_object, |
649 | GAsyncResult *res, |
650 | gpointer user_data) |
651 | { |
652 | - BgPicturesSource *bg_source = BG_PICTURES_SOURCE (user_data); |
653 | + BgPicturesSource *bg_source; |
654 | CcAppearanceItem *item; |
655 | GError *error = NULL; |
656 | GdkPixbuf *pixbuf; |
657 | const char *source_url; |
658 | - |
659 | + const char *software; |
660 | GtkTreeIter iter; |
661 | GtkListStore *store; |
662 | |
663 | - store = bg_source_get_liststore (BG_SOURCE (bg_source)); |
664 | - item = g_object_get_data (source_object, "item"); |
665 | - |
666 | pixbuf = gdk_pixbuf_new_from_stream_finish (res, &error); |
667 | if (pixbuf == NULL) |
668 | { |
669 | - g_warning ("Failed to load image: %s", error->message); |
670 | + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
671 | + g_warning ("Failed to load image: %s", error->message); |
672 | + |
673 | g_error_free (error); |
674 | + return; |
675 | + } |
676 | + |
677 | + /* since we were not cancelled, we can now cast user_data |
678 | + * back to BgPicturesSource. |
679 | + */ |
680 | + bg_source = BG_PICTURES_SOURCE (user_data); |
681 | + store = bg_source_get_liststore (BG_SOURCE (bg_source)); |
682 | + item = g_object_get_data (source_object, "item"); |
683 | + |
684 | + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (store), |
685 | + 1, |
686 | + (GtkTreeIterCompareFunc)sort_func, |
687 | + bg_source, |
688 | + NULL); |
689 | + |
690 | + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), |
691 | + 1, |
692 | + GTK_SORT_ASCENDING); |
693 | + |
694 | + /* Ignore screenshots */ |
695 | + software = gdk_pixbuf_get_option (pixbuf, "tEXt::Software"); |
696 | + if (software != NULL && |
697 | + g_str_equal (software, "gnome-screenshot")) |
698 | + { |
699 | + g_debug ("Ignored URL '%s' as it's a screenshot from gnome-screenshot", |
700 | + cc_appearance_item_get_uri (item)); |
701 | + g_object_unref (pixbuf); |
702 | g_object_unref (item); |
703 | return; |
704 | } |
705 | |
706 | + cc_appearance_item_load (item, NULL); |
707 | + |
708 | /* insert the item into the liststore */ |
709 | gtk_list_store_insert_with_values (store, &iter, 0, |
710 | 0, pixbuf, |
711 | @@ -195,7 +262,7 @@ |
712 | GAsyncResult *res, |
713 | gpointer user_data) |
714 | { |
715 | - BgPicturesSource *bg_source = BG_PICTURES_SOURCE (user_data); |
716 | + BgPicturesSource *bg_source; |
717 | CcAppearanceItem *item; |
718 | GFileInputStream *stream; |
719 | GError *error = NULL; |
720 | @@ -204,66 +271,78 @@ |
721 | stream = g_file_read_finish (G_FILE (source_object), res, &error); |
722 | if (stream == NULL) |
723 | { |
724 | - char *filename; |
725 | + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
726 | + { |
727 | + char *filename = g_file_get_path (G_FILE (source_object)); |
728 | + g_warning ("Failed to load picture '%s': %s", filename, error->message); |
729 | + g_free (filename); |
730 | + } |
731 | |
732 | - filename = g_file_get_path (G_FILE (source_object)); |
733 | - g_warning ("Failed to load picture '%s': %s", filename, error->message); |
734 | - g_free (filename); |
735 | g_error_free (error); |
736 | g_object_unref (item); |
737 | return; |
738 | } |
739 | |
740 | + /* since we were not cancelled, we can now cast user_data |
741 | + * back to BgPicturesSource. |
742 | + */ |
743 | + bg_source = BG_PICTURES_SOURCE (user_data); |
744 | + |
745 | g_object_set_data (G_OBJECT (stream), "item", item); |
746 | - |
747 | gdk_pixbuf_new_from_stream_at_scale_async (G_INPUT_STREAM (stream), |
748 | THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, |
749 | TRUE, |
750 | - NULL, |
751 | + bg_source->priv->cancellable, |
752 | picture_scaled, bg_source); |
753 | g_object_unref (stream); |
754 | } |
755 | |
756 | static gboolean |
757 | +in_content_types (const char *content_type) |
758 | +{ |
759 | + guint i; |
760 | + for (i = 0; content_types[i]; i++) |
761 | + if (g_str_equal (content_types[i], content_type)) |
762 | + return TRUE; |
763 | + return FALSE; |
764 | +} |
765 | + |
766 | +static gboolean |
767 | add_single_file (BgPicturesSource *bg_source, |
768 | GFile *file, |
769 | GFileInfo *info, |
770 | const char *source_uri) |
771 | { |
772 | const gchar *content_type; |
773 | + CcAppearanceItem *item; |
774 | + char *uri; |
775 | |
776 | /* find png and jpeg files */ |
777 | content_type = g_file_info_get_content_type (info); |
778 | |
779 | if (!content_type) |
780 | return FALSE; |
781 | - |
782 | - if (g_str_equal ("image/png", content_type) || |
783 | - g_str_equal ("image/jpeg", content_type) || |
784 | - g_str_equal ("image/svg+xml", content_type)) |
785 | - { |
786 | - CcAppearanceItem *item; |
787 | - char *uri; |
788 | - |
789 | - /* create a new CcAppearanceItem */ |
790 | - uri = g_file_get_uri (file); |
791 | - item = cc_appearance_item_new (uri); |
792 | - g_free (uri); |
793 | - g_object_set (G_OBJECT (item), |
794 | - "flags", CC_APPEARANCE_ITEM_HAS_URI | CC_APPEARANCE_ITEM_HAS_SHADING, |
795 | - "shading", G_DESKTOP_BACKGROUND_SHADING_SOLID, |
796 | - "placement", G_DESKTOP_BACKGROUND_STYLE_ZOOM, |
797 | - NULL); |
798 | - if (source_uri != NULL && !g_file_is_native (file)) |
799 | - g_object_set (G_OBJECT (item), "source-url", source_uri, NULL); |
800 | - |
801 | - g_object_set_data (G_OBJECT (file), "item", item); |
802 | - g_file_read_async (file, 0, NULL, picture_opened_for_read, bg_source); |
803 | - g_object_unref (file); |
804 | - return TRUE; |
805 | - } |
806 | - |
807 | - return FALSE; |
808 | + if (!in_content_types (content_type)) |
809 | + return FALSE; |
810 | + |
811 | + /* create a new CcAppearanceItem */ |
812 | + uri = g_file_get_uri (file); |
813 | + item = cc_appearance_item_new (uri); |
814 | + g_free (uri); |
815 | + g_object_set (G_OBJECT (item), |
816 | + "flags", CC_APPEARANCE_ITEM_HAS_URI | CC_APPEARANCE_ITEM_HAS_SHADING, |
817 | + "shading", G_DESKTOP_BACKGROUND_SHADING_SOLID, |
818 | + "placement", G_DESKTOP_BACKGROUND_STYLE_ZOOM, |
819 | + NULL); |
820 | + if (source_uri != NULL && !g_file_is_native (file)) |
821 | + g_object_set (G_OBJECT (item), "source-url", source_uri, NULL); |
822 | + |
823 | + g_object_set_data (G_OBJECT (file), "item", item); |
824 | + g_file_read_async (file, G_PRIORITY_DEFAULT, |
825 | + bg_source->priv->cancellable, |
826 | + picture_opened_for_read, bg_source); |
827 | + g_object_unref (file); |
828 | + return TRUE; |
829 | } |
830 | |
831 | gboolean |
832 | @@ -504,3 +583,8 @@ |
833 | return g_object_new (BG_TYPE_PICTURES_SOURCE, NULL); |
834 | } |
835 | |
836 | +const char * const * |
837 | +bg_pictures_get_support_content_types (void) |
838 | +{ |
839 | + return content_types; |
840 | +} |
841 | |
842 | === modified file 'panels/appearance/bg-pictures-source.h' |
843 | --- panels/appearance/bg-pictures-source.h 2013-12-02 02:45:53 +0000 |
844 | +++ panels/appearance/bg-pictures-source.h 2014-03-03 10:09:16 +0000 |
845 | @@ -79,6 +79,8 @@ |
846 | gboolean bg_pictures_source_is_known (BgPicturesSource *bg_source, |
847 | const char *uri); |
848 | |
849 | +const char * const * bg_pictures_get_support_content_types (void); |
850 | + |
851 | G_END_DECLS |
852 | |
853 | #endif /* _BG_PICTURES_SOURCE_H */ |
854 | |
855 | === modified file 'panels/appearance/cc-appearance-panel.c' |
856 | --- panels/appearance/cc-appearance-panel.c 2013-12-02 02:45:53 +0000 |
857 | +++ panels/appearance/cc-appearance-panel.c 2014-03-03 10:09:16 +0000 |
858 | @@ -74,6 +74,7 @@ |
859 | GSettings *unity_settings; |
860 | GSettings *compizcore_settings; |
861 | GSettings *unity_own_settings; |
862 | + GSettings *unity_launcher_settings; |
863 | |
864 | GnomeDesktopThumbnailFactory *thumb_factory; |
865 | |
866 | @@ -112,11 +113,13 @@ |
867 | #define COMPIZCORE_HSIZE_KEY "hsize" |
868 | #define COMPIZCORE_VSIZE_KEY "vsize" |
869 | |
870 | -#define UNITY_OWN_GSETTINGS_SCHEMA "com.canonical.Unity.Launcher" |
871 | +#define UNITY_OWN_GSETTINGS_SCHEMA "com.canonical.Unity" |
872 | +#define UNITY_LAUNCHER_GSETTINGS_SCHEMA "com.canonical.Unity.Launcher" |
873 | #define UNITY_FAVORITES_KEY "favorites" |
874 | +#define UNITY_INTEGRATED_MENUS_KEY "integrated-menus" |
875 | #define SHOW_DESKTOP_UNITY_FAVORITE_STR "unity://desktop-icon" |
876 | |
877 | -#define MIN_ICONSIZE 32.0 |
878 | +#define MIN_ICONSIZE 16.0 |
879 | #define MAX_ICONSIZE 64.0 |
880 | |
881 | #define MIN_LAUNCHER_SENSIVITY 0.2 |
882 | @@ -233,10 +236,10 @@ |
883 | priv->compizcore_settings = NULL; |
884 | } |
885 | |
886 | - if (priv->unity_own_settings) |
887 | + if (priv->unity_launcher_settings) |
888 | { |
889 | - g_object_unref (priv->unity_own_settings); |
890 | - priv->unity_own_settings = NULL; |
891 | + g_object_unref (priv->unity_launcher_settings); |
892 | + priv->unity_launcher_settings = NULL; |
893 | } |
894 | |
895 | if (priv->copy_cancellable) |
896 | @@ -411,7 +414,7 @@ |
897 | |
898 | if (priv->current_background) |
899 | { |
900 | - GdkColor pcolor, scolor; |
901 | + GdkRGBA pcolor, scolor; |
902 | const char* bgsize = NULL; |
903 | |
904 | markup = g_strdup_printf ("<i>%s</i>", cc_appearance_item_get_name (priv->current_background)); |
905 | @@ -428,11 +431,11 @@ |
906 | else |
907 | gtk_label_set_text (GTK_LABEL (WID ("size_label")), ""); |
908 | |
909 | - gdk_color_parse (cc_appearance_item_get_pcolor (priv->current_background), &pcolor); |
910 | - gdk_color_parse (cc_appearance_item_get_scolor (priv->current_background), &scolor); |
911 | + gdk_rgba_parse (&pcolor, cc_appearance_item_get_pcolor (priv->current_background)); |
912 | + gdk_rgba_parse (&scolor, cc_appearance_item_get_scolor (priv->current_background)); |
913 | |
914 | - gtk_color_button_set_color (GTK_COLOR_BUTTON (WID ("style-pcolor")), &pcolor); |
915 | - gtk_color_button_set_color (GTK_COLOR_BUTTON (WID ("style-scolor")), &scolor); |
916 | + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (WID ("style-pcolor")), &pcolor); |
917 | + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (WID ("style-scolor")), &scolor); |
918 | |
919 | select_style (GTK_COMBO_BOX (WID ("style-combobox")), |
920 | cc_appearance_item_get_placement (priv->current_background)); |
921 | @@ -869,20 +872,30 @@ |
922 | update_preview (priv, NULL); |
923 | } |
924 | |
925 | +/* Convert RGBA to the old GdkColor string format for backwards compatibility */ |
926 | +static gchar * |
927 | +rgba_to_string (GdkRGBA *color) |
928 | +{ |
929 | + return g_strdup_printf ("#%04x%04x%04x", |
930 | + (int)(color->red * 65535. + 0.5), |
931 | + (int)(color->green * 65535. + 0.5), |
932 | + (int)(color->blue * 65535. + 0.5)); |
933 | +} |
934 | + |
935 | static void |
936 | color_changed_cb (GtkColorButton *button, |
937 | CcAppearancePanel *panel) |
938 | { |
939 | CcAppearancePanelPrivate *priv = panel->priv; |
940 | - GdkColor color; |
941 | + GdkRGBA color; |
942 | gchar *value; |
943 | gboolean is_pcolor = FALSE; |
944 | |
945 | - gtk_color_button_get_color (button, &color); |
946 | + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (button), &color); |
947 | if (WID ("style-pcolor") == GTK_WIDGET (button)) |
948 | is_pcolor = TRUE; |
949 | |
950 | - value = gdk_color_to_string (&color); |
951 | + value = rgba_to_string (&color); |
952 | |
953 | if (priv->current_background) |
954 | { |
955 | @@ -905,17 +918,17 @@ |
956 | CcAppearancePanel *panel) |
957 | { |
958 | CcAppearancePanelPrivate *priv = panel->priv; |
959 | - GdkColor pcolor, scolor; |
960 | + GdkRGBA pcolor, scolor; |
961 | char *new_pcolor, *new_scolor; |
962 | |
963 | - gtk_color_button_get_color (GTK_COLOR_BUTTON (WID ("style-pcolor")), &pcolor); |
964 | - gtk_color_button_get_color (GTK_COLOR_BUTTON (WID ("style-scolor")), &scolor); |
965 | - |
966 | - gtk_color_button_set_color (GTK_COLOR_BUTTON (WID ("style-scolor")), &pcolor); |
967 | - gtk_color_button_set_color (GTK_COLOR_BUTTON (WID ("style-pcolor")), &scolor); |
968 | - |
969 | - new_pcolor = gdk_color_to_string (&scolor); |
970 | - new_scolor = gdk_color_to_string (&pcolor); |
971 | + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (WID ("style-pcolor")), &pcolor); |
972 | + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (WID ("style-scolor")), &scolor); |
973 | + |
974 | + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (WID ("style-scolor")), &pcolor); |
975 | + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (WID ("style-pcolor")), &scolor); |
976 | + |
977 | + new_pcolor = rgba_to_string (&scolor); |
978 | + new_scolor = rgba_to_string (&pcolor); |
979 | |
980 | g_object_set (priv->current_background, |
981 | "primary-color", new_pcolor, |
982 | @@ -1048,8 +1061,8 @@ |
983 | } |
984 | else |
985 | { |
986 | - gtk_image_set_from_stock (GTK_IMAGE (preview), |
987 | - GTK_STOCK_DIALOG_QUESTION, |
988 | + gtk_image_set_from_icon_name (GTK_IMAGE (preview), |
989 | + "dialog-question", |
990 | GTK_ICON_SIZE_DIALOG); |
991 | } |
992 | |
993 | @@ -1073,17 +1086,21 @@ |
994 | GtkWidget *preview; |
995 | GtkFileFilter *filter; |
996 | CcAppearancePanelPrivate *priv; |
997 | + const char * const * content_types; |
998 | + guint i; |
999 | |
1000 | priv = panel->priv; |
1001 | |
1002 | filter = gtk_file_filter_new (); |
1003 | - gtk_file_filter_add_mime_type (filter, "image/*"); |
1004 | + content_types = bg_pictures_get_support_content_types (); |
1005 | + for (i = 0; content_types[i] != NULL; i++) |
1006 | + gtk_file_filter_add_mime_type (filter, content_types[i]); |
1007 | |
1008 | chooser = gtk_file_chooser_dialog_new (_("Browse for more pictures"), |
1009 | GTK_WINDOW (gtk_widget_get_toplevel (WID ("appearance-panel"))), |
1010 | GTK_FILE_CHOOSER_ACTION_OPEN, |
1011 | - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
1012 | - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, |
1013 | + _("_Cancel"), GTK_RESPONSE_CANCEL, |
1014 | + _("_Open"), GTK_RESPONSE_ACCEPT, |
1015 | NULL); |
1016 | gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (chooser), filter); |
1017 | gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); |
1018 | @@ -1616,7 +1633,7 @@ |
1019 | gchar **favorites = NULL; |
1020 | gboolean show_desktop_found = FALSE; |
1021 | |
1022 | - favorites = g_settings_get_strv (priv->unity_own_settings, UNITY_FAVORITES_KEY); |
1023 | + favorites = g_settings_get_strv (priv->unity_launcher_settings, UNITY_FAVORITES_KEY); |
1024 | while (*favorites != NULL) |
1025 | { |
1026 | if (g_strcmp0 (*favorites, SHOW_DESKTOP_UNITY_FAVORITE_STR) == 0) |
1027 | @@ -1648,7 +1665,7 @@ |
1028 | GPtrArray* newfavorites = g_ptr_array_new (); |
1029 | gboolean show_desktop_in_array = FALSE; |
1030 | |
1031 | - favorites = g_settings_get_strv (priv->unity_own_settings, UNITY_FAVORITES_KEY); |
1032 | + favorites = g_settings_get_strv (priv->unity_launcher_settings, UNITY_FAVORITES_KEY); |
1033 | if (gtk_toggle_button_get_active (button)) |
1034 | { |
1035 | |
1036 | @@ -1687,11 +1704,71 @@ |
1037 | } |
1038 | } |
1039 | g_ptr_array_add (newfavorites, NULL); |
1040 | - g_settings_set_strv (priv->unity_own_settings, UNITY_FAVORITES_KEY, (const gchar **)newfavorites->pdata); |
1041 | + g_settings_set_strv (priv->unity_launcher_settings, UNITY_FAVORITES_KEY, (const gchar **)newfavorites->pdata); |
1042 | g_ptr_array_free (newfavorites, TRUE); |
1043 | |
1044 | } |
1045 | |
1046 | +static gboolean |
1047 | +unity_own_setting_exists (CcAppearancePanel *self, const gchar* key_name) |
1048 | +{ |
1049 | + if (!self->priv->unity_own_settings) |
1050 | + return FALSE; |
1051 | + |
1052 | + gchar** unity_keys; |
1053 | + gchar** key; |
1054 | + |
1055 | + unity_keys = g_settings_list_keys (self->priv->unity_own_settings); |
1056 | + |
1057 | + for (key = unity_keys; *key; ++key) |
1058 | + { |
1059 | + if (g_strcmp0 (*key, key_name) == 0) |
1060 | + return TRUE; |
1061 | + } |
1062 | + |
1063 | + g_strfreev (unity_keys); |
1064 | + return FALSE; |
1065 | +} |
1066 | + |
1067 | +static void |
1068 | +menulocation_widget_refresh (CcAppearancePanel *self) |
1069 | +{ |
1070 | + CcAppearancePanelPrivate *priv = self->priv; |
1071 | + |
1072 | + gboolean has_setting = unity_own_setting_exists (self, UNITY_INTEGRATED_MENUS_KEY); |
1073 | + gtk_widget_set_visible (WID ("unity_menus_box"), has_setting); |
1074 | + gtk_widget_set_visible (WID ("menu_separator"), has_setting); |
1075 | + |
1076 | + if (!has_setting) |
1077 | + return; |
1078 | + |
1079 | + gboolean value = g_settings_get_boolean (priv->unity_own_settings, UNITY_INTEGRATED_MENUS_KEY); |
1080 | + |
1081 | + if (value) |
1082 | + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_local_menus")), TRUE); |
1083 | + else |
1084 | + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("unity_global_menus")), TRUE); |
1085 | +} |
1086 | + |
1087 | +static void |
1088 | +ext_menulocation_changed_callback (GSettings* settings, |
1089 | + guint key, |
1090 | + gpointer user_data) |
1091 | +{ |
1092 | + menulocation_widget_refresh (CC_APPEARANCE_PANEL (user_data)); |
1093 | +} |
1094 | + |
1095 | +static void |
1096 | +on_menulocation_changed (GtkToggleButton *button, gpointer user_data) |
1097 | +{ |
1098 | + CcAppearancePanel *self = CC_APPEARANCE_PANEL (user_data); |
1099 | + CcAppearancePanelPrivate *priv = self->priv; |
1100 | + gboolean local_menus = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("unity_local_menus"))); |
1101 | + |
1102 | + g_settings_set_boolean (priv->unity_own_settings, UNITY_INTEGRATED_MENUS_KEY, local_menus); |
1103 | + menulocation_widget_refresh (self); |
1104 | +} |
1105 | + |
1106 | static void |
1107 | on_restore_defaults_page2_clicked (GtkButton *button, gpointer user_data) |
1108 | { |
1109 | @@ -1704,6 +1781,9 @@ |
1110 | g_settings_reset (priv->unity_settings, UNITY_LAUNCHERREVEAL_KEY); |
1111 | g_settings_reset (priv->compizcore_settings, COMPIZCORE_HSIZE_KEY); |
1112 | g_settings_reset (priv->compizcore_settings, COMPIZCORE_VSIZE_KEY); |
1113 | + |
1114 | + if (unity_own_setting_exists (self, UNITY_INTEGRATED_MENUS_KEY)) |
1115 | + g_settings_reset (priv->unity_own_settings, UNITY_INTEGRATED_MENUS_KEY); |
1116 | } |
1117 | |
1118 | /* <hacks> */ |
1119 | @@ -1753,26 +1833,37 @@ |
1120 | GtkAdjustment* launcher_sensitivity_adj; |
1121 | GtkScale* iconsize_scale; |
1122 | GtkScale* launcher_sensitivity_scale; |
1123 | - const gchar * const *schemas; |
1124 | - |
1125 | - schemas = g_settings_list_schemas (); |
1126 | - while (*schemas != NULL) |
1127 | - { |
1128 | - if (g_strcmp0 (*schemas, UNITY_OWN_GSETTINGS_SCHEMA) == 0) |
1129 | - priv->unity_own_settings = g_settings_new (UNITY_OWN_GSETTINGS_SCHEMA); |
1130 | - schemas++; |
1131 | - } |
1132 | - schemas = g_settings_list_relocatable_schemas (); |
1133 | - while (*schemas != NULL) |
1134 | - { |
1135 | - if (g_strcmp0 (*schemas, UNITY_GSETTINGS_SCHEMA) == 0) |
1136 | - priv->unity_settings = g_settings_new_with_path (UNITY_GSETTINGS_SCHEMA, UNITY_GSETTINGS_PATH); |
1137 | - if (g_strcmp0 (*schemas, COMPIZCORE_GSETTINGS_SCHEMA) == 0) |
1138 | - priv->compizcore_settings = g_settings_new_with_path (COMPIZCORE_GSETTINGS_SCHEMA, COMPIZCORE_GSETTINGS_PATH); |
1139 | - schemas++; |
1140 | - } |
1141 | - |
1142 | - if (!priv->unity_settings || !priv->compizcore_settings || !priv->unity_own_settings) |
1143 | + GSettingsSchema *schema; |
1144 | + GSettingsSchemaSource* source; |
1145 | + |
1146 | + source = g_settings_schema_source_get_default (); |
1147 | + |
1148 | + schema = g_settings_schema_source_lookup (source, UNITY_OWN_GSETTINGS_SCHEMA, TRUE); |
1149 | + if (schema) |
1150 | + { |
1151 | + priv->unity_own_settings = g_settings_new (UNITY_OWN_GSETTINGS_SCHEMA); |
1152 | + g_settings_schema_unref (schema); |
1153 | + } |
1154 | + schema = g_settings_schema_source_lookup (source, UNITY_LAUNCHER_GSETTINGS_SCHEMA, TRUE); |
1155 | + if (schema) |
1156 | + { |
1157 | + priv->unity_launcher_settings = g_settings_new (UNITY_LAUNCHER_GSETTINGS_SCHEMA); |
1158 | + g_object_unref (schema); |
1159 | + } |
1160 | + schema = g_settings_schema_source_lookup (source, UNITY_GSETTINGS_SCHEMA, TRUE); |
1161 | + if (schema) |
1162 | + { |
1163 | + priv->unity_settings = g_settings_new_with_path (UNITY_GSETTINGS_SCHEMA, UNITY_GSETTINGS_PATH); |
1164 | + g_settings_schema_unref (schema); |
1165 | + } |
1166 | + schema = g_settings_schema_source_lookup (source, COMPIZCORE_GSETTINGS_SCHEMA, TRUE); |
1167 | + if (schema) |
1168 | + { |
1169 | + priv->compizcore_settings = g_settings_new_with_path (COMPIZCORE_GSETTINGS_SCHEMA, COMPIZCORE_GSETTINGS_PATH); |
1170 | + g_settings_schema_unref (schema); |
1171 | + } |
1172 | + |
1173 | + if (!priv->unity_settings || !priv->compizcore_settings || !priv->unity_own_settings || !priv->unity_launcher_settings) |
1174 | return; |
1175 | |
1176 | /* Icon size change */ |
1177 | @@ -1832,12 +1923,21 @@ |
1178 | enable_workspaces_widget_refresh (self); |
1179 | |
1180 | /* Enabling show desktop icon */ |
1181 | - g_signal_connect (priv->unity_own_settings, "changed::" UNITY_FAVORITES_KEY, |
1182 | + g_signal_connect (priv->unity_launcher_settings, "changed::" UNITY_FAVORITES_KEY, |
1183 | G_CALLBACK (ext_enableshowdesktop_changed_callback), self); |
1184 | g_signal_connect (WID ("check_showdesktop_in_launcher"), "toggled", |
1185 | G_CALLBACK (on_enable_showdesktop_changed), self); |
1186 | enable_showdesktop_widget_refresh (self); |
1187 | |
1188 | + /* Menu location */ |
1189 | + g_signal_connect (priv->unity_own_settings, "changed::" UNITY_INTEGRATED_MENUS_KEY, |
1190 | + G_CALLBACK (ext_menulocation_changed_callback), self); |
1191 | + g_signal_connect (WID ("unity_global_menus"), "toggled", |
1192 | + G_CALLBACK (on_menulocation_changed), self); |
1193 | + g_signal_connect (WID ("unity_local_menus"), "toggled", |
1194 | + G_CALLBACK (on_menulocation_changed), self); |
1195 | + menulocation_widget_refresh (self); |
1196 | + |
1197 | /* Restore defaut on second page */ |
1198 | g_signal_connect (WID ("button-restore-unitybehavior"), "clicked", |
1199 | G_CALLBACK (on_restore_defaults_page2_clicked), self); |
1200 | |
1201 | === modified file 'panels/bluetooth/Makefile.am' |
1202 | --- panels/bluetooth/Makefile.am 2013-11-29 06:28:37 +0000 |
1203 | +++ panels/bluetooth/Makefile.am 2014-03-03 10:09:16 +0000 |
1204 | @@ -8,26 +8,33 @@ |
1205 | $(PANEL_CFLAGS) \ |
1206 | $(BLUETOOTH_CFLAGS) \ |
1207 | -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ |
1208 | - -DPKGDATADIR="\"$(pkgdatadir)\"" \ |
1209 | $(NULL) |
1210 | |
1211 | +BUILT_SOURCES = \ |
1212 | + cc-bluetooth-resources.h \ |
1213 | + cc-bluetooth-resources.c |
1214 | + |
1215 | libbluetooth_la_SOURCES = \ |
1216 | + $(BUILT_SOURCES) \ |
1217 | cc-bluetooth-panel.c \ |
1218 | cc-bluetooth-panel.h |
1219 | |
1220 | libbluetooth_la_LIBADD = $(PANEL_LIBS) $(BLUETOOTH_LIBS) |
1221 | libbluetooth_la_LDFLAGS = $(PANEL_LDFLAGS) |
1222 | |
1223 | +resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/bluetooth.gresource.xml) |
1224 | +cc-bluetooth-resources.c: bluetooth.gresource.xml $(resource_files) |
1225 | + $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name cc_bluetooth $< |
1226 | +cc-bluetooth-resources.h: bluetooth.gresource.xml $(resource_files) |
1227 | + $(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name cc_bluetooth $< |
1228 | + |
1229 | desktopdir = $(datadir)/applications |
1230 | desktop_in_in_files = untiy-bluetooth-panel.desktop.in.in |
1231 | desktop_in_files = unity-bluetooth-panel.desktop.in |
1232 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) |
1233 | @INTLTOOL_DESKTOP_RULE@ |
1234 | |
1235 | -ui_DATA = bluetooth.ui |
1236 | -uidir = $(pkgdatadir) |
1237 | - |
1238 | -CLEANFILES = $(desktop_DATA) |
1239 | -EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(ui_DATA) |
1240 | +CLEANFILES = $(desktop_DATA) $(BUILT_SOURCES) |
1241 | +EXTRA_DIST = $(man_MANS) $(desktop_in_in_files) $(resource_files) bluetooth.gresource.xml |
1242 | |
1243 | -include $(top_srcdir)/git.mk |
1244 | |
1245 | === added file 'panels/bluetooth/bluetooth.gresource.xml' |
1246 | --- panels/bluetooth/bluetooth.gresource.xml 1970-01-01 00:00:00 +0000 |
1247 | +++ panels/bluetooth/bluetooth.gresource.xml 2014-03-03 10:09:16 +0000 |
1248 | @@ -0,0 +1,6 @@ |
1249 | +<?xml version="1.0" encoding="UTF-8"?> |
1250 | +<gresources> |
1251 | + <gresource prefix="/org/gnome/control-center/bluetooth"> |
1252 | + <file preprocess="xml-stripblanks">bluetooth.ui</file> |
1253 | + </gresource> |
1254 | +</gresources> |
1255 | |
1256 | === modified file 'panels/bluetooth/bluetooth.ui' |
1257 | --- panels/bluetooth/bluetooth.ui 2012-11-10 19:29:03 +0000 |
1258 | +++ panels/bluetooth/bluetooth.ui 2014-03-03 10:09:16 +0000 |
1259 | @@ -121,6 +121,8 @@ |
1260 | <property name="visible">True</property> |
1261 | <property name="can_focus">False</property> |
1262 | <property name="margin_left">6</property> |
1263 | + <property name="hexpand">True</property> |
1264 | + <property name="vexpand">True</property> |
1265 | <property name="show_tabs">False</property> |
1266 | <property name="show_border">False</property> |
1267 | <child> |
1268 | @@ -524,7 +526,7 @@ |
1269 | </child> |
1270 | <child> |
1271 | <object class="GtkButton" id="send_button"> |
1272 | - <property name="label" translatable="yes">Send Files...</property> |
1273 | + <property name="label" translatable="yes">Send Filesā¦</property> |
1274 | <property name="can_focus">True</property> |
1275 | <property name="receives_default">True</property> |
1276 | <property name="use_action_appearance">False</property> |
1277 | @@ -552,7 +554,7 @@ |
1278 | </child> |
1279 | <child> |
1280 | <object class="GtkButton" id="browse_button"> |
1281 | - <property name="label" translatable="yes">Browse Files...</property> |
1282 | + <property name="label" translatable="yes">Browse Filesā¦</property> |
1283 | <property name="can_focus">True</property> |
1284 | <property name="receives_default">True</property> |
1285 | <property name="use_action_appearance">False</property> |
1286 | @@ -669,6 +671,26 @@ |
1287 | </packing> |
1288 | </child> |
1289 | <child> |
1290 | + <object class="GtkCheckButton" id="menubar_visibility_toggle"> |
1291 | + <property name="label" translatable="yes">_Show Bluetooth status in the menu bar</property> |
1292 | + <property name="use_action_appearance">False</property> |
1293 | + <property name="visible">True</property> |
1294 | + <property name="can_focus">True</property> |
1295 | + <property name="receives_default">False</property> |
1296 | + <property name="margin_top">6</property> |
1297 | + <property name="use_action_appearance">False</property> |
1298 | + <property name="use_underline">True</property> |
1299 | + <property name="xalign">0</property> |
1300 | + <property name="draw_indicator">True</property> |
1301 | + </object> |
1302 | + <packing> |
1303 | + <property name="left_attach">0</property> |
1304 | + <property name="top_attach">2</property> |
1305 | + <property name="width">2</property> |
1306 | + <property name="height">1</property> |
1307 | + </packing> |
1308 | + </child> |
1309 | + <child> |
1310 | <object class="GtkBox" id="box_vis"> |
1311 | <property name="visible">True</property> |
1312 | <property name="can_focus">False</property> |
1313 | |
1314 | === modified file 'panels/bluetooth/cc-bluetooth-panel.c' |
1315 | --- panels/bluetooth/cc-bluetooth-panel.c 2013-11-28 04:32:11 +0000 |
1316 | +++ panels/bluetooth/cc-bluetooth-panel.c 2014-03-03 10:09:16 +0000 |
1317 | @@ -29,6 +29,7 @@ |
1318 | #include <shell/cc-shell.h> |
1319 | |
1320 | #include "cc-bluetooth-panel.h" |
1321 | +#include "cc-bluetooth-resources.h" |
1322 | |
1323 | #include <bluetooth-client.h> |
1324 | #include <bluetooth-utils.h> |
1325 | @@ -55,6 +56,8 @@ |
1326 | BluetoothKillswitch *killswitch; |
1327 | gboolean debug; |
1328 | GHashTable *connecting_devices; |
1329 | + GCancellable *cancellable; |
1330 | + GSettings *indicator_settings; |
1331 | }; |
1332 | |
1333 | static void cc_bluetooth_panel_finalize (GObject *object); |
1334 | @@ -100,9 +103,13 @@ |
1335 | bluetooth_plugin_manager_cleanup (); |
1336 | |
1337 | self = CC_BLUETOOTH_PANEL (object); |
1338 | + g_cancellable_cancel (self->priv->cancellable); |
1339 | + g_clear_object (&self->priv->cancellable); |
1340 | + |
1341 | g_clear_object (&self->priv->builder); |
1342 | g_clear_object (&self->priv->killswitch); |
1343 | g_clear_object (&self->priv->client); |
1344 | + g_clear_object (&self->priv->indicator_settings); |
1345 | |
1346 | g_clear_pointer (&self->priv->connecting_devices, g_hash_table_destroy); |
1347 | g_clear_pointer (&self->priv->selected_bdaddr, g_free); |
1348 | @@ -163,10 +170,13 @@ |
1349 | CcBluetoothPanel *self; |
1350 | char *bdaddr; |
1351 | gboolean success; |
1352 | + GError *error = NULL; |
1353 | ConnectData *data = (ConnectData *) user_data; |
1354 | |
1355 | success = bluetooth_client_connect_service_finish (BLUETOOTH_CLIENT (source_object), |
1356 | - res, NULL); |
1357 | + res, &error); |
1358 | + if (!success && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
1359 | + goto out; |
1360 | |
1361 | self = data->self; |
1362 | |
1363 | @@ -185,7 +195,9 @@ |
1364 | remove_connecting (self, data->bdaddr); |
1365 | |
1366 | g_free (bdaddr); |
1367 | - g_object_unref (data->self); |
1368 | + |
1369 | +out: |
1370 | + g_clear_error (&error); |
1371 | g_free (data->bdaddr); |
1372 | g_free (data); |
1373 | } |
1374 | @@ -219,12 +231,12 @@ |
1375 | |
1376 | data = g_new0 (ConnectData, 1); |
1377 | data->bdaddr = bdaddr; |
1378 | - data->self = g_object_ref (self); |
1379 | + data->self = self; |
1380 | |
1381 | bluetooth_client_connect_service (self->priv->client, |
1382 | proxy, |
1383 | gtk_switch_get_active (button), |
1384 | - NULL, |
1385 | + self->priv->cancellable, |
1386 | connect_done, |
1387 | data); |
1388 | |
1389 | @@ -640,8 +652,8 @@ |
1390 | _("If you remove the device, you will have to set it up again before next use."), |
1391 | NULL); |
1392 | |
1393 | - gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); |
1394 | - gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_REMOVE, GTK_RESPONSE_ACCEPT); |
1395 | + gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Cancel"), GTK_RESPONSE_CANCEL); |
1396 | + gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Remove"), GTK_RESPONSE_ACCEPT); |
1397 | |
1398 | response = gtk_dialog_run (GTK_DIALOG (dialog)); |
1399 | |
1400 | @@ -796,8 +808,10 @@ |
1401 | GtkStyleContext *context; |
1402 | |
1403 | self->priv = BLUETOOTH_PANEL_PRIVATE (self); |
1404 | + g_resources_register (cc_bluetooth_get_resource ()); |
1405 | |
1406 | bluetooth_plugin_manager_init (); |
1407 | + self->priv->cancellable = g_cancellable_new (); |
1408 | self->priv->killswitch = bluetooth_killswitch_new (); |
1409 | self->priv->client = bluetooth_client_new (); |
1410 | self->priv->connecting_devices = g_hash_table_new_full (g_str_hash, |
1411 | @@ -808,11 +822,11 @@ |
1412 | |
1413 | self->priv->builder = gtk_builder_new (); |
1414 | gtk_builder_set_translation_domain (self->priv->builder, GETTEXT_PACKAGE); |
1415 | - gtk_builder_add_from_file (self->priv->builder, |
1416 | - PKGDATADIR "/bluetooth.ui", |
1417 | - &error); |
1418 | + gtk_builder_add_from_resource (self->priv->builder, |
1419 | + "/org/gnome/control-center/bluetooth/bluetooth.ui", |
1420 | + &error); |
1421 | if (error != NULL) { |
1422 | - g_warning ("Failed to load '%s': %s", PKGDATADIR "/bluetooth.ui", error->message); |
1423 | + g_warning ("Could not load ui: %s", error->message); |
1424 | g_error_free (error); |
1425 | return; |
1426 | } |
1427 | @@ -896,6 +910,12 @@ |
1428 | G_CALLBACK (killswitch_changed), self); |
1429 | cc_bluetooth_panel_update_power (self); |
1430 | |
1431 | + /* Set up the menubar visibility toggle */ |
1432 | + self->priv->indicator_settings = g_settings_new ("com.canonical.indicator.bluetooth"); |
1433 | + g_settings_bind (self->priv->indicator_settings, "visible", |
1434 | + WID("menubar_visibility_toggle"), "active", |
1435 | + G_SETTINGS_BIND_DEFAULT); |
1436 | + |
1437 | gtk_widget_show_all (GTK_WIDGET (self)); |
1438 | } |
1439 | |
1440 | |
1441 | === modified file 'panels/color/cc-color-panel.c' |
1442 | --- panels/color/cc-color-panel.c 2013-11-28 04:35:28 +0000 |
1443 | +++ panels/color/cc-color-panel.c 2014-03-03 10:09:16 +0000 |
1444 | @@ -227,7 +227,7 @@ |
1445 | /* TRANSLATORS: an ICC profile is a file containing colorspace data */ |
1446 | dialog = gtk_file_chooser_dialog_new (_("Select ICC Profile File"), window, |
1447 | GTK_FILE_CHOOSER_ACTION_OPEN, |
1448 | - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
1449 | + _("_Cancel"), GTK_RESPONSE_CANCEL, |
1450 | _("_Import"), GTK_RESPONSE_ACCEPT, |
1451 | NULL); |
1452 | gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), g_get_home_dir ()); |
1453 | |
1454 | === modified file 'panels/common/list-languages.c' |
1455 | --- panels/common/list-languages.c 2012-10-01 07:32:18 +0000 |
1456 | +++ panels/common/list-languages.c 2014-03-03 10:09:16 +0000 |
1457 | @@ -14,8 +14,6 @@ |
1458 | setlocale (LC_ALL, NULL); |
1459 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); |
1460 | |
1461 | - g_type_init (); |
1462 | - |
1463 | if (argc > 1) { |
1464 | guint i; |
1465 | for (i = 1; i < argc; i++) { |
1466 | |
1467 | === added directory 'panels/datetime' |
1468 | === added file 'panels/datetime/Makefile.am' |
1469 | --- panels/datetime/Makefile.am 1970-01-01 00:00:00 +0000 |
1470 | +++ panels/datetime/Makefile.am 2014-03-03 10:09:16 +0000 |
1471 | @@ -0,0 +1,58 @@ |
1472 | +# This is used in PANEL_CFLAGS |
1473 | +cappletname = datetime |
1474 | + |
1475 | +uidir = $(pkgdatadir)/ui/datetime |
1476 | +dist_ui_DATA = datetime-dialog.ui |
1477 | + |
1478 | +icons16dir = $(datadir)/icons/hicolor/16x16/apps |
1479 | +dist_icons16_DATA = icons/16x16/unity-datetime-panel.png |
1480 | +icons22dir = $(datadir)/icons/hicolor/22x22/apps |
1481 | +dist_icons22_DATA = icons/22x22/unity-datetime-panel.png |
1482 | +icons32dir = $(datadir)/icons/hicolor/32x32/apps |
1483 | +dist_icons32_DATA = icons/32x32/unity-datetime-panel.png |
1484 | +icons48dir = $(datadir)/icons/hicolor/48x48/apps |
1485 | +dist_icons48_DATA = icons/48x48/unity-datetime-panel.png |
1486 | +icons256dir = $(datadir)/icons/hicolor/256x256/apps |
1487 | +dist_icons256_DATA = icons/256x256/unity-datetime-panel.png |
1488 | +iconsscalabledir = $(datadir)/icons/hicolor/scalable/apps |
1489 | +dist_iconsscalable_DATA = icons/scalable/unity-datetime-panel.svg |
1490 | + |
1491 | +INCLUDES = \ |
1492 | + $(PANEL_CFLAGS) \ |
1493 | + $(DATETIME_PANEL_CFLAGS) \ |
1494 | + -DLOCALEDIR="\"$(datadir)/locale\"" \ |
1495 | + -DPKGDATADIR="\"$(pkgdatadir)\"" \ |
1496 | + $(NULL) |
1497 | + |
1498 | +ccpanelsdir = $(PANELS_DIR) |
1499 | +ccpanels_LTLIBRARIES = libdatetime.la |
1500 | + |
1501 | +libdatetime_la_SOURCES = \ |
1502 | + datetime-prefs.c \ |
1503 | + datetime-prefs-locations.c \ |
1504 | + datetime-prefs-locations.h \ |
1505 | + settings-shared.h \ |
1506 | + utils.c \ |
1507 | + utils.h |
1508 | + |
1509 | +libdatetime_la_LIBADD = $(PANEL_LIBS) $(DATETIME_PANEL_LIBS) |
1510 | +libdatetime_la_LDFLAGS = $(PANEL_LDFLAGS) |
1511 | + |
1512 | +polkitdir = $(datadir)/polkit-1/actions |
1513 | +polkit_in_files = com.canonical.controlcenter.datetime.policy.in |
1514 | + |
1515 | +@INTLTOOL_POLICY_RULE@ |
1516 | +polkit_DATA = $(polkit_in_files:.policy.in=.policy) |
1517 | + |
1518 | +@INTLTOOL_DESKTOP_RULE@ |
1519 | + |
1520 | +desktopdir = $(datadir)/applications |
1521 | +desktop_in_files = unity-datetime-panel.desktop.in |
1522 | +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) |
1523 | + |
1524 | +CLEANFILES = $(desktop_in_files) $(desktop_DATA) |
1525 | + |
1526 | +EXTRA_DIST = \ |
1527 | + $(polkit_in_files) |
1528 | + |
1529 | +-include $(top_srcdir)/git.mk |
1530 | |
1531 | === added file 'panels/datetime/com.canonical.controlcenter.datetime.policy.in' |
1532 | --- panels/datetime/com.canonical.controlcenter.datetime.policy.in 1970-01-01 00:00:00 +0000 |
1533 | +++ panels/datetime/com.canonical.controlcenter.datetime.policy.in 2014-03-03 10:09:16 +0000 |
1534 | @@ -0,0 +1,21 @@ |
1535 | +<?xml version="1.0" encoding="UTF-8"?> |
1536 | +<!DOCTYPE policyconfig PUBLIC |
1537 | + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" |
1538 | + "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd"> |
1539 | + |
1540 | +<policyconfig> |
1541 | + <vendor>The GNOME Project</vendor> |
1542 | + <vendor_url>http://www.gnome.org/</vendor_url> |
1543 | + |
1544 | + <action id="com.canonical.controlcenter.datetime.configure"> |
1545 | + <_description>Change system time and date settings</_description> |
1546 | + <_message>To change time or date settings, you need to authenticate.</_message> |
1547 | + <defaults> |
1548 | + <allow_any>no</allow_any> |
1549 | + <allow_inactive>no</allow_inactive> |
1550 | + <allow_active>auth_admin_keep</allow_active> |
1551 | + </defaults> |
1552 | + <annotate key="org.freedesktop.policykit.imply">org.freedesktop.timedate1.set-time org.freedesktop.timedate1.set-timezone org.freedesktop.timedate1.set-local-rtc org.freedesktop.timedate1.set-ntp</annotate> |
1553 | + </action> |
1554 | + |
1555 | +</policyconfig> |
1556 | |
1557 | === added file 'panels/datetime/datetime-dialog.ui' |
1558 | --- panels/datetime/datetime-dialog.ui 1970-01-01 00:00:00 +0000 |
1559 | +++ panels/datetime/datetime-dialog.ui 2014-03-03 10:09:16 +0000 |
1560 | @@ -0,0 +1,864 @@ |
1561 | +<?xml version="1.0" encoding="UTF-8"?> |
1562 | +<interface> |
1563 | + <requires lib="gtk+" version="2.24"/> |
1564 | + <!-- interface-naming-policy project-wide --> |
1565 | + <object class="GtkAdjustment" id="dateAdjustment"> |
1566 | + <property name="upper">1.8446744073709552e+19</property> |
1567 | + <property name="step_increment">86400</property> |
1568 | + <property name="page_increment">864000</property> |
1569 | + </object> |
1570 | + <object class="GtkWindow" id="locationsDialog"> |
1571 | + <property name="can_focus">False</property> |
1572 | + <property name="title" translatable="yes">Locations</property> |
1573 | + <property name="default_width">300</property> |
1574 | + <property name="default_height">200</property> |
1575 | + <property name="destroy_with_parent">True</property> |
1576 | + <child> |
1577 | + <object class="GtkVBox" id="vbox1"> |
1578 | + <property name="visible">True</property> |
1579 | + <property name="can_focus">False</property> |
1580 | + <child> |
1581 | + <object class="GtkScrolledWindow" id="scrolledwindow1"> |
1582 | + <property name="visible">True</property> |
1583 | + <property name="can_focus">True</property> |
1584 | + <property name="hscrollbar_policy">automatic</property> |
1585 | + <property name="vscrollbar_policy">automatic</property> |
1586 | + <child> |
1587 | + <object class="GtkTreeView" id="locationsView"> |
1588 | + <property name="visible">True</property> |
1589 | + <property name="can_focus">True</property> |
1590 | + <property name="model">locationsStore</property> |
1591 | + <property name="headers_visible">False</property> |
1592 | + <property name="headers_clickable">False</property> |
1593 | + <property name="reorderable">True</property> |
1594 | + <property name="search_column">0</property> |
1595 | + </object> |
1596 | + </child> |
1597 | + </object> |
1598 | + <packing> |
1599 | + <property name="expand">True</property> |
1600 | + <property name="fill">True</property> |
1601 | + <property name="position">0</property> |
1602 | + </packing> |
1603 | + </child> |
1604 | + <child> |
1605 | + <object class="GtkHSeparator" id="hseparator1"> |
1606 | + <property name="visible">True</property> |
1607 | + <property name="can_focus">False</property> |
1608 | + </object> |
1609 | + <packing> |
1610 | + <property name="expand">False</property> |
1611 | + <property name="fill">True</property> |
1612 | + <property name="position">1</property> |
1613 | + </packing> |
1614 | + </child> |
1615 | + <child> |
1616 | + <object class="GtkHBox" id="hbox10"> |
1617 | + <property name="visible">True</property> |
1618 | + <property name="can_focus">False</property> |
1619 | + <property name="spacing">4</property> |
1620 | + <child> |
1621 | + <object class="GtkButton" id="addButton"> |
1622 | + <property name="visible">True</property> |
1623 | + <property name="can_focus">True</property> |
1624 | + <property name="receives_default">True</property> |
1625 | + <property name="use_action_appearance">False</property> |
1626 | + <child internal-child="accessible"> |
1627 | + <object class="AtkObject" id="addButton-atkobject"> |
1628 | + <property name="AtkObject::accessible-description" translatable="yes">Add a Locationā¦</property> |
1629 | + </object> |
1630 | + </child> |
1631 | + <child> |
1632 | + <object class="GtkImage" id="addImage"> |
1633 | + <property name="visible">True</property> |
1634 | + <property name="can_focus">False</property> |
1635 | + <property name="stock">gtk-add</property> |
1636 | + </object> |
1637 | + </child> |
1638 | + </object> |
1639 | + <packing> |
1640 | + <property name="expand">False</property> |
1641 | + <property name="fill">True</property> |
1642 | + <property name="position">0</property> |
1643 | + </packing> |
1644 | + </child> |
1645 | + <child> |
1646 | + <object class="GtkButton" id="removeButton"> |
1647 | + <property name="visible">True</property> |
1648 | + <property name="can_focus">True</property> |
1649 | + <property name="receives_default">True</property> |
1650 | + <property name="use_action_appearance">False</property> |
1651 | + <child internal-child="accessible"> |
1652 | + <object class="AtkObject" id="removeButton-atkobject"> |
1653 | + <property name="AtkObject::accessible-description" translatable="yes">Remove This Location</property> |
1654 | + </object> |
1655 | + </child> |
1656 | + <child> |
1657 | + <object class="GtkImage" id="removeImage"> |
1658 | + <property name="visible">True</property> |
1659 | + <property name="can_focus">False</property> |
1660 | + <property name="stock">gtk-remove</property> |
1661 | + </object> |
1662 | + </child> |
1663 | + </object> |
1664 | + <packing> |
1665 | + <property name="expand">False</property> |
1666 | + <property name="fill">True</property> |
1667 | + <property name="position">1</property> |
1668 | + </packing> |
1669 | + </child> |
1670 | + <child> |
1671 | + <object class="GtkButton" id="sortByNameButton"> |
1672 | + <property name="label" translatable="yes">Sort by _Name</property> |
1673 | + <property name="use_action_appearance">False</property> |
1674 | + <property name="visible">True</property> |
1675 | + <property name="can_focus">True</property> |
1676 | + <property name="receives_default">True</property> |
1677 | + <property name="use_action_appearance">False</property> |
1678 | + <property name="use_underline">True</property> |
1679 | + <accelerator key="n" signal="clicked" modifiers="GDK_MOD1_MASK"/> |
1680 | + </object> |
1681 | + <packing> |
1682 | + <property name="expand">False</property> |
1683 | + <property name="fill">False</property> |
1684 | + <property name="padding">6</property> |
1685 | + <property name="position">2</property> |
1686 | + </packing> |
1687 | + </child> |
1688 | + <child> |
1689 | + <object class="GtkButton" id="sortByTimeButton"> |
1690 | + <property name="label" translatable="yes">Sort by _Time</property> |
1691 | + <property name="use_action_appearance">False</property> |
1692 | + <property name="visible">True</property> |
1693 | + <property name="can_focus">True</property> |
1694 | + <property name="receives_default">True</property> |
1695 | + <property name="use_action_appearance">False</property> |
1696 | + <property name="use_underline">True</property> |
1697 | + <accelerator key="t" signal="clicked" modifiers="GDK_MOD1_MASK"/> |
1698 | + </object> |
1699 | + <packing> |
1700 | + <property name="expand">False</property> |
1701 | + <property name="fill">False</property> |
1702 | + <property name="position">3</property> |
1703 | + </packing> |
1704 | + </child> |
1705 | + </object> |
1706 | + <packing> |
1707 | + <property name="expand">False</property> |
1708 | + <property name="fill">True</property> |
1709 | + <property name="padding">4</property> |
1710 | + <property name="position">2</property> |
1711 | + </packing> |
1712 | + </child> |
1713 | + </object> |
1714 | + </child> |
1715 | + </object> |
1716 | + <object class="GtkListStore" id="locationsStore"> |
1717 | + <columns> |
1718 | + <!-- column-name Location --> |
1719 | + <column type="gchararray"/> |
1720 | + <!-- column-name Time --> |
1721 | + <column type="gchararray"/> |
1722 | + <!-- column-name Zone --> |
1723 | + <column type="gchararray"/> |
1724 | + <!-- column-name Visible Name --> |
1725 | + <column type="gchararray"/> |
1726 | + <!-- column-name Icon --> |
1727 | + <column type="gchararray"/> |
1728 | + </columns> |
1729 | + </object> |
1730 | + <object class="GtkAdjustment" id="timeAdjustment"> |
1731 | + <property name="upper">1.8446744073709552e+19</property> |
1732 | + <property name="step_increment">60</property> |
1733 | + <property name="page_increment">3600</property> |
1734 | + </object> |
1735 | + <object class="GtkEventBox" id="timeDatePanel"> |
1736 | + <property name="can_focus">False</property> |
1737 | + <property name="border_width">5</property> |
1738 | + <child> |
1739 | + <object class="GtkNotebook" id="notebook1"> |
1740 | + <property name="visible">True</property> |
1741 | + <property name="can_focus">True</property> |
1742 | + <child> |
1743 | + <object class="GtkVBox" id="timeDateBox"> |
1744 | + <property name="visible">True</property> |
1745 | + <property name="can_focus">False</property> |
1746 | + <property name="border_width">12</property> |
1747 | + <property name="spacing">6</property> |
1748 | + <child> |
1749 | + <object class="GtkVBox" id="timeDateOptions"> |
1750 | + <property name="visible">True</property> |
1751 | + <property name="can_focus">False</property> |
1752 | + <property name="spacing">12</property> |
1753 | + <child> |
1754 | + <object class="GtkVBox" id="vbox6"> |
1755 | + <property name="visible">True</property> |
1756 | + <property name="can_focus">False</property> |
1757 | + <property name="spacing">6</property> |
1758 | + <child> |
1759 | + <object class="GtkAspectFrame" id="mapBox"> |
1760 | + <property name="height_request">265</property> |
1761 | + <property name="visible">True</property> |
1762 | + <property name="can_focus">False</property> |
1763 | + <property name="label_xalign">0</property> |
1764 | + <property name="shadow_type">none</property> |
1765 | + <child> |
1766 | + <placeholder/> |
1767 | + </child> |
1768 | + </object> |
1769 | + <packing> |
1770 | + <property name="expand">True</property> |
1771 | + <property name="fill">True</property> |
1772 | + <property name="position">0</property> |
1773 | + </packing> |
1774 | + </child> |
1775 | + <child> |
1776 | + <object class="GtkHBox" id="hbox1"> |
1777 | + <property name="visible">True</property> |
1778 | + <property name="can_focus">False</property> |
1779 | + <property name="spacing">6</property> |
1780 | + <child> |
1781 | + <object class="GtkLabel" id="label5"> |
1782 | + <property name="visible">True</property> |
1783 | + <property name="can_focus">False</property> |
1784 | + <property name="xalign">1</property> |
1785 | + <property name="label" translatable="yes">_Location:</property> |
1786 | + <property name="use_underline">True</property> |
1787 | + <property name="mnemonic_widget">timezoneEntry</property> |
1788 | + </object> |
1789 | + <packing> |
1790 | + <property name="expand">False</property> |
1791 | + <property name="fill">True</property> |
1792 | + <property name="position">0</property> |
1793 | + </packing> |
1794 | + </child> |
1795 | + <child> |
1796 | + <object class="GtkEntry" id="timezoneEntry"> |
1797 | + <property name="visible">True</property> |
1798 | + <property name="can_focus">True</property> |
1799 | + <property name="invisible_char">ā¢</property> |
1800 | + <property name="invisible_char_set">True</property> |
1801 | + </object> |
1802 | + <packing> |
1803 | + <property name="expand">True</property> |
1804 | + <property name="fill">True</property> |
1805 | + <property name="position">1</property> |
1806 | + </packing> |
1807 | + </child> |
1808 | + </object> |
1809 | + <packing> |
1810 | + <property name="expand">False</property> |
1811 | + <property name="fill">True</property> |
1812 | + <property name="position">1</property> |
1813 | + </packing> |
1814 | + </child> |
1815 | + </object> |
1816 | + <packing> |
1817 | + <property name="expand">True</property> |
1818 | + <property name="fill">True</property> |
1819 | + <property name="position">0</property> |
1820 | + </packing> |
1821 | + </child> |
1822 | + <child> |
1823 | + <object class="GtkTable" id="table1"> |
1824 | + <property name="visible">True</property> |
1825 | + <property name="can_focus">False</property> |
1826 | + <property name="n_rows">2</property> |
1827 | + <property name="n_columns">2</property> |
1828 | + <property name="column_spacing">6</property> |
1829 | + <property name="row_spacing">6</property> |
1830 | + <child> |
1831 | + <object class="GtkHBox" id="hbox2"> |
1832 | + <property name="visible">True</property> |
1833 | + <property name="can_focus">False</property> |
1834 | + <property name="spacing">6</property> |
1835 | + <child> |
1836 | + <object class="GtkRadioButton" id="manualTimeRadio"> |
1837 | + <property name="label" translatable="yes">_Manually</property> |
1838 | + <property name="visible">True</property> |
1839 | + <property name="can_focus">True</property> |
1840 | + <property name="receives_default">False</property> |
1841 | + <property name="use_action_appearance">False</property> |
1842 | + <property name="use_underline">True</property> |
1843 | + <property name="xalign">0</property> |
1844 | + <property name="active">True</property> |
1845 | + <property name="draw_indicator">True</property> |
1846 | + </object> |
1847 | + <packing> |
1848 | + <property name="expand">False</property> |
1849 | + <property name="fill">True</property> |
1850 | + <property name="position">0</property> |
1851 | + </packing> |
1852 | + </child> |
1853 | + <child> |
1854 | + <object class="GtkRadioButton" id="automaticTimeRadio"> |
1855 | + <property name="label" translatable="yes">_Automatically from the Internet</property> |
1856 | + <property name="visible">True</property> |
1857 | + <property name="sensitive">True</property> |
1858 | + <property name="can_focus">True</property> |
1859 | + <property name="receives_default">False</property> |
1860 | + <property name="use_action_appearance">False</property> |
1861 | + <property name="use_underline">True</property> |
1862 | + <property name="xalign">0</property> |
1863 | + <property name="draw_indicator">True</property> |
1864 | + <property name="group">manualTimeRadio</property> |
1865 | + </object> |
1866 | + <packing> |
1867 | + <property name="expand">False</property> |
1868 | + <property name="fill">True</property> |
1869 | + <property name="position">1</property> |
1870 | + </packing> |
1871 | + </child> |
1872 | + </object> |
1873 | + <packing> |
1874 | + <property name="left_attach">1</property> |
1875 | + <property name="right_attach">2</property> |
1876 | + </packing> |
1877 | + </child> |
1878 | + <child> |
1879 | + <object class="GtkLabel" id="label9"> |
1880 | + <property name="visible">True</property> |
1881 | + <property name="can_focus">False</property> |
1882 | + <property name="xalign">1</property> |
1883 | + <property name="label" translatable="yes">Set the time:</property> |
1884 | + </object> |
1885 | + <packing> |
1886 | + <property name="x_options">GTK_FILL</property> |
1887 | + <property name="y_options">GTK_FILL</property> |
1888 | + </packing> |
1889 | + </child> |
1890 | + <child> |
1891 | + <object class="GtkHBox" id="manualOptions"> |
1892 | + <property name="visible">True</property> |
1893 | + <property name="can_focus">False</property> |
1894 | + <property name="spacing">12</property> |
1895 | + <child> |
1896 | + <object class="GtkHBox" id="hbox8"> |
1897 | + <property name="visible">True</property> |
1898 | + <property name="can_focus">False</property> |
1899 | + <property name="spacing">6</property> |
1900 | + <child> |
1901 | + <object class="GtkSpinButton" id="timeSpinner"> |
1902 | + <property name="visible">True</property> |
1903 | + <property name="can_focus">True</property> |
1904 | + <property name="invisible_char">ā¢</property> |
1905 | + <property name="width_chars">11</property> |
1906 | + <property name="xalign">1</property> |
1907 | + <property name="invisible_char_set">True</property> |
1908 | + <property name="adjustment">timeAdjustment</property> |
1909 | + </object> |
1910 | + <packing> |
1911 | + <property name="expand">False</property> |
1912 | + <property name="fill">True</property> |
1913 | + <property name="position">0</property> |
1914 | + </packing> |
1915 | + </child> |
1916 | + </object> |
1917 | + <packing> |
1918 | + <property name="expand">False</property> |
1919 | + <property name="fill">True</property> |
1920 | + <property name="position">0</property> |
1921 | + </packing> |
1922 | + </child> |
1923 | + <child> |
1924 | + <object class="GtkHBox" id="hbox9"> |
1925 | + <property name="visible">True</property> |
1926 | + <property name="can_focus">False</property> |
1927 | + <property name="spacing">6</property> |
1928 | + <child> |
1929 | + <object class="GtkLabel" id="label10"> |
1930 | + <property name="visible">True</property> |
1931 | + <property name="can_focus">False</property> |
1932 | + <property name="xalign">0</property> |
1933 | + <property name="label" translatable="yes">_Date:</property> |
1934 | + <property name="use_underline">True</property> |
1935 | + <property name="mnemonic_widget">dateSpinner</property> |
1936 | + </object> |
1937 | + <packing> |
1938 | + <property name="expand">False</property> |
1939 | + <property name="fill">True</property> |
1940 | + <property name="position">0</property> |
1941 | + </packing> |
1942 | + </child> |
1943 | + <child> |
1944 | + <object class="GtkSpinButton" id="dateSpinner"> |
1945 | + <property name="visible">True</property> |
1946 | + <property name="can_focus">True</property> |
1947 | + <property name="invisible_char">ā¢</property> |
1948 | + <property name="width_chars">11</property> |
1949 | + <property name="xalign">1</property> |
1950 | + <property name="invisible_char_set">True</property> |
1951 | + <property name="adjustment">dateAdjustment</property> |
1952 | + </object> |
1953 | + <packing> |
1954 | + <property name="expand">False</property> |
1955 | + <property name="fill">True</property> |
1956 | + <property name="position">1</property> |
1957 | + </packing> |
1958 | + </child> |
1959 | + </object> |
1960 | + <packing> |
1961 | + <property name="expand">False</property> |
1962 | + <property name="fill">True</property> |
1963 | + <property name="position">1</property> |
1964 | + </packing> |
1965 | + </child> |
1966 | + </object> |
1967 | + <packing> |
1968 | + <property name="left_attach">1</property> |
1969 | + <property name="right_attach">2</property> |
1970 | + <property name="top_attach">1</property> |
1971 | + <property name="bottom_attach">2</property> |
1972 | + </packing> |
1973 | + </child> |
1974 | + <child> |
1975 | + <object class="GtkLabel" id="label11"> |
1976 | + <property name="visible">True</property> |
1977 | + <property name="can_focus">False</property> |
1978 | + <property name="xalign">1</property> |
1979 | + <property name="label" translatable="yes">Tim_e:</property> |
1980 | + <property name="use_underline">True</property> |
1981 | + <property name="mnemonic_widget">timeSpinner</property> |
1982 | + </object> |
1983 | + <packing> |
1984 | + <property name="top_attach">1</property> |
1985 | + <property name="bottom_attach">2</property> |
1986 | + <property name="x_options">GTK_FILL</property> |
1987 | + <property name="y_options">GTK_FILL</property> |
1988 | + </packing> |
1989 | + </child> |
1990 | + </object> |
1991 | + <packing> |
1992 | + <property name="expand">False</property> |
1993 | + <property name="fill">True</property> |
1994 | + <property name="position">1</property> |
1995 | + </packing> |
1996 | + </child> |
1997 | + </object> |
1998 | + <packing> |
1999 | + <property name="expand">True</property> |
2000 | + <property name="fill">True</property> |
2001 | + <property name="pack_type">end</property> |
2002 | + <property name="position">0</property> |
2003 | + </packing> |
2004 | + </child> |
2005 | + <child> |
2006 | + <placeholder/> |
2007 | + </child> |
2008 | + </object> |
2009 | + </child> |
2010 | + <child type="tab"> |
2011 | + <object class="GtkLabel" id="label1"> |
2012 | + <property name="visible">True</property> |
2013 | + <property name="can_focus">False</property> |
2014 | + <property name="xpad">1</property> |
2015 | + <property name="label" translatable="yes">_Time & Date</property> |
2016 | + <property name="use_underline">True</property> |
2017 | + </object> |
2018 | + <packing> |
2019 | + <property name="tab_fill">False</property> |
2020 | + </packing> |
2021 | + </child> |
2022 | + <child> |
2023 | + <object class="GtkAlignment" id="alignment1"> |
2024 | + <property name="visible">True</property> |
2025 | + <property name="can_focus">False</property> |
2026 | + <property name="yalign">0</property> |
2027 | + <property name="yscale">0</property> |
2028 | + <child> |
2029 | + <object class="GtkVBox" id="clockBox"> |
2030 | + <property name="visible">True</property> |
2031 | + <property name="can_focus">False</property> |
2032 | + <property name="border_width">12</property> |
2033 | + <property name="spacing">12</property> |
2034 | + <child> |
2035 | + <object class="GtkCheckButton" id="showClockCheck"> |
2036 | + <property name="label" translatable="yes">_Show a clock in the menu bar</property> |
2037 | + <property name="visible">True</property> |
2038 | + <property name="can_focus">True</property> |
2039 | + <property name="receives_default">False</property> |
2040 | + <property name="use_action_appearance">False</property> |
2041 | + <property name="use_underline">True</property> |
2042 | + <property name="xalign">0</property> |
2043 | + <property name="draw_indicator">True</property> |
2044 | + </object> |
2045 | + <packing> |
2046 | + <property name="expand">True</property> |
2047 | + <property name="fill">True</property> |
2048 | + <property name="position">0</property> |
2049 | + </packing> |
2050 | + </child> |
2051 | + <child> |
2052 | + <object class="GtkHBox" id="clockOptions"> |
2053 | + <property name="visible">True</property> |
2054 | + <property name="can_focus">False</property> |
2055 | + <property name="homogeneous">True</property> |
2056 | + <child> |
2057 | + <object class="GtkVBox" id="vbox2"> |
2058 | + <property name="visible">True</property> |
2059 | + <property name="can_focus">False</property> |
2060 | + <property name="spacing">6</property> |
2061 | + <child> |
2062 | + <object class="GtkLabel" id="label3"> |
2063 | + <property name="visible">True</property> |
2064 | + <property name="can_focus">False</property> |
2065 | + <property name="xalign">0</property> |
2066 | + <property name="label" translatable="yes">In the clock, show:</property> |
2067 | + </object> |
2068 | + <packing> |
2069 | + <property name="expand">False</property> |
2070 | + <property name="fill">True</property> |
2071 | + <property name="position">0</property> |
2072 | + </packing> |
2073 | + </child> |
2074 | + <child> |
2075 | + <object class="GtkCheckButton" id="showWeekdayCheck"> |
2076 | + <property name="label" translatable="yes">_Weekday</property> |
2077 | + <property name="visible">True</property> |
2078 | + <property name="can_focus">True</property> |
2079 | + <property name="receives_default">False</property> |
2080 | + <property name="use_action_appearance">False</property> |
2081 | + <property name="use_underline">True</property> |
2082 | + <property name="xalign">0</property> |
2083 | + <property name="draw_indicator">True</property> |
2084 | + </object> |
2085 | + <packing> |
2086 | + <property name="expand">False</property> |
2087 | + <property name="fill">True</property> |
2088 | + <property name="position">1</property> |
2089 | + </packing> |
2090 | + </child> |
2091 | + <child> |
2092 | + <object class="GtkCheckButton" id="showDateAndMonthCheck"> |
2093 | + <property name="label" translatable="yes">_Date and month</property> |
2094 | + <property name="visible">True</property> |
2095 | + <property name="can_focus">True</property> |
2096 | + <property name="receives_default">False</property> |
2097 | + <property name="use_action_appearance">False</property> |
2098 | + <property name="use_underline">True</property> |
2099 | + <property name="xalign">0</property> |
2100 | + <property name="draw_indicator">True</property> |
2101 | + </object> |
2102 | + <packing> |
2103 | + <property name="expand">False</property> |
2104 | + <property name="fill">True</property> |
2105 | + <property name="position">2</property> |
2106 | + </packing> |
2107 | + </child> |
2108 | + <child> |
2109 | + <object class="GtkAlignment" id="showYearAlignment"> |
2110 | + <property name="visible">True</property> |
2111 | + <property name="can_focus">False</property> |
2112 | + <property name="xalign">0</property> |
2113 | + <property name="yalign">0</property> |
2114 | + <property name="yscale">0</property> |
2115 | + <property name="left_padding">24</property> |
2116 | + <child> |
2117 | + <object class="GtkVBox" id="showYearVbox"> |
2118 | + <property name="visible">True</property> |
2119 | + <property name="can_focus">False</property> |
2120 | + <property name="spacing">6</property> |
2121 | + <child> |
2122 | + <object class="GtkCheckButton" id="showYearCheck"> |
2123 | + <property name="label" translatable="yes">_Year</property> |
2124 | + <property name="visible">True</property> |
2125 | + <property name="can_focus">True</property> |
2126 | + <property name="receives_default">False</property> |
2127 | + <property name="use_action_appearance">False</property> |
2128 | + <property name="use_underline">True</property> |
2129 | + <property name="xalign">0</property> |
2130 | + <property name="draw_indicator">True</property> |
2131 | + </object> |
2132 | + <packing> |
2133 | + <property name="expand">True</property> |
2134 | + <property name="fill">True</property> |
2135 | + <property name="position">0</property> |
2136 | + </packing> |
2137 | + </child> |
2138 | + </object> |
2139 | + </child> |
2140 | + </object> |
2141 | + <packing> |
2142 | + <property name="expand">False</property> |
2143 | + <property name="fill">True</property> |
2144 | + <property name="position">3</property> |
2145 | + </packing> |
2146 | + </child> |
2147 | + <child> |
2148 | + <object class="GtkVBox" id="vbox5"> |
2149 | + <property name="visible">True</property> |
2150 | + <property name="can_focus">False</property> |
2151 | + <child> |
2152 | + <object class="GtkRadioButton" id="show12HourRadio"> |
2153 | + <property name="label" translatable="yes">_12-hour time</property> |
2154 | + <property name="visible">True</property> |
2155 | + <property name="can_focus">True</property> |
2156 | + <property name="receives_default">False</property> |
2157 | + <property name="use_action_appearance">False</property> |
2158 | + <property name="use_underline">True</property> |
2159 | + <property name="xalign">0</property> |
2160 | + <property name="active">True</property> |
2161 | + <property name="draw_indicator">True</property> |
2162 | + </object> |
2163 | + <packing> |
2164 | + <property name="expand">False</property> |
2165 | + <property name="fill">True</property> |
2166 | + <property name="position">0</property> |
2167 | + </packing> |
2168 | + </child> |
2169 | + <child> |
2170 | + <object class="GtkRadioButton" id="show24HourRadio"> |
2171 | + <property name="label" translatable="yes">_24-hour time</property> |
2172 | + <property name="visible">True</property> |
2173 | + <property name="can_focus">True</property> |
2174 | + <property name="receives_default">False</property> |
2175 | + <property name="use_action_appearance">False</property> |
2176 | + <property name="use_underline">True</property> |
2177 | + <property name="xalign">0</property> |
2178 | + <property name="draw_indicator">True</property> |
2179 | + <property name="group">show12HourRadio</property> |
2180 | + </object> |
2181 | + <packing> |
2182 | + <property name="expand">False</property> |
2183 | + <property name="fill">True</property> |
2184 | + <property name="position">1</property> |
2185 | + </packing> |
2186 | + </child> |
2187 | + </object> |
2188 | + <packing> |
2189 | + <property name="expand">False</property> |
2190 | + <property name="fill">True</property> |
2191 | + <property name="position">4</property> |
2192 | + </packing> |
2193 | + </child> |
2194 | + <child> |
2195 | + <object class="GtkCheckButton" id="showSecondsCheck"> |
2196 | + <property name="label" translatable="yes">Seco_nds</property> |
2197 | + <property name="visible">True</property> |
2198 | + <property name="can_focus">True</property> |
2199 | + <property name="receives_default">False</property> |
2200 | + <property name="use_action_appearance">False</property> |
2201 | + <property name="use_underline">True</property> |
2202 | + <property name="xalign">0</property> |
2203 | + <property name="draw_indicator">True</property> |
2204 | + </object> |
2205 | + <packing> |
2206 | + <property name="expand">False</property> |
2207 | + <property name="fill">True</property> |
2208 | + <property name="position">5</property> |
2209 | + </packing> |
2210 | + </child> |
2211 | + </object> |
2212 | + <packing> |
2213 | + <property name="expand">True</property> |
2214 | + <property name="fill">True</property> |
2215 | + <property name="position">0</property> |
2216 | + </packing> |
2217 | + </child> |
2218 | + <child> |
2219 | + <object class="GtkVBox" id="vbox3"> |
2220 | + <property name="visible">True</property> |
2221 | + <property name="can_focus">False</property> |
2222 | + <property name="spacing">6</property> |
2223 | + <child> |
2224 | + <object class="GtkLabel" id="label4"> |
2225 | + <property name="visible">True</property> |
2226 | + <property name="can_focus">False</property> |
2227 | + <property name="xalign">0</property> |
2228 | + <property name="label" translatable="yes">In the clockās menu, show:</property> |
2229 | + </object> |
2230 | + <packing> |
2231 | + <property name="expand">True</property> |
2232 | + <property name="fill">True</property> |
2233 | + <property name="position">0</property> |
2234 | + </packing> |
2235 | + </child> |
2236 | + <child> |
2237 | + <object class="GtkCheckButton" id="showCalendarCheck"> |
2238 | + <property name="label" translatable="yes">_Monthly calendar</property> |
2239 | + <property name="visible">True</property> |
2240 | + <property name="can_focus">True</property> |
2241 | + <property name="receives_default">False</property> |
2242 | + <property name="use_action_appearance">False</property> |
2243 | + <property name="use_underline">True</property> |
2244 | + <property name="xalign">0</property> |
2245 | + <property name="draw_indicator">True</property> |
2246 | + </object> |
2247 | + <packing> |
2248 | + <property name="expand">False</property> |
2249 | + <property name="fill">True</property> |
2250 | + <property name="position">1</property> |
2251 | + </packing> |
2252 | + </child> |
2253 | + <child> |
2254 | + <object class="GtkAlignment" id="calendarOptions"> |
2255 | + <property name="visible">True</property> |
2256 | + <property name="can_focus">False</property> |
2257 | + <property name="xalign">0</property> |
2258 | + <property name="yalign">0</property> |
2259 | + <property name="yscale">0</property> |
2260 | + <property name="left_padding">24</property> |
2261 | + <child> |
2262 | + <object class="GtkVBox" id="vbox4"> |
2263 | + <property name="visible">True</property> |
2264 | + <property name="can_focus">False</property> |
2265 | + <property name="spacing">6</property> |
2266 | + <child> |
2267 | + <object class="GtkCheckButton" id="includeWeekNumbersCheck"> |
2268 | + <property name="label" translatable="yes">Include week num_bers</property> |
2269 | + <property name="visible">True</property> |
2270 | + <property name="can_focus">True</property> |
2271 | + <property name="receives_default">False</property> |
2272 | + <property name="use_action_appearance">False</property> |
2273 | + <property name="use_underline">True</property> |
2274 | + <property name="xalign">0</property> |
2275 | + <property name="draw_indicator">True</property> |
2276 | + </object> |
2277 | + <packing> |
2278 | + <property name="expand">True</property> |
2279 | + <property name="fill">True</property> |
2280 | + <property name="position">0</property> |
2281 | + </packing> |
2282 | + </child> |
2283 | + </object> |
2284 | + </child> |
2285 | + </object> |
2286 | + <packing> |
2287 | + <property name="expand">False</property> |
2288 | + <property name="fill">True</property> |
2289 | + <property name="position">2</property> |
2290 | + </packing> |
2291 | + </child> |
2292 | + <child> |
2293 | + <object class="GtkCheckButton" id="showEventsCheck"> |
2294 | + <property name="visible">True</property> |
2295 | + <property name="can_focus">True</property> |
2296 | + <property name="receives_default">False</property> |
2297 | + <property name="use_action_appearance">False</property> |
2298 | + <property name="use_underline">True</property> |
2299 | + <property name="xalign">0</property> |
2300 | + <property name="draw_indicator">True</property> |
2301 | + <child> |
2302 | + <object class="GtkLabel" id="label12"> |
2303 | + <property name="visible">True</property> |
2304 | + <property name="can_focus">False</property> |
2305 | + <property name="xalign">0</property> |
2306 | + <property name="label" translatable="yes">Coming _events from Evolution Calendar</property> |
2307 | + <property name="use_underline">True</property> |
2308 | + <property name="wrap">True</property> |
2309 | + <property name="mnemonic_widget">showEventsCheck</property> |
2310 | + </object> |
2311 | + </child> |
2312 | + </object> |
2313 | + <packing> |
2314 | + <property name="expand">False</property> |
2315 | + <property name="fill">True</property> |
2316 | + <property name="position">3</property> |
2317 | + </packing> |
2318 | + </child> |
2319 | + <child> |
2320 | + <object class="GtkCheckButton" id="showDetectedCheck"> |
2321 | + <property name="label" translatable="yes">Time in _auto-detected location</property> |
2322 | + <property name="visible">True</property> |
2323 | + <property name="can_focus">True</property> |
2324 | + <property name="receives_default">False</property> |
2325 | + <property name="use_action_appearance">False</property> |
2326 | + <property name="use_underline">True</property> |
2327 | + <property name="xalign">0</property> |
2328 | + <property name="draw_indicator">True</property> |
2329 | + </object> |
2330 | + <packing> |
2331 | + <property name="expand">False</property> |
2332 | + <property name="fill">True</property> |
2333 | + <property name="position">4</property> |
2334 | + </packing> |
2335 | + </child> |
2336 | + <child> |
2337 | + <object class="GtkCheckButton" id="showLocationsCheck"> |
2338 | + <property name="label" translatable="yes">Time in _other locations</property> |
2339 | + <property name="visible">True</property> |
2340 | + <property name="can_focus">True</property> |
2341 | + <property name="receives_default">False</property> |
2342 | + <property name="use_action_appearance">False</property> |
2343 | + <property name="use_underline">True</property> |
2344 | + <property name="xalign">0</property> |
2345 | + <property name="draw_indicator">True</property> |
2346 | + </object> |
2347 | + <packing> |
2348 | + <property name="expand">False</property> |
2349 | + <property name="fill">True</property> |
2350 | + <property name="position">5</property> |
2351 | + </packing> |
2352 | + </child> |
2353 | + <child> |
2354 | + <object class="GtkAlignment" id="alignment2"> |
2355 | + <property name="visible">True</property> |
2356 | + <property name="can_focus">False</property> |
2357 | + <property name="xalign">0</property> |
2358 | + <property name="yalign">0</property> |
2359 | + <property name="xscale">0</property> |
2360 | + <property name="yscale">0</property> |
2361 | + <property name="left_padding">24</property> |
2362 | + <child> |
2363 | + <object class="GtkButton" id="locationsButton"> |
2364 | + <property name="label" translatable="yes">Choose _Locationsā¦</property> |
2365 | + <property name="visible">True</property> |
2366 | + <property name="can_focus">True</property> |
2367 | + <property name="receives_default">True</property> |
2368 | + <property name="use_action_appearance">False</property> |
2369 | + <property name="use_underline">True</property> |
2370 | + <property name="xalign">0</property> |
2371 | + </object> |
2372 | + </child> |
2373 | + </object> |
2374 | + <packing> |
2375 | + <property name="expand">True</property> |
2376 | + <property name="fill">True</property> |
2377 | + <property name="position">6</property> |
2378 | + </packing> |
2379 | + </child> |
2380 | + </object> |
2381 | + <packing> |
2382 | + <property name="expand">True</property> |
2383 | + <property name="fill">True</property> |
2384 | + <property name="position">1</property> |
2385 | + </packing> |
2386 | + </child> |
2387 | + </object> |
2388 | + <packing> |
2389 | + <property name="expand">True</property> |
2390 | + <property name="fill">True</property> |
2391 | + <property name="position">1</property> |
2392 | + </packing> |
2393 | + </child> |
2394 | + </object> |
2395 | + </child> |
2396 | + </object> |
2397 | + <packing> |
2398 | + <property name="position">1</property> |
2399 | + <property name="tab_fill">False</property> |
2400 | + </packing> |
2401 | + </child> |
2402 | + <child type="tab"> |
2403 | + <object class="GtkLabel" id="label2"> |
2404 | + <property name="visible">True</property> |
2405 | + <property name="can_focus">False</property> |
2406 | + <property name="label" translatable="yes">_Clock</property> |
2407 | + <property name="use_underline">True</property> |
2408 | + </object> |
2409 | + <packing> |
2410 | + <property name="position">1</property> |
2411 | + <property name="tab_fill">False</property> |
2412 | + </packing> |
2413 | + </child> |
2414 | + </object> |
2415 | + </child> |
2416 | + </object> |
2417 | + <object class="GtkSizeGroup" id="timeSizeGroup"> |
2418 | + <widgets> |
2419 | + <widget name="label5"/> |
2420 | + <widget name="label9"/> |
2421 | + <widget name="label11"/> |
2422 | + </widgets> |
2423 | + </object> |
2424 | +</interface> |
2425 | |
2426 | === added file 'panels/datetime/datetime-prefs-locations.c' |
2427 | --- panels/datetime/datetime-prefs-locations.c 1970-01-01 00:00:00 +0000 |
2428 | +++ panels/datetime/datetime-prefs-locations.c 2014-03-03 10:09:16 +0000 |
2429 | @@ -0,0 +1,681 @@ |
2430 | +/* -*- Mode: C; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- |
2431 | + |
2432 | +A dialog for setting time and date preferences. |
2433 | + |
2434 | +Copyright 2011 Canonical Ltd. |
2435 | + |
2436 | +Authors: |
2437 | + Michael Terry <michael.terry@canonical.com> |
2438 | + |
2439 | +This program is free software: you can redistribute it and/or modify it |
2440 | +under the terms of the GNU General Public License version 3, as published |
2441 | +by the Free Software Foundation. |
2442 | + |
2443 | +This program is distributed in the hope that it will be useful, but |
2444 | +WITHOUT ANY WARRANTY; without even the implied warranties of |
2445 | +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
2446 | +PURPOSE. See the GNU General Public License for more details. |
2447 | + |
2448 | +You should have received a copy of the GNU General Public License along |
2449 | +with this program. If not, see <http://www.gnu.org/licenses/>. |
2450 | +*/ |
2451 | + |
2452 | +#include <config.h> |
2453 | + |
2454 | +#include <stdlib.h> |
2455 | +#include <time.h> /* time_t */ |
2456 | +#include <glib/gi18n-lib.h> |
2457 | +#include <gtk/gtk.h> |
2458 | +#include <timezonemap/timezone-completion.h> |
2459 | + |
2460 | +#include "datetime-prefs-locations.h" |
2461 | +#include "settings-shared.h" |
2462 | +#include "utils.h" |
2463 | + |
2464 | +#define DATETIME_DIALOG_UI_FILE PKGDATADIR "/ui/datetime/datetime-dialog.ui" |
2465 | + |
2466 | +#define COL_NAME 0 |
2467 | +#define COL_TIME 1 |
2468 | +#define COL_ZONE 2 |
2469 | +#define COL_VISIBLE_NAME 3 |
2470 | +#define COL_ICON 4 |
2471 | + |
2472 | +static gboolean update_times (GtkWidget * dlg); |
2473 | +static void save_when_idle (GtkWidget * dlg); |
2474 | + |
2475 | +/*** |
2476 | +**** Sorting |
2477 | +***/ |
2478 | + |
2479 | +/** |
2480 | + * A temporary struct used for sorting |
2481 | + */ |
2482 | +struct TimeLocation |
2483 | +{ |
2484 | + gchar * collated_name; |
2485 | + gint pos; |
2486 | + gint32 offset; |
2487 | +}; |
2488 | + |
2489 | +static struct TimeLocation* |
2490 | +time_location_new (const char * zone, const char * name, int pos, time_t now) |
2491 | +{ |
2492 | + struct TimeLocation * loc = g_new (struct TimeLocation, 1); |
2493 | + GTimeZone * tz = g_time_zone_new (zone); |
2494 | + const gint interval = g_time_zone_find_interval (tz, G_TIME_TYPE_UNIVERSAL, now); |
2495 | + loc->offset = g_time_zone_get_offset (tz, interval); |
2496 | + loc->collated_name = g_utf8_collate_key (name, -1); |
2497 | + loc->pos = pos; |
2498 | + g_time_zone_unref (tz); |
2499 | + return loc; |
2500 | +} |
2501 | + |
2502 | +static void |
2503 | +time_location_free (struct TimeLocation * loc) |
2504 | +{ |
2505 | + g_free (loc->collated_name); |
2506 | + g_free (loc); |
2507 | +} |
2508 | + |
2509 | +static GSList* |
2510 | +time_location_array_new_from_model (GtkTreeModel * model) |
2511 | +{ |
2512 | + int pos = 0; |
2513 | + GtkTreeIter iter; |
2514 | + GSList * list = NULL; |
2515 | + const time_t now = time (NULL); |
2516 | + |
2517 | + if (gtk_tree_model_get_iter_first (model, &iter)) do |
2518 | + { |
2519 | + gchar * zone = NULL; |
2520 | + gchar * name = NULL; |
2521 | + |
2522 | + gtk_tree_model_get (model, &iter, |
2523 | + COL_ZONE, &zone, |
2524 | + COL_VISIBLE_NAME, &name, |
2525 | + -1); |
2526 | + |
2527 | + if (zone && name) |
2528 | + list = g_slist_prepend (list, time_location_new (zone, name, pos++, now)); |
2529 | + |
2530 | + g_free (name); |
2531 | + g_free (zone); |
2532 | + } |
2533 | + while (gtk_tree_model_iter_next (model, &iter)); |
2534 | + |
2535 | + return g_slist_reverse (list); |
2536 | +} |
2537 | + |
2538 | +static void |
2539 | +handle_sort(GtkWidget * button G_GNUC_UNUSED, |
2540 | + GtkTreeView * tree_view, |
2541 | + GCompareFunc compare) |
2542 | +{ |
2543 | + GtkTreeModel * model = gtk_tree_view_get_model (tree_view); |
2544 | + GSList * l; |
2545 | + GSList * list = g_slist_sort (time_location_array_new_from_model(model), compare); |
2546 | + |
2547 | + gint i; |
2548 | + gint * reorder = g_new (gint, g_slist_length(list)); |
2549 | + for (i=0, l=list; l!=NULL; l=l->next, i++) |
2550 | + reorder[i] = ((struct TimeLocation*)l->data)->pos; |
2551 | + gtk_list_store_reorder (GTK_LIST_STORE(model), reorder); |
2552 | + |
2553 | + g_free (reorder); |
2554 | + g_slist_free_full (list, (GDestroyNotify)time_location_free); |
2555 | +} |
2556 | + |
2557 | +static gint |
2558 | +time_location_compare_by_name (gconstpointer ga, gconstpointer gb) |
2559 | +{ |
2560 | + const struct TimeLocation * a = ga; |
2561 | + const struct TimeLocation * b = gb; |
2562 | + int ret = g_strcmp0 (a->collated_name, b->collated_name); /* primary key */ |
2563 | + if (!ret) |
2564 | + ret = a->offset - b->offset; /* secondary key */ |
2565 | + return ret; |
2566 | +} |
2567 | +static void |
2568 | +handle_sort_by_name (GtkWidget * button, GtkTreeView * tree_view) |
2569 | +{ |
2570 | + handle_sort (button, tree_view, time_location_compare_by_name); |
2571 | +} |
2572 | + |
2573 | +static gint |
2574 | +time_location_compare_by_time (gconstpointer ga, gconstpointer gb) |
2575 | +{ |
2576 | + const struct TimeLocation * a = ga; |
2577 | + const struct TimeLocation * b = gb; |
2578 | + int ret = a->offset - b->offset; /* primary key */ |
2579 | + if (!ret) |
2580 | + ret = g_strcmp0 (a->collated_name, b->collated_name); /* secondary key */ |
2581 | + return ret; |
2582 | +} |
2583 | +static void |
2584 | +handle_sort_by_time (GtkWidget * button, GtkTreeView * tree_view) |
2585 | +{ |
2586 | + handle_sort (button, tree_view, time_location_compare_by_time); |
2587 | +} |
2588 | + |
2589 | +static gboolean |
2590 | +time_location_list_test_sorted (GSList * list, GCompareFunc compare) |
2591 | +{ |
2592 | + GSList * l; |
2593 | + for (l=list; l!=NULL && l->next!=NULL; l=l->next) |
2594 | + if (compare(l->data, l->next->data) > 0) |
2595 | + return FALSE; |
2596 | + return TRUE; |
2597 | +} |
2598 | +static void |
2599 | +location_model_test_sorted (GtkTreeModel * model, gboolean * is_sorted_by_name, gboolean * is_sorted_by_time) |
2600 | +{ |
2601 | + GSList * list = time_location_array_new_from_model(model); |
2602 | + *is_sorted_by_name = time_location_list_test_sorted (list, time_location_compare_by_name); |
2603 | + *is_sorted_by_time = time_location_list_test_sorted (list, time_location_compare_by_time); |
2604 | + g_slist_free_full (list, (GDestroyNotify)time_location_free); |
2605 | +} |
2606 | + |
2607 | +/*** |
2608 | +**** |
2609 | +***/ |
2610 | + |
2611 | +static void |
2612 | +handle_add (GtkWidget * button G_GNUC_UNUSED, GtkTreeView * tree) |
2613 | +{ |
2614 | + GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); |
2615 | + |
2616 | + GtkTreeIter iter; |
2617 | + gtk_list_store_append (store, &iter); |
2618 | + |
2619 | + GtkTreePath * path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter); |
2620 | + gtk_tree_view_set_cursor (tree, path, gtk_tree_view_get_column (tree, 0), TRUE); |
2621 | + gtk_tree_path_free (path); |
2622 | +} |
2623 | + |
2624 | +static void |
2625 | +handle_remove (GtkWidget * button G_GNUC_UNUSED, GtkTreeView * tree) |
2626 | +{ |
2627 | + GtkListStore * store = GTK_LIST_STORE (gtk_tree_view_get_model (tree)); |
2628 | + GtkTreeSelection * selection = gtk_tree_view_get_selection (tree); |
2629 | + |
2630 | + GList * paths = gtk_tree_selection_get_selected_rows (selection, NULL); |
2631 | + |
2632 | + /* Convert all paths to iters so we can safely delete multiple paths. For a |
2633 | + GtkListStore, iters persist past model changes. */ |
2634 | + GList * tree_iters = NULL; |
2635 | + GList * iter; |
2636 | + for (iter = paths; iter; iter = iter->next) { |
2637 | + GtkTreeIter * tree_iter = g_new(GtkTreeIter, 1); |
2638 | + if (gtk_tree_model_get_iter (GTK_TREE_MODEL (store), tree_iter, (GtkTreePath *)iter->data)) { |
2639 | + tree_iters = g_list_prepend (tree_iters, tree_iter); |
2640 | + } |
2641 | + gtk_tree_path_free (iter->data); |
2642 | + } |
2643 | + g_list_free (paths); |
2644 | + |
2645 | + // Find the next item to select |
2646 | + GtkTreeIter *last_selected = g_list_nth_data(tree_iters, 0); |
2647 | + GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL (store), last_selected); |
2648 | + GtkTreeIter titer; |
2649 | + if (!gtk_tree_model_get_iter(GTK_TREE_MODEL (store), &titer, path)) { |
2650 | + g_debug("Failed to get last selected iter from path"); |
2651 | + last_selected = NULL; |
2652 | + } else { |
2653 | + if (!gtk_tree_model_iter_next(GTK_TREE_MODEL (store), &titer)) { |
2654 | + if (gtk_tree_path_prev(path)) { |
2655 | + if (!gtk_tree_model_get_iter(GTK_TREE_MODEL (store), &titer, path)) { |
2656 | + g_debug("Failed to get iter from path"); |
2657 | + last_selected = NULL; |
2658 | + } else { |
2659 | + last_selected = &titer; |
2660 | + } |
2661 | + } else { |
2662 | + g_debug("handle_remove: Failed to find another location to select (assume single selected)"); |
2663 | + last_selected = NULL; |
2664 | + } |
2665 | + } else { |
2666 | + g_debug("Got next item in model"); |
2667 | + last_selected = &titer; |
2668 | + } |
2669 | + } |
2670 | + |
2671 | + if (last_selected) { |
2672 | + gboolean clear = TRUE; |
2673 | + path = gtk_tree_model_get_path(GTK_TREE_MODEL (store), last_selected); |
2674 | + |
2675 | + // Step over the path to find an item which isn't in the delete list |
2676 | + if (g_list_length(tree_iters) > 1) { |
2677 | + for (iter = tree_iters; iter; iter = iter->next) { |
2678 | + GtkTreePath *ipath = gtk_tree_model_get_path(GTK_TREE_MODEL (store), (GtkTreeIter *)iter->data); |
2679 | + if (gtk_tree_path_compare(path, ipath) == 0) { |
2680 | + clear = FALSE; |
2681 | + break; |
2682 | + } |
2683 | + } |
2684 | + while (clear == FALSE) { |
2685 | + if (gtk_tree_path_prev(path)) { |
2686 | + clear = TRUE; |
2687 | + for (iter = tree_iters; iter; iter = iter->next) { |
2688 | + GtkTreePath *ipath = gtk_tree_model_get_path(GTK_TREE_MODEL (store), (GtkTreeIter *)iter->data); |
2689 | + if (gtk_tree_path_compare(path, ipath) == 0) { |
2690 | + clear = FALSE; |
2691 | + break; |
2692 | + } |
2693 | + } |
2694 | + if (clear) { |
2695 | + if (!gtk_tree_model_get_iter(GTK_TREE_MODEL (store), &titer, path)) { |
2696 | + g_debug("Failed to get iter from path"); |
2697 | + last_selected = NULL; |
2698 | + } else { |
2699 | + last_selected = &titer; |
2700 | + } |
2701 | + } |
2702 | + } else { |
2703 | + last_selected = NULL; |
2704 | + break; |
2705 | + } |
2706 | + } |
2707 | + } |
2708 | + } |
2709 | + |
2710 | + /* Now delete each iterator */ |
2711 | + for (iter = tree_iters; iter; iter = iter->next) { |
2712 | + gtk_list_store_remove (store, (GtkTreeIter *)iter->data); |
2713 | + g_free (iter->data); |
2714 | + } |
2715 | + g_list_free (tree_iters); |
2716 | + |
2717 | + if (last_selected) |
2718 | + gtk_tree_selection_select_iter(selection, last_selected); |
2719 | +} |
2720 | + |
2721 | +static void |
2722 | +handle_edit (GtkCellRendererText * renderer G_GNUC_UNUSED, |
2723 | + gchar * path, |
2724 | + gchar * new_text, |
2725 | + GtkListStore * store) |
2726 | +{ |
2727 | + GtkTreeIter iter; |
2728 | + |
2729 | + // Manual user edits are always wrong (unless they are undoing a previous |
2730 | + // edit), so we set the error icon here if needed. Common way to get to |
2731 | + // this code path is to lose entry focus. |
2732 | + if (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path)) { |
2733 | + gchar * name; |
2734 | + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, COL_NAME, &name, -1); |
2735 | + gboolean correct = g_strcmp0 (name, new_text) == 0; |
2736 | + g_free (name); |
2737 | + |
2738 | + gtk_list_store_set (store, &iter, |
2739 | + COL_VISIBLE_NAME, new_text, |
2740 | + COL_ICON, correct ? NULL : "dialog-error", |
2741 | + -1); |
2742 | + } |
2743 | +} |
2744 | + |
2745 | +static gboolean |
2746 | +timezone_selected (GtkEntryCompletion * widget, GtkTreeModel * model, |
2747 | + GtkTreeIter * iter, GtkWidget * dlg) |
2748 | +{ |
2749 | + gchar * zone = NULL; |
2750 | + gchar * name = NULL; |
2751 | + |
2752 | + gtk_tree_model_get (model, iter, |
2753 | + CC_TIMEZONE_COMPLETION_ZONE, &zone, |
2754 | + CC_TIMEZONE_COMPLETION_NAME, &name, |
2755 | + -1); |
2756 | + |
2757 | + /* if no explicit timezone, try to determine one from latlon */ |
2758 | + if (!zone || !*zone) |
2759 | + { |
2760 | + gchar * strlat = NULL; |
2761 | + gchar * strlon = NULL; |
2762 | + gdouble lat = 0; |
2763 | + gdouble lon = 0; |
2764 | + |
2765 | + gtk_tree_model_get (model, iter, |
2766 | + CC_TIMEZONE_COMPLETION_LATITUDE, &strlat, |
2767 | + CC_TIMEZONE_COMPLETION_LONGITUDE, &strlon, |
2768 | + -1); |
2769 | + |
2770 | + if (strlat && *strlat) lat = g_ascii_strtod(strlat, NULL); |
2771 | + if (strlon && *strlon) lon = g_ascii_strtod(strlon, NULL); |
2772 | + |
2773 | + CcTimezoneMap * tzmap = CC_TIMEZONE_MAP (g_object_get_data (G_OBJECT (widget), "tzmap")); |
2774 | + g_free (zone); |
2775 | + zone = g_strdup (cc_timezone_map_get_timezone_at_coords (tzmap, lon, lat)); |
2776 | + |
2777 | + g_free (strlat); |
2778 | + g_free (strlon); |
2779 | + } |
2780 | + |
2781 | + GtkListStore * store = GTK_LIST_STORE (g_object_get_data (G_OBJECT (widget), "store")); |
2782 | + GtkTreeIter * store_iter = (GtkTreeIter *)g_object_get_data (G_OBJECT (widget), "store_iter"); |
2783 | + if (store != NULL && store_iter != NULL) { |
2784 | + gtk_list_store_set (store, store_iter, |
2785 | + COL_VISIBLE_NAME, name, |
2786 | + COL_ICON, NULL, |
2787 | + COL_NAME, name, |
2788 | + COL_ZONE, zone, -1); |
2789 | + } |
2790 | + |
2791 | + update_times (dlg); |
2792 | + |
2793 | + /* cleanup */ |
2794 | + g_free (name); |
2795 | + g_free (zone); |
2796 | + |
2797 | + return FALSE; // Do normal action too |
2798 | +} |
2799 | + |
2800 | +static gboolean |
2801 | +query_tooltip (GtkTreeView * tree, gint x, gint y, gboolean keyboard_mode, |
2802 | + GtkTooltip * tooltip, GtkCellRenderer * cell) |
2803 | +{ |
2804 | + GtkTreeModel * model; |
2805 | + GtkTreeIter iter; |
2806 | + if (!gtk_tree_view_get_tooltip_context (tree, &x, &y, keyboard_mode, |
2807 | + &model, NULL, &iter)) |
2808 | + return FALSE; |
2809 | + |
2810 | + const gchar * icon; |
2811 | + gtk_tree_model_get (model, &iter, COL_ICON, &icon, -1); |
2812 | + if (icon == NULL) |
2813 | + return FALSE; |
2814 | + |
2815 | + GtkTreeViewColumn * col = gtk_tree_view_get_column (tree, 0); |
2816 | + gtk_tree_view_set_tooltip_cell (tree, tooltip, NULL, col, cell); |
2817 | + gtk_tooltip_set_text (tooltip, _("You need to complete this location for it to appear in the menu.")); |
2818 | + return TRUE; |
2819 | +} |
2820 | + |
2821 | +static void |
2822 | +handle_edit_started (GtkCellRendererText * renderer G_GNUC_UNUSED, |
2823 | + GtkCellEditable * editable, |
2824 | + gchar * path, |
2825 | + CcTimezoneCompletion * completion) |
2826 | +{ |
2827 | + if (GTK_IS_ENTRY (editable)) { |
2828 | + GtkEntry *entry = GTK_ENTRY (editable); |
2829 | + cc_timezone_completion_watch_entry (completion, entry); |
2830 | + |
2831 | + GtkListStore * store = GTK_LIST_STORE (g_object_get_data (G_OBJECT (completion), "store")); |
2832 | + GtkTreeIter * store_iter = g_new(GtkTreeIter, 1); |
2833 | + if (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), store_iter, path)) { |
2834 | + g_object_set_data_full (G_OBJECT (completion), "store_iter", store_iter, g_free); |
2835 | + } |
2836 | + } |
2837 | +} |
2838 | + |
2839 | +static gboolean |
2840 | +update_times (GtkWidget * dlg) |
2841 | +{ |
2842 | + /* For each entry, check zone in column 2 and set column 1 to it's time */ |
2843 | + CcTimezoneCompletion * completion = CC_TIMEZONE_COMPLETION (g_object_get_data (G_OBJECT (dlg), "completion")); |
2844 | + GtkListStore * store = GTK_LIST_STORE (g_object_get_data (G_OBJECT (completion), "store")); |
2845 | + GObject * cell = G_OBJECT (g_object_get_data (G_OBJECT (completion), "name-cell")); |
2846 | + |
2847 | + gboolean editing; |
2848 | + g_object_get (cell, "editing", &editing, NULL); |
2849 | + if (editing) { /* No updates while editing, it cancels the edit */ |
2850 | + return TRUE; |
2851 | + } |
2852 | + |
2853 | + g_signal_handlers_block_by_func (store, save_when_idle, dlg); |
2854 | + |
2855 | + GSettings * settings = g_settings_new (SETTINGS_INTERFACE); |
2856 | + GtkTreeIter iter; |
2857 | + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter)) { |
2858 | + GDateTime * now = g_date_time_new_now_local (); |
2859 | + do { |
2860 | + gchar * strzone; |
2861 | + |
2862 | + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, COL_ZONE, &strzone, -1); |
2863 | + |
2864 | + if (strzone && *strzone) { |
2865 | + GTimeZone * tz = g_time_zone_new (strzone); |
2866 | + GDateTime * now_tz = g_date_time_to_timezone (now, tz); |
2867 | + gchar * format = generate_full_format_string_at_time (now, now_tz, settings); |
2868 | + gchar * time_str = g_date_time_format (now_tz, format); |
2869 | + gchar * old_time_str; |
2870 | + |
2871 | + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, COL_TIME, &old_time_str, -1); |
2872 | + if (g_strcmp0 (old_time_str, time_str)) |
2873 | + gtk_list_store_set (store, &iter, COL_TIME, time_str, -1); |
2874 | + |
2875 | + g_free (old_time_str); |
2876 | + g_free (time_str); |
2877 | + g_free (format); |
2878 | + g_date_time_unref (now_tz); |
2879 | + g_time_zone_unref (tz); |
2880 | + } |
2881 | + g_free (strzone); |
2882 | + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); |
2883 | + g_date_time_unref (now); |
2884 | + } |
2885 | + |
2886 | + g_object_unref (settings); |
2887 | + |
2888 | + g_signal_handlers_unblock_by_func (store, save_when_idle, dlg); |
2889 | + |
2890 | + return TRUE; |
2891 | +} |
2892 | + |
2893 | +static void |
2894 | +fill_from_settings (GObject * store, GSettings * conf) |
2895 | +{ |
2896 | + gchar ** locations = g_settings_get_strv (conf, SETTINGS_LOCATIONS_S); |
2897 | + |
2898 | + gtk_list_store_clear (GTK_LIST_STORE (store)); |
2899 | + |
2900 | + gchar ** striter; |
2901 | + GtkTreeIter iter; |
2902 | + for (striter = locations; *striter; ++striter) { |
2903 | + gchar * zone, * name; |
2904 | + split_settings_location (*striter, &zone, &name); |
2905 | + |
2906 | + gtk_list_store_append (GTK_LIST_STORE (store), &iter); |
2907 | + gtk_list_store_set (GTK_LIST_STORE (store), &iter, |
2908 | + COL_VISIBLE_NAME, name, |
2909 | + COL_ICON, NULL, |
2910 | + COL_NAME, name, |
2911 | + COL_ZONE, zone, -1); |
2912 | + |
2913 | + g_free (zone); |
2914 | + g_free (name); |
2915 | + } |
2916 | + |
2917 | + g_strfreev (locations); |
2918 | +} |
2919 | + |
2920 | +static void |
2921 | +save_to_settings (GObject * store, GSettings * conf) |
2922 | +{ |
2923 | + gboolean empty = TRUE; |
2924 | + GVariantBuilder builder; |
2925 | + g_variant_builder_init (&builder, G_VARIANT_TYPE_STRING_ARRAY); |
2926 | + |
2927 | + GtkTreeIter iter; |
2928 | + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter)) { |
2929 | + GString * gstr = g_string_new (NULL); |
2930 | + do { |
2931 | + gchar * strname; |
2932 | + gchar * strzone; |
2933 | + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, |
2934 | + COL_NAME, &strname, |
2935 | + COL_ZONE, &strzone, |
2936 | + -1); |
2937 | + if (strzone && *strzone && strname && *strname) { |
2938 | + g_string_printf (gstr, "%s %s", strzone, strname); |
2939 | + g_variant_builder_add (&builder, "s", gstr->str); |
2940 | + empty = FALSE; |
2941 | + } |
2942 | + g_free (strname); |
2943 | + g_free (strzone); |
2944 | + } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); |
2945 | + g_string_free (gstr, TRUE); |
2946 | + } |
2947 | + |
2948 | + if (empty) { |
2949 | + /* Empty list */ |
2950 | + g_variant_builder_clear (&builder); |
2951 | + g_settings_set_strv (conf, SETTINGS_LOCATIONS_S, NULL); |
2952 | + } |
2953 | + else { |
2954 | + g_settings_set_value (conf, SETTINGS_LOCATIONS_S, g_variant_builder_end (&builder)); |
2955 | + } |
2956 | +} |
2957 | + |
2958 | +static gboolean |
2959 | +save_now (GtkWidget *dlg) |
2960 | +{ |
2961 | + GSettings * conf = G_SETTINGS (g_object_get_data (G_OBJECT (dlg), "conf")); |
2962 | + GObject * completion = G_OBJECT (g_object_get_data (G_OBJECT (dlg), "completion")); |
2963 | + GObject * store = G_OBJECT (g_object_get_data (completion, "store")); |
2964 | + |
2965 | + save_to_settings (store, conf); |
2966 | + |
2967 | + g_object_set_data (G_OBJECT (dlg), "save-id", GINT_TO_POINTER(0)); |
2968 | + |
2969 | + return FALSE; |
2970 | +} |
2971 | + |
2972 | +static void |
2973 | +save_when_idle (GtkWidget *dlg) |
2974 | +{ |
2975 | + guint save_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dlg), "save-id")); |
2976 | + |
2977 | + if (save_id == 0) { |
2978 | + save_id = g_idle_add ((GSourceFunc)save_now, dlg); |
2979 | + g_object_set_data (G_OBJECT (dlg), "save-id", GINT_TO_POINTER(save_id)); |
2980 | + } |
2981 | +} |
2982 | + |
2983 | +static void |
2984 | +dialog_closed (GtkWidget * dlg, GObject * store G_GNUC_UNUSED) |
2985 | +{ |
2986 | + /* Cleanup a tad */ |
2987 | + guint time_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dlg), "time-id")); |
2988 | + g_source_remove (time_id); |
2989 | + |
2990 | + guint save_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (dlg), "save-id")); |
2991 | + if (save_id > 0) |
2992 | + g_source_remove (save_id); |
2993 | +} |
2994 | + |
2995 | +static void |
2996 | +selection_changed (GtkTreeSelection * selection, GtkWidget * remove_button) |
2997 | +{ |
2998 | + gint count = gtk_tree_selection_count_selected_rows (selection); |
2999 | + gtk_widget_set_sensitive (remove_button, count > 0); |
3000 | +} |
3001 | + |
3002 | +static void |
3003 | +update_button_sensitivity (GtkWidget * dlg) |
3004 | +{ |
3005 | + GObject * odlg = G_OBJECT(dlg); |
3006 | + GObject * completion = g_object_get_data(odlg, "completion"); |
3007 | + GtkTreeModel * model = GTK_TREE_MODEL (g_object_get_data (completion, "store")); |
3008 | + gboolean is_sorted_by_name; |
3009 | + gboolean is_sorted_by_time; |
3010 | + location_model_test_sorted (model, &is_sorted_by_name, &is_sorted_by_time); |
3011 | + gtk_widget_set_sensitive (GTK_WIDGET(g_object_get_data(odlg, "sortByNameButton")), !is_sorted_by_name); |
3012 | + gtk_widget_set_sensitive (GTK_WIDGET(g_object_get_data(odlg, "sortByTimeButton")), !is_sorted_by_time); |
3013 | +} |
3014 | + |
3015 | +static void |
3016 | +model_changed (GtkWidget * dlg) |
3017 | +{ |
3018 | + update_button_sensitivity (dlg); |
3019 | + save_when_idle (dlg); |
3020 | +} |
3021 | + |
3022 | +GtkWidget * |
3023 | +datetime_setup_locations_dialog (CcTimezoneMap * map) |
3024 | +{ |
3025 | + GError * error = NULL; |
3026 | + GtkBuilder * builder = gtk_builder_new (); |
3027 | + gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE); |
3028 | + gtk_builder_add_from_file (builder, DATETIME_DIALOG_UI_FILE, &error); |
3029 | + if (error != NULL) { |
3030 | + /* We have to abort, we can't continue without the ui file */ |
3031 | + g_error ("Could not load ui file %s: %s", DATETIME_DIALOG_UI_FILE, error->message); |
3032 | + g_error_free (error); |
3033 | + return NULL; |
3034 | + } |
3035 | + |
3036 | + GSettings * conf = g_settings_new (SETTINGS_INTERFACE); |
3037 | + |
3038 | +#define WIG(name) GTK_WIDGET (gtk_builder_get_object (builder, name)) |
3039 | + |
3040 | + GtkWidget * dlg = WIG ("locationsDialog"); |
3041 | + GtkWidget * tree = WIG ("locationsView"); |
3042 | + GObject * store = gtk_builder_get_object (builder, "locationsStore"); |
3043 | + |
3044 | + /* Configure tree */ |
3045 | + CcTimezoneCompletion * completion = cc_timezone_completion_new (); |
3046 | + g_object_set_data (G_OBJECT (completion), "tzmap", map); |
3047 | + g_object_set_data (G_OBJECT (completion), "store", store); |
3048 | + g_signal_connect (completion, "match-selected", G_CALLBACK (timezone_selected), dlg); |
3049 | + |
3050 | + GtkCellRenderer * cell = gtk_cell_renderer_text_new (); |
3051 | + g_object_set (cell, "editable", TRUE, NULL); |
3052 | + g_signal_connect (cell, "editing-started", G_CALLBACK (handle_edit_started), completion); |
3053 | + g_signal_connect (cell, "edited", G_CALLBACK (handle_edit), store); |
3054 | + gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree), -1, |
3055 | + _("Location"), cell, |
3056 | + "text", COL_VISIBLE_NAME, NULL); |
3057 | + GtkTreeViewColumn * loc_col = gtk_tree_view_get_column (GTK_TREE_VIEW (tree), 0); |
3058 | + gtk_tree_view_column_set_expand (loc_col, TRUE); |
3059 | + g_object_set_data (G_OBJECT (completion), "name-cell", cell); |
3060 | + |
3061 | + cell = gtk_cell_renderer_pixbuf_new (); |
3062 | + gtk_tree_view_column_pack_start (loc_col, cell, FALSE); |
3063 | + gtk_tree_view_column_add_attribute (loc_col, cell, "icon-name", COL_ICON); |
3064 | + |
3065 | + gtk_widget_set_has_tooltip (tree, TRUE); |
3066 | + g_signal_connect (tree, "query-tooltip", G_CALLBACK (query_tooltip), cell); |
3067 | + |
3068 | + cell = gtk_cell_renderer_text_new (); |
3069 | + gtk_cell_renderer_set_alignment (cell, 1.0f, 0.5f); |
3070 | + gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (tree), -1, |
3071 | + _("Time"), cell, |
3072 | + "text", COL_TIME, NULL); |
3073 | + |
3074 | + GtkTreeSelection * selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree)); |
3075 | + gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE); |
3076 | + g_signal_connect (selection, "changed", G_CALLBACK (selection_changed), WIG ("removeButton")); |
3077 | + selection_changed (selection, WIG ("removeButton")); |
3078 | + |
3079 | + g_signal_connect (WIG ("addButton"), "clicked", G_CALLBACK (handle_add), tree); |
3080 | + g_signal_connect (WIG ("removeButton"), "clicked", G_CALLBACK (handle_remove), tree); |
3081 | + |
3082 | + GtkWidget * w = WIG ("sortByNameButton"); |
3083 | + g_signal_connect (w, "clicked", G_CALLBACK (handle_sort_by_name), tree); |
3084 | + g_object_set_data (G_OBJECT(dlg), "sortByNameButton", w); |
3085 | + |
3086 | + w = WIG ("sortByTimeButton"); |
3087 | + g_signal_connect (w, "clicked", G_CALLBACK (handle_sort_by_time), tree); |
3088 | + g_object_set_data (G_OBJECT(dlg), "sortByTimeButton", w); |
3089 | + |
3090 | + fill_from_settings (store, conf); |
3091 | + g_signal_connect_swapped (store, "row-deleted", G_CALLBACK (model_changed), dlg); |
3092 | + g_signal_connect_swapped (store, "row-inserted", G_CALLBACK (model_changed), dlg); |
3093 | + g_signal_connect_swapped (store, "row-changed", G_CALLBACK (model_changed), dlg); |
3094 | + g_signal_connect_swapped (store, "rows-reordered", G_CALLBACK (model_changed), dlg); |
3095 | + g_object_set_data_full (G_OBJECT (dlg), "conf", g_object_ref (conf), g_object_unref); |
3096 | + g_object_set_data_full (G_OBJECT (dlg), "completion", completion, g_object_unref); |
3097 | + g_signal_connect (dlg, "destroy", G_CALLBACK (dialog_closed), store); |
3098 | + |
3099 | + guint time_id = g_timeout_add_seconds (2, (GSourceFunc)update_times, dlg); |
3100 | + g_object_set_data (G_OBJECT (dlg), "time-id", GINT_TO_POINTER(time_id)); |
3101 | + update_times (dlg); |
3102 | + |
3103 | +#undef WIG |
3104 | + |
3105 | + g_object_unref (conf); |
3106 | + g_object_unref (builder); |
3107 | + |
3108 | + return dlg; |
3109 | +} |
3110 | + |
3111 | |
3112 | === added file 'panels/datetime/datetime-prefs-locations.h' |
3113 | --- panels/datetime/datetime-prefs-locations.h 1970-01-01 00:00:00 +0000 |
3114 | +++ panels/datetime/datetime-prefs-locations.h 2014-03-03 10:09:16 +0000 |
3115 | @@ -0,0 +1,35 @@ |
3116 | +/* -*- Mode: C; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- |
3117 | + |
3118 | +A dialog for setting time and date preferences. |
3119 | + |
3120 | +Copyright 2011 Canonical Ltd. |
3121 | + |
3122 | +Authors: |
3123 | + Michael Terry <michael.terry@canonical.com> |
3124 | + |
3125 | +This program is free software: you can redistribute it and/or modify it |
3126 | +under the terms of the GNU General Public License version 3, as published |
3127 | +by the Free Software Foundation. |
3128 | + |
3129 | +This program is distributed in the hope that it will be useful, but |
3130 | +WITHOUT ANY WARRANTY; without even the implied warranties of |
3131 | +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
3132 | +PURPOSE. See the GNU General Public License for more details. |
3133 | + |
3134 | +You should have received a copy of the GNU General Public License along |
3135 | +with this program. If not, see <http://www.gnu.org/licenses/>. |
3136 | +*/ |
3137 | + |
3138 | +#ifndef __DATETIME_PREFS_LOCATIONS_H__ |
3139 | +#define __DATETIME_PREFS_LOCATIONS_H__ |
3140 | + |
3141 | +#include <gtk/gtk.h> |
3142 | +#include <timezonemap/cc-timezone-map.h> |
3143 | + |
3144 | +G_BEGIN_DECLS |
3145 | + |
3146 | +GtkWidget * datetime_setup_locations_dialog (CcTimezoneMap * map); |
3147 | + |
3148 | +G_END_DECLS |
3149 | + |
3150 | +#endif |
3151 | |
3152 | === added file 'panels/datetime/datetime-prefs.c' |
3153 | --- panels/datetime/datetime-prefs.c 1970-01-01 00:00:00 +0000 |
3154 | +++ panels/datetime/datetime-prefs.c 2014-03-03 10:09:16 +0000 |
3155 | @@ -0,0 +1,860 @@ |
3156 | +/* -*- Mode: C; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- |
3157 | + |
3158 | +A dialog for setting time and date preferences. |
3159 | + |
3160 | +Copyright 2011 Canonical Ltd. |
3161 | + |
3162 | +Authors: |
3163 | + Ted Gould <ted@canonical.com> |
3164 | + Michael Terry <michael.terry@canonical.com> |
3165 | + |
3166 | +This program is free software: you can redistribute it and/or modify it |
3167 | +under the terms of the GNU General Public License version 3, as published |
3168 | +by the Free Software Foundation. |
3169 | + |
3170 | +This program is distributed in the hope that it will be useful, but |
3171 | +WITHOUT ANY WARRANTY; without even the implied warranties of |
3172 | +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
3173 | +PURPOSE. See the GNU General Public License for more details. |
3174 | + |
3175 | +You should have received a copy of the GNU General Public License along |
3176 | +with this program. If not, see <http://www.gnu.org/licenses/>. |
3177 | +*/ |
3178 | + |
3179 | +#include <config.h> |
3180 | + |
3181 | +#include <stdlib.h> |
3182 | +#include <libintl.h> |
3183 | +#include <locale.h> |
3184 | +#include <langinfo.h> |
3185 | +#include <glib/gi18n-lib.h> |
3186 | +#include <gdk/gdkkeysyms.h> |
3187 | +#include <gtk/gtk.h> |
3188 | +#include <polkit/polkit.h> |
3189 | +#include <shell/cc-panel.h> |
3190 | +#include <timezonemap/cc-timezone-map.h> |
3191 | +#include <timezonemap/timezone-completion.h> |
3192 | + |
3193 | +#include "settings-shared.h" |
3194 | +#include "utils.h" |
3195 | +#include "datetime-prefs-locations.h" |
3196 | + |
3197 | +#define DATETIME_DIALOG_UI_FILE PKGDATADIR "/ui/datetime/datetime-dialog.ui" |
3198 | + |
3199 | +#define INDICATOR_DATETIME_TYPE_PANEL indicator_datetime_panel_get_type() |
3200 | + |
3201 | +typedef struct _IndicatorDatetimePanel IndicatorDatetimePanel; |
3202 | +typedef struct _IndicatorDatetimePanelPrivate IndicatorDatetimePanelPrivate; |
3203 | +typedef struct _IndicatorDatetimePanelClass IndicatorDatetimePanelClass; |
3204 | + |
3205 | +struct _IndicatorDatetimePanel |
3206 | +{ |
3207 | + CcPanel parent; |
3208 | + IndicatorDatetimePanelPrivate * priv; |
3209 | +}; |
3210 | + |
3211 | +struct _IndicatorDatetimePanelPrivate |
3212 | +{ |
3213 | + guint name_watch_id; |
3214 | + GtkBuilder * builder; |
3215 | + GDBusProxy * proxy; |
3216 | + GtkWidget * auto_radio; |
3217 | + GtkWidget * tz_entry; |
3218 | + CcTimezoneMap * tzmap; |
3219 | + GtkWidget * time_spin; |
3220 | + GtkWidget * date_spin; |
3221 | + guint save_time_id; |
3222 | + gboolean user_edited_time; |
3223 | + gboolean changing_time; |
3224 | + GtkWidget * loc_dlg; |
3225 | + GSettings * settings; |
3226 | + CcTimezoneCompletion * completion; |
3227 | +}; |
3228 | + |
3229 | +struct _IndicatorDatetimePanelClass |
3230 | +{ |
3231 | + CcPanelClass parent_class; |
3232 | +}; |
3233 | + |
3234 | +G_DEFINE_DYNAMIC_TYPE (IndicatorDatetimePanel, indicator_datetime_panel, CC_TYPE_PANEL) |
3235 | + |
3236 | +/* Turns the boolean property into a string gsettings */ |
3237 | +static GVariant * |
3238 | +bind_hours_set (const GValue * value, |
3239 | + const GVariantType * type G_GNUC_UNUSED, |
3240 | + gpointer user_data) |
3241 | +{ |
3242 | + const gchar * output = NULL; |
3243 | + gboolean is_12hour_button = (gboolean)GPOINTER_TO_INT(user_data); |
3244 | + |
3245 | + if (g_value_get_boolean(value)) { |
3246 | + /* Only do anything if we're setting active = true */ |
3247 | + output = is_12hour_button ? "12-hour" : "24-hour"; |
3248 | + } else { |
3249 | + return NULL; |
3250 | + } |
3251 | + |
3252 | + return g_variant_new_string (output); |
3253 | +} |
3254 | + |
3255 | +/* Turns a string gsettings into a boolean property */ |
3256 | +static gboolean |
3257 | +bind_hours_get (GValue * value, GVariant * variant, gpointer user_data) |
3258 | +{ |
3259 | + const gchar * str = g_variant_get_string(variant, NULL); |
3260 | + gboolean output = FALSE; |
3261 | + gboolean is_12hour_button = (gboolean)GPOINTER_TO_INT(user_data); |
3262 | + |
3263 | + if (g_strcmp0(str, "locale-default") == 0) { |
3264 | + output = (is_12hour_button == is_locale_12h ()); |
3265 | + } else if (g_strcmp0(str, "12-hour") == 0) { |
3266 | + output = is_12hour_button; |
3267 | + } else if (g_strcmp0(str, "24-hour") == 0) { |
3268 | + output = !is_12hour_button; |
3269 | + } else { |
3270 | + return FALSE; |
3271 | + } |
3272 | + |
3273 | + g_value_set_boolean (value, output); |
3274 | + return TRUE; |
3275 | +} |
3276 | + |
3277 | +static void |
3278 | +widget_dependency_cb (GtkWidget * parent, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
3279 | +{ |
3280 | + gboolean active, sensitive; |
3281 | + g_object_get (G_OBJECT (parent), |
3282 | + "active", &active, |
3283 | + "sensitive", &sensitive, NULL); |
3284 | + gtk_widget_set_sensitive (dependent, active && sensitive); |
3285 | +} |
3286 | + |
3287 | +static void |
3288 | +add_widget_dependency (GtkWidget * parent, GtkWidget * dependent) |
3289 | +{ |
3290 | + g_signal_connect (parent, "notify::active", G_CALLBACK(widget_dependency_cb), |
3291 | + dependent); |
3292 | + g_signal_connect (parent, "notify::sensitive", G_CALLBACK(widget_dependency_cb), |
3293 | + dependent); |
3294 | + widget_dependency_cb (parent, NULL, dependent); |
3295 | +} |
3296 | + |
3297 | +static void |
3298 | +polkit_dependency_cb (GPermission * permission, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
3299 | +{ |
3300 | + gboolean allowed = FALSE; |
3301 | + |
3302 | + g_object_get (G_OBJECT (permission), |
3303 | + "allowed", &allowed, NULL); |
3304 | + |
3305 | + gtk_widget_set_sensitive (dependent, allowed); |
3306 | +} |
3307 | + |
3308 | +static void |
3309 | +add_polkit_dependency_helper (GtkWidget * parent, GParamSpec *pspec G_GNUC_UNUSED, GtkWidget * dependent) |
3310 | +{ |
3311 | + GtkLockButton * button = GTK_LOCK_BUTTON (parent); |
3312 | + GPermission * permission = gtk_lock_button_get_permission (button); |
3313 | + g_signal_connect (permission, "notify::allowed", |
3314 | + G_CALLBACK(polkit_dependency_cb), dependent); |
3315 | + polkit_dependency_cb (permission, NULL, dependent); |
3316 | +} |
3317 | + |
3318 | +static void |
3319 | +add_polkit_dependency (GtkWidget * parent, GtkWidget * dependent) |
3320 | +{ |
3321 | + /* polkit async hasn't finished at this point, so wait for permission to come in */ |
3322 | + g_signal_connect (parent, "notify::permission", G_CALLBACK(add_polkit_dependency_helper), |
3323 | + dependent); |
3324 | + gtk_widget_set_sensitive (dependent, FALSE); |
3325 | +} |
3326 | + |
3327 | +static void |
3328 | +polkit_perm_ready (GObject *source_object G_GNUC_UNUSED, GAsyncResult *res, gpointer user_data) |
3329 | +{ |
3330 | + GError * error = NULL; |
3331 | + GPermission * permission = polkit_permission_new_finish (res, &error); |
3332 | + |
3333 | + if (error != NULL) { |
3334 | + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
3335 | + g_warning ("Could not get permission object: %s", error->message); |
3336 | + g_error_free (error); |
3337 | + return; |
3338 | + } |
3339 | + |
3340 | + GtkLockButton * button = GTK_LOCK_BUTTON (user_data); |
3341 | + gtk_lock_button_set_permission (button, permission); |
3342 | +} |
3343 | + |
3344 | +static void |
3345 | +dbus_set_answered (GObject *object, GAsyncResult *res, gpointer command) |
3346 | +{ |
3347 | + GError * error = NULL; |
3348 | + GVariant * answers = g_dbus_proxy_call_finish (G_DBUS_PROXY (object), res, &error); |
3349 | + |
3350 | + if (error != NULL) { |
3351 | + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
3352 | + g_warning("Could not set '%s' using timedated: %s", (gchar *)command, error->message); |
3353 | + g_error_free(error); |
3354 | + return; |
3355 | + } |
3356 | + |
3357 | + g_variant_unref (answers); |
3358 | +} |
3359 | + |
3360 | +static void |
3361 | +toggle_ntp (GtkWidget * radio, GParamSpec * pspec G_GNUC_UNUSED, IndicatorDatetimePanel * self) |
3362 | +{ |
3363 | + gboolean active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio)); |
3364 | + |
3365 | + g_dbus_proxy_call (self->priv->proxy, "SetNTP", g_variant_new ("(bb)", active, TRUE), |
3366 | + G_DBUS_CALL_FLAGS_NONE, -1, NULL, dbus_set_answered, "NTP"); |
3367 | +} |
3368 | + |
3369 | +static void |
3370 | +sync_entry (IndicatorDatetimePanel * self, const gchar * location) |
3371 | +{ |
3372 | + gchar * name = get_current_zone_name (location, self->priv->settings); |
3373 | + gtk_entry_set_text (GTK_ENTRY (self->priv->tz_entry), name); |
3374 | + g_free (name); |
3375 | + |
3376 | + gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self->priv->tz_entry), |
3377 | + GTK_ENTRY_ICON_SECONDARY, NULL); |
3378 | +} |
3379 | + |
3380 | +static void |
3381 | +tz_changed (CcTimezoneMap * map G_GNUC_UNUSED, |
3382 | + CcTimezoneLocation * location, |
3383 | + IndicatorDatetimePanel * self) |
3384 | +{ |
3385 | + if (location == NULL) |
3386 | + return; |
3387 | + |
3388 | + gchar * zone; |
3389 | + g_object_get (location, "zone", &zone, NULL); |
3390 | + |
3391 | + g_dbus_proxy_call (self->priv->proxy, "SetTimezone", g_variant_new ("(sb)", zone, TRUE), |
3392 | + G_DBUS_CALL_FLAGS_NONE, -1, NULL, dbus_set_answered, "timezone"); |
3393 | + |
3394 | + sync_entry (self, zone); |
3395 | + |
3396 | + g_free (zone); |
3397 | +} |
3398 | + |
3399 | +static void |
3400 | +proxy_ready (GObject *object G_GNUC_UNUSED, |
3401 | + GAsyncResult *res, |
3402 | + IndicatorDatetimePanel * self) |
3403 | +{ |
3404 | + GError * error = NULL; |
3405 | + IndicatorDatetimePanelPrivate * priv = self->priv; |
3406 | + GVariant *value; |
3407 | + |
3408 | + self->priv->proxy = g_dbus_proxy_new_for_bus_finish (res, &error); |
3409 | + |
3410 | + if (error != NULL) { |
3411 | + if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) |
3412 | + g_critical("Could not grab DBus proxy for timedated: %s", error->message); |
3413 | + g_error_free(error); |
3414 | + return; |
3415 | + } |
3416 | + |
3417 | + /* And now, do initial proxy configuration */ |
3418 | + value = g_dbus_proxy_get_cached_property (priv->proxy, "CanNTP"); |
3419 | + if (value != NULL) |
3420 | + { |
3421 | + if (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN)) |
3422 | + gtk_widget_set_sensitive (priv->auto_radio, g_variant_get_boolean (value)); |
3423 | + g_variant_unref (value); |
3424 | + } |
3425 | + |
3426 | + value = g_dbus_proxy_get_cached_property (priv->proxy, "NTP"); |
3427 | + if (value != NULL) |
3428 | + { |
3429 | + if (g_variant_is_of_type (value, G_VARIANT_TYPE_BOOLEAN)) |
3430 | + { |
3431 | + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->auto_radio), g_variant_get_boolean (value)); |
3432 | + g_signal_connect (priv->auto_radio, "notify::active", G_CALLBACK (toggle_ntp), self); |
3433 | + } |
3434 | + g_variant_unref (value); |
3435 | + } |
3436 | + |
3437 | + value = g_dbus_proxy_get_cached_property (priv->proxy, "Timezone"); |
3438 | + if (value != NULL) |
3439 | + { |
3440 | + if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING)) |
3441 | + { |
3442 | + const gchar *timezone = g_variant_get_string (value, NULL); |
3443 | + |
3444 | + cc_timezone_map_set_timezone (priv->tzmap, timezone); |
3445 | + sync_entry (self, timezone); |
3446 | + g_signal_connect (priv->tzmap, "location-changed", G_CALLBACK (tz_changed), self); |
3447 | + } |
3448 | + g_variant_unref (value); |
3449 | + } |
3450 | +} |
3451 | + |
3452 | +#define WIG(name) GTK_WIDGET (gtk_builder_get_object(self->priv->builder, name)) |
3453 | + |
3454 | +static void |
3455 | +set_show_clock_check_sensitive (IndicatorDatetimePanel * self, |
3456 | + gboolean sensitive) |
3457 | +{ |
3458 | + gtk_widget_set_sensitive (WIG("showClockCheck"), sensitive); |
3459 | +} |
3460 | + |
3461 | +static void |
3462 | +on_bus_name_appeared (GDBusConnection * connection G_GNUC_UNUSED, |
3463 | + const char * name G_GNUC_UNUSED, |
3464 | + const char * name_owner, |
3465 | + gpointer self) |
3466 | +{ |
3467 | + set_show_clock_check_sensitive (self, name_owner && *name_owner); |
3468 | +} |
3469 | + |
3470 | +static void |
3471 | +on_bus_name_vanished (GDBusConnection * connection G_GNUC_UNUSED, |
3472 | + const char * name G_GNUC_UNUSED, |
3473 | + gpointer self) |
3474 | +{ |
3475 | + set_show_clock_check_sensitive (self, FALSE); |
3476 | +} |
3477 | + |
3478 | +static gboolean |
3479 | +are_spinners_focused (IndicatorDatetimePanel * self) |
3480 | +{ |
3481 | + // save_time_id means that we were in focus and haven't finished our save |
3482 | + // yet, so act like we are still focused. |
3483 | + return self->priv->save_time_id || |
3484 | + gtk_widget_has_focus (self->priv->time_spin) || |
3485 | + gtk_widget_has_focus (self->priv->date_spin); |
3486 | +} |
3487 | + |
3488 | +static gboolean |
3489 | +save_time (IndicatorDatetimePanel * self) |
3490 | +{ |
3491 | + if (self->priv->user_edited_time) { |
3492 | + gdouble current_value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (self->priv->date_spin)); |
3493 | + g_dbus_proxy_call (self->priv->proxy, "SetTime", |
3494 | + g_variant_new ("(xbb)", (gint64) (current_value * G_TIME_SPAN_SECOND), FALSE, TRUE), |
3495 | + G_DBUS_CALL_FLAGS_NONE, -1, NULL, dbus_set_answered, "time"); |
3496 | + } |
3497 | + self->priv->user_edited_time = FALSE; |
3498 | + self->priv->save_time_id = 0; |
3499 | + return FALSE; |
3500 | +} |
3501 | + |
3502 | +static gboolean |
3503 | +spin_focus_in (IndicatorDatetimePanel * self) |
3504 | +{ |
3505 | + if (self->priv->save_time_id > 0) { |
3506 | + g_source_remove (self->priv->save_time_id); |
3507 | + self->priv->save_time_id = 0; |
3508 | + } |
3509 | + return FALSE; |
3510 | +} |
3511 | + |
3512 | +static gboolean |
3513 | +spin_focus_out (IndicatorDatetimePanel * self) |
3514 | +{ |
3515 | + /* We want to only save when both spinners are unfocused. But it's difficult |
3516 | + to tell who is about to get focus during a focus-out. So we set an idle |
3517 | + callback to save the time if we don't focus in to another spinner by that |
3518 | + time. */ |
3519 | + if (self->priv->save_time_id == 0) { |
3520 | + self->priv->save_time_id = g_idle_add ((GSourceFunc)save_time, self); |
3521 | + } |
3522 | + return FALSE; |
3523 | +} |
3524 | + |
3525 | +static int |
3526 | +input_time_text (GtkWidget * spinner, gdouble * value, IndicatorDatetimePanel * self) |
3527 | +{ |
3528 | + gboolean is_time = (gboolean)GPOINTER_TO_INT (g_object_get_data (G_OBJECT (spinner), "is-time")); |
3529 | + const gchar * text = gtk_entry_get_text (GTK_ENTRY (spinner)); |
3530 | + |
3531 | + gdouble current_value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinner)); |
3532 | + *value = current_value; |
3533 | + |
3534 | + GDateTime * now = g_date_time_new_from_unix_local (current_value); |
3535 | + gint year, month, day, hour, minute, second; |
3536 | + year = g_date_time_get_year (now); |
3537 | + month = g_date_time_get_month (now); |
3538 | + day = g_date_time_get_day_of_month (now); |
3539 | + hour = g_date_time_get_hour (now); |
3540 | + minute = g_date_time_get_minute (now); |
3541 | + second = g_date_time_get_second (now); |
3542 | + g_date_time_unref (now); |
3543 | + |
3544 | + /* Parse this string as if it were in the output format */ |
3545 | + gint scanned = 0; |
3546 | + gboolean passed = TRUE, skip = FALSE; |
3547 | + if (is_time) { |
3548 | + gint hour_in, minute_in, second_in; |
3549 | + |
3550 | + if (is_locale_12h ()) { // TODO: make this look-at/watch gsettings? |
3551 | + char ampm[51]; |
3552 | + |
3553 | + /* coverity[secure_coding] */ |
3554 | + scanned = sscanf (text, "%u:%u:%u %50s", &hour_in, &minute_in, &second_in, ampm); |
3555 | + passed = (scanned == 4); |
3556 | + |
3557 | + if (passed) { |
3558 | + const char *pm_str = nl_langinfo (PM_STR); |
3559 | + if (g_ascii_strcasecmp (pm_str, ampm) == 0) { |
3560 | + hour_in += 12; |
3561 | + } |
3562 | + } |
3563 | + } else { |
3564 | + /* coverity[secure_coding] */ |
3565 | + scanned = sscanf (text, "%u:%u:%u", &hour_in, &minute_in, &second_in); |
3566 | + passed = (scanned == 3); |
3567 | + } |
3568 | + |
3569 | + if (passed && (hour_in > 23 || minute_in > 59 || second_in > 59)) { |
3570 | + passed = FALSE; |
3571 | + } |
3572 | + if (passed && hour == hour_in && minute == minute_in && second == second_in) { |
3573 | + skip = TRUE; // no change |
3574 | + } else { |
3575 | + hour = hour_in; |
3576 | + minute = minute_in; |
3577 | + second = second_in; |
3578 | + } |
3579 | + } |
3580 | + else { |
3581 | + gint year_in, month_in, day_in; |
3582 | + |
3583 | + /* coverity[secure_coding] */ |
3584 | + scanned = sscanf (text, "%u-%u-%u", &year_in, &month_in, &day_in); |
3585 | + |
3586 | + if (scanned != 3 || year_in < 1 || year_in > 9999 || |
3587 | + month_in < 1 || month_in > 12 || day_in < 1 || day_in > 31) { |
3588 | + passed = FALSE; |
3589 | + } |
3590 | + if (passed && year == year_in && month == month_in && day == day_in) { |
3591 | + skip = TRUE; // no change |
3592 | + } else { |
3593 | + year = year_in; |
3594 | + month = month_in; |
3595 | + day = day_in; |
3596 | + } |
3597 | + } |
3598 | + |
3599 | + if (!passed) { |
3600 | + g_warning ("Could not understand %s", text); |
3601 | + return TRUE; |
3602 | + } |
3603 | + |
3604 | + if (skip) { |
3605 | + return TRUE; |
3606 | + } |
3607 | + |
3608 | + gboolean prev_changing = self->priv->changing_time; |
3609 | + self->priv->changing_time = TRUE; |
3610 | + GDateTime * new_time = g_date_time_new_local (year, month, day, hour, minute, second); |
3611 | + *value = g_date_time_to_unix (new_time); |
3612 | + self->priv->user_edited_time = TRUE; |
3613 | + g_date_time_unref (new_time); |
3614 | + self->priv->changing_time = prev_changing; |
3615 | + |
3616 | + return TRUE; |
3617 | +} |
3618 | + |
3619 | +static gboolean |
3620 | +format_time_text (GtkWidget * spinner, gpointer user_data G_GNUC_UNUSED) |
3621 | +{ |
3622 | + gboolean is_time = (gboolean)GPOINTER_TO_INT (g_object_get_data (G_OBJECT (spinner), "is-time")); |
3623 | + |
3624 | + const gchar * format; |
3625 | + if (is_time) { |
3626 | + if (is_locale_12h ()) { // TODO: make this look-at/watch gsettings? |
3627 | + format = "%I:%M:%S %p"; |
3628 | + } else { |
3629 | + format = "%H:%M:%S"; |
3630 | + } |
3631 | + } |
3632 | + else { |
3633 | + // This is intentionally not "%x". See https://launchpad.net/bugs/1149696 |
3634 | + // If you are willing to do the hard work of writing a locale-sensitive |
3635 | + // date parser, there is an open bug: https://launchpad.net/bugs/729056 |
3636 | + format = "%Y-%m-%d"; |
3637 | + } |
3638 | + |
3639 | + GDateTime * datetime = g_date_time_new_from_unix_local (gtk_spin_button_get_value (GTK_SPIN_BUTTON (spinner))); |
3640 | + gchar * formatted = g_date_time_format (datetime, format); |
3641 | + gtk_entry_set_text (GTK_ENTRY (spinner), formatted); |
3642 | + g_date_time_unref (datetime); |
3643 | + |
3644 | + return TRUE; |
3645 | +} |
3646 | + |
3647 | +static void |
3648 | +spin_copy_value (GtkSpinButton * spinner, IndicatorDatetimePanel * self) |
3649 | +{ |
3650 | + GtkSpinButton * other = NULL; |
3651 | + if (GTK_WIDGET (spinner) == self->priv->date_spin) |
3652 | + other = GTK_SPIN_BUTTON (self->priv->time_spin); |
3653 | + else |
3654 | + other = GTK_SPIN_BUTTON (self->priv->date_spin); |
3655 | + |
3656 | + if (gtk_spin_button_get_value (spinner) != gtk_spin_button_get_value (other)) { |
3657 | + gtk_spin_button_set_value (other, gtk_spin_button_get_value (spinner)); |
3658 | + } |
3659 | + if (!self->priv->changing_time) { /* Means user pressed spin buttons */ |
3660 | + self->priv->user_edited_time = TRUE; |
3661 | + } |
3662 | +} |
3663 | + |
3664 | +static gboolean |
3665 | +update_spinners (IndicatorDatetimePanel * self) |
3666 | +{ |
3667 | + /* Add datetime object to spinner, which will hold the real time value, rather |
3668 | + then using the value of the spinner itself. And don't update while user is |
3669 | + editing. */ |
3670 | + if (!are_spinners_focused (self)) { |
3671 | + gboolean prev_changing = self->priv->changing_time; |
3672 | + self->priv->changing_time = TRUE; |
3673 | + GDateTime * now = g_date_time_new_now_local (); |
3674 | + gtk_spin_button_set_value (GTK_SPIN_BUTTON (self->priv->time_spin), |
3675 | + (gdouble)g_date_time_to_unix (now)); |
3676 | + /* will be copied to other spin button */ |
3677 | + g_date_time_unref (now); |
3678 | + self->priv->changing_time = prev_changing; |
3679 | + } |
3680 | + return TRUE; |
3681 | +} |
3682 | + |
3683 | +static void |
3684 | +setup_time_spinners (IndicatorDatetimePanel * self, GtkWidget * time, GtkWidget * date) |
3685 | +{ |
3686 | + g_signal_connect (time, "input", G_CALLBACK (input_time_text), self); |
3687 | + g_signal_connect (date, "input", G_CALLBACK (input_time_text), self); |
3688 | + |
3689 | + g_signal_connect (time, "output", G_CALLBACK (format_time_text), date); |
3690 | + g_signal_connect (date, "output", G_CALLBACK (format_time_text), time); |
3691 | + |
3692 | + g_signal_connect_swapped (time, "focus-in-event", G_CALLBACK (spin_focus_in), self); |
3693 | + g_signal_connect_swapped (date, "focus-in-event", G_CALLBACK (spin_focus_in), self); |
3694 | + |
3695 | + g_signal_connect_swapped (time, "focus-out-event", G_CALLBACK (spin_focus_out), self); |
3696 | + g_signal_connect_swapped (date, "focus-out-event", G_CALLBACK (spin_focus_out), self); |
3697 | + |
3698 | + g_signal_connect (time, "value-changed", G_CALLBACK (spin_copy_value), self); |
3699 | + g_signal_connect (date, "value-changed", G_CALLBACK (spin_copy_value), self); |
3700 | + |
3701 | + g_object_set_data (G_OBJECT (time), "is-time", GINT_TO_POINTER (TRUE)); |
3702 | + g_object_set_data (G_OBJECT (date), "is-time", GINT_TO_POINTER (FALSE)); |
3703 | + |
3704 | + self->priv->time_spin = time; |
3705 | + self->priv->date_spin = date; |
3706 | + |
3707 | + /* 2 seconds is what the indicator itself uses */ |
3708 | + guint time_id = g_timeout_add_seconds (2, (GSourceFunc)update_spinners, self); |
3709 | + g_signal_connect_swapped (self->priv->time_spin, "destroy", |
3710 | + G_CALLBACK (g_source_remove), GINT_TO_POINTER (time_id)); |
3711 | + update_spinners (self); |
3712 | +} |
3713 | + |
3714 | +static void |
3715 | +show_locations (IndicatorDatetimePanel * self) |
3716 | +{ |
3717 | + if (self->priv->loc_dlg == NULL) { |
3718 | + self->priv->loc_dlg = datetime_setup_locations_dialog (self->priv->tzmap); |
3719 | + GtkWidget * dlg = gtk_widget_get_toplevel (GTK_WIDGET (self)); |
3720 | + gtk_window_set_type_hint (GTK_WINDOW(self->priv->loc_dlg), GDK_WINDOW_TYPE_HINT_DIALOG); |
3721 | + gtk_window_set_transient_for (GTK_WINDOW (self->priv->loc_dlg), GTK_WINDOW (dlg)); |
3722 | + g_signal_connect (self->priv->loc_dlg, "destroy", G_CALLBACK (gtk_widget_destroyed), &self->priv->loc_dlg); |
3723 | + gtk_widget_show_all (self->priv->loc_dlg); |
3724 | + } |
3725 | + else { |
3726 | + gtk_window_present_with_time (GTK_WINDOW (self->priv->loc_dlg), gtk_get_current_event_time ()); |
3727 | + } |
3728 | +} |
3729 | + |
3730 | +static gboolean |
3731 | +timezone_selected (GtkEntryCompletion * widget G_GNUC_UNUSED, |
3732 | + GtkTreeModel * model, |
3733 | + GtkTreeIter * iter, |
3734 | + IndicatorDatetimePanel * self) |
3735 | +{ |
3736 | + const gchar * name, * zone; |
3737 | + |
3738 | + gtk_tree_model_get (model, iter, |
3739 | + CC_TIMEZONE_COMPLETION_NAME, &name, |
3740 | + CC_TIMEZONE_COMPLETION_ZONE, &zone, |
3741 | + -1); |
3742 | + |
3743 | + if (zone == NULL || zone[0] == 0) { |
3744 | + const gchar * strlon, * strlat; |
3745 | + gdouble lon = 0.0, lat = 0.0; |
3746 | + |
3747 | + gtk_tree_model_get (model, iter, |
3748 | + CC_TIMEZONE_COMPLETION_LONGITUDE, &strlon, |
3749 | + CC_TIMEZONE_COMPLETION_LATITUDE, &strlat, |
3750 | + -1); |
3751 | + |
3752 | + if (strlon != NULL && strlon[0] != 0) { |
3753 | + lon = g_ascii_strtod(strlon, NULL); |
3754 | + } |
3755 | + |
3756 | + if (strlat != NULL && strlat[0] != 0) { |
3757 | + lat = g_ascii_strtod(strlat, NULL); |
3758 | + } |
3759 | + |
3760 | + zone = cc_timezone_map_get_timezone_at_coords (self->priv->tzmap, lon, lat); |
3761 | + } |
3762 | + |
3763 | + gchar * tz_name = g_strdup_printf ("%s %s", zone, name); |
3764 | + g_settings_set_string (self->priv->settings, SETTINGS_TIMEZONE_NAME_S, tz_name); |
3765 | + g_free (tz_name); |
3766 | + |
3767 | + cc_timezone_map_set_timezone (self->priv->tzmap, zone); |
3768 | + |
3769 | + return FALSE; // Do normal action too |
3770 | +} |
3771 | + |
3772 | +static gboolean |
3773 | +entry_focus_out (GtkEntry * entry, |
3774 | + GdkEventFocus * event G_GNUC_UNUSED, |
3775 | + IndicatorDatetimePanel * self) |
3776 | +{ |
3777 | + // If the name left in the entry doesn't match the current timezone name, |
3778 | + // show an error icon. It's always an error for the user to manually type in |
3779 | + // a timezone. |
3780 | + CcTimezoneLocation * location = cc_timezone_map_get_location (self->priv->tzmap); |
3781 | + if (location == NULL) |
3782 | + return FALSE; |
3783 | + |
3784 | + gchar * zone; |
3785 | + g_object_get (location, "zone", &zone, NULL); |
3786 | + |
3787 | + gchar * name = get_current_zone_name (zone, self->priv->settings); |
3788 | + gboolean correct = (g_strcmp0 (gtk_entry_get_text (entry), name) == 0); |
3789 | + g_free (name); |
3790 | + g_free (zone); |
3791 | + |
3792 | + gtk_entry_set_icon_from_icon_name (entry, GTK_ENTRY_ICON_SECONDARY, |
3793 | + correct ? NULL : "dialog-error"); |
3794 | + gtk_entry_set_icon_tooltip_text (entry, GTK_ENTRY_ICON_SECONDARY, |
3795 | + _("You need to choose a location to change the time zone.")); |
3796 | + gtk_entry_set_icon_activatable (entry, GTK_ENTRY_ICON_SECONDARY, FALSE); |
3797 | + return FALSE; |
3798 | +} |
3799 | + |
3800 | +static void |
3801 | +indicator_datetime_panel_init (IndicatorDatetimePanel * self) |
3802 | +{ |
3803 | + GError * error; |
3804 | + GSettings * conf; |
3805 | + |
3806 | + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, |
3807 | + INDICATOR_DATETIME_TYPE_PANEL, |
3808 | + IndicatorDatetimePanelPrivate); |
3809 | + |
3810 | + self->priv->settings = conf = g_settings_new (SETTINGS_INTERFACE); |
3811 | + |
3812 | + self->priv->builder = gtk_builder_new (); |
3813 | + gtk_builder_set_translation_domain (self->priv->builder, GETTEXT_PACKAGE); |
3814 | + error = NULL; |
3815 | + gtk_builder_add_from_file (self->priv->builder, DATETIME_DIALOG_UI_FILE, &error); |
3816 | + if (error != NULL) { |
3817 | + /* We have to abort, we can't continue without the ui file */ |
3818 | + g_error ("Could not load ui file %s: %s", DATETIME_DIALOG_UI_FILE, error->message); |
3819 | + g_error_free (error); |
3820 | + return; |
3821 | + } |
3822 | + |
3823 | + |
3824 | + /* Add policykit button */ |
3825 | + GtkWidget * polkit_button = gtk_lock_button_new (NULL); |
3826 | + g_object_set (G_OBJECT (polkit_button), |
3827 | + "text-unlock", _("Unlock to change these settings"), |
3828 | + "text-lock", _("Lock to prevent further changes"), |
3829 | + NULL); |
3830 | + GtkWidget * alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); |
3831 | + gtk_container_add (GTK_CONTAINER (alignment), polkit_button); |
3832 | + gtk_box_pack_start (GTK_BOX (WIG ("timeDateBox")), alignment, FALSE, TRUE, 0); |
3833 | + |
3834 | + const gchar * polkit_name = "com.canonical.controlcenter.datetime.configure"; |
3835 | + polkit_permission_new (polkit_name, NULL, NULL, polkit_perm_ready, polkit_button); |
3836 | + |
3837 | + /* Add map */ |
3838 | + self->priv->tzmap = cc_timezone_map_new (); |
3839 | + gtk_container_add (GTK_CONTAINER (WIG ("mapBox")), GTK_WIDGET (self->priv->tzmap)); |
3840 | + /* Fufill the CC by Attribution license requirements for the Geonames lookup */ |
3841 | + cc_timezone_map_set_watermark (self->priv->tzmap, "Geonames.org"); |
3842 | + |
3843 | + /* And completion entry */ |
3844 | + self->priv->completion = cc_timezone_completion_new (); |
3845 | + cc_timezone_completion_watch_entry (self->priv->completion, GTK_ENTRY (WIG ("timezoneEntry"))); |
3846 | + g_signal_connect (self->priv->completion, "match-selected", G_CALLBACK (timezone_selected), self); |
3847 | + g_signal_connect (WIG ("timezoneEntry"), "focus-out-event", G_CALLBACK (entry_focus_out), self); |
3848 | + |
3849 | + /* Set up settings bindings */ |
3850 | + g_settings_bind (conf, SETTINGS_SHOW_CLOCK_S, WIG ("showClockCheck"), |
3851 | + "active", G_SETTINGS_BIND_DEFAULT); |
3852 | + g_settings_bind (conf, SETTINGS_SHOW_DAY_S, WIG ("showWeekdayCheck"), |
3853 | + "active", G_SETTINGS_BIND_DEFAULT); |
3854 | + g_settings_bind (conf, SETTINGS_SHOW_DATE_S, WIG ("showDateAndMonthCheck"), |
3855 | + "active", G_SETTINGS_BIND_DEFAULT); |
3856 | + g_settings_bind (conf, SETTINGS_SHOW_YEAR_S, WIG ("showYearCheck"), |
3857 | + "active", G_SETTINGS_BIND_DEFAULT); |
3858 | + g_settings_bind (conf, SETTINGS_SHOW_SECONDS_S, WIG ("showSecondsCheck"), |
3859 | + "active", G_SETTINGS_BIND_DEFAULT); |
3860 | + g_settings_bind_with_mapping (conf, SETTINGS_TIME_FORMAT_S, |
3861 | + WIG ("show12HourRadio"), "active", |
3862 | + G_SETTINGS_BIND_DEFAULT, |
3863 | + bind_hours_get, bind_hours_set, |
3864 | + GINT_TO_POINTER(TRUE), NULL); |
3865 | + g_settings_bind_with_mapping (conf, SETTINGS_TIME_FORMAT_S, |
3866 | + WIG ("show24HourRadio"), "active", |
3867 | + G_SETTINGS_BIND_DEFAULT, |
3868 | + bind_hours_get, bind_hours_set, |
3869 | + GINT_TO_POINTER(FALSE), NULL); |
3870 | + g_settings_bind (conf, SETTINGS_SHOW_CALENDAR_S, WIG ("showCalendarCheck"), |
3871 | + "active", G_SETTINGS_BIND_DEFAULT); |
3872 | + g_settings_bind (conf, SETTINGS_SHOW_WEEK_NUMBERS_S, WIG ("includeWeekNumbersCheck"), |
3873 | + "active", G_SETTINGS_BIND_DEFAULT); |
3874 | + g_settings_bind (conf, SETTINGS_SHOW_EVENTS_S, WIG ("showEventsCheck"), |
3875 | + "active", G_SETTINGS_BIND_DEFAULT); |
3876 | + g_settings_bind (conf, SETTINGS_SHOW_DETECTED_S, WIG ("showDetectedCheck"), |
3877 | + "active", G_SETTINGS_BIND_DEFAULT); |
3878 | + g_settings_bind (conf, SETTINGS_SHOW_LOCATIONS_S, WIG ("showLocationsCheck"), |
3879 | + "active", G_SETTINGS_BIND_DEFAULT); |
3880 | + |
3881 | + /* Set up sensitivities */ |
3882 | + add_widget_dependency (WIG ("showDateAndMonthCheck"), WIG ("showYearCheck")); |
3883 | + add_widget_dependency (WIG ("showCalendarCheck"), WIG ("calendarOptions")); |
3884 | + add_widget_dependency (WIG ("showClockCheck"), WIG ("clockOptions")); |
3885 | + add_widget_dependency (WIG ("showLocationsCheck"), WIG ("locationsButton")); |
3886 | + add_widget_dependency (WIG ("manualTimeRadio"), WIG ("manualOptions")); |
3887 | + add_polkit_dependency (polkit_button, WIG ("timeDateOptions")); |
3888 | + |
3889 | + /* Hacky proxy test for whether evolution-data-server is installed */ |
3890 | + gchar * evo_path = g_find_program_in_path ("evolution"); |
3891 | + gtk_widget_set_sensitive (WIG ("showEventsCheck"), (evo_path != NULL)); |
3892 | + g_free (evo_path); |
3893 | + |
3894 | + setup_time_spinners (self, WIG ("timeSpinner"), WIG ("dateSpinner")); |
3895 | + |
3896 | + GtkWidget * panel = WIG ("timeDatePanel"); |
3897 | + self->priv->auto_radio = WIG ("automaticTimeRadio"); |
3898 | + self->priv->tz_entry = WIG ("timezoneEntry"); |
3899 | + |
3900 | + g_signal_connect_swapped (WIG ("locationsButton"), "clicked", G_CALLBACK (show_locations), self); |
3901 | + |
3902 | + /* Grab proxy for settings daemon */ |
3903 | + g_dbus_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, NULL, |
3904 | + "org.freedesktop.timedate1", |
3905 | + "/org/freedesktop/timedate1", |
3906 | + "org.freedesktop.timedate1", |
3907 | + NULL, (GAsyncReadyCallback)proxy_ready, self); |
3908 | + |
3909 | + /* Grab proxy for datetime service, to see if it's running. It would |
3910 | + actually be more ideal to see if the indicator module itself is running, |
3911 | + but that doesn't yet claim a name on the bus. Presumably the service |
3912 | + would have been started by any such indicator, so this will at least tell |
3913 | + us if there *was* a datetime module run this session. */ |
3914 | + self->priv->name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION, |
3915 | + "com.canonical.indicator.datetime", |
3916 | + G_BUS_NAME_WATCHER_FLAGS_NONE, |
3917 | + on_bus_name_appeared, |
3918 | + on_bus_name_vanished, |
3919 | + self, |
3920 | + NULL); |
3921 | + |
3922 | +#undef WIG |
3923 | + |
3924 | + gtk_widget_show_all (panel); |
3925 | + gtk_container_add (GTK_CONTAINER (self), panel); |
3926 | +} |
3927 | + |
3928 | +static void |
3929 | +indicator_datetime_panel_dispose (GObject * object) |
3930 | +{ |
3931 | + IndicatorDatetimePanel * self = (IndicatorDatetimePanel *) object; |
3932 | + IndicatorDatetimePanelPrivate * priv = self->priv; |
3933 | + |
3934 | + g_clear_object (&priv->builder); |
3935 | + g_clear_object (&priv->proxy); |
3936 | + g_clear_object (&priv->settings); |
3937 | + |
3938 | + if (priv->loc_dlg) { |
3939 | + gtk_widget_destroy (priv->loc_dlg); |
3940 | + priv->loc_dlg = NULL; |
3941 | + } |
3942 | + |
3943 | + if (priv->name_watch_id != 0) { |
3944 | + g_bus_unwatch_name (priv->name_watch_id); |
3945 | + priv->name_watch_id = 0; |
3946 | + } |
3947 | + |
3948 | + if (priv->save_time_id) { |
3949 | + g_source_remove (priv->save_time_id); |
3950 | + priv->save_time_id = 0; |
3951 | + } |
3952 | + |
3953 | + if (priv->completion) { |
3954 | + cc_timezone_completion_watch_entry (priv->completion, NULL); |
3955 | + g_clear_object (&priv->completion); |
3956 | + } |
3957 | + |
3958 | + if (priv->tz_entry) { |
3959 | + gtk_widget_destroy (priv->tz_entry); |
3960 | + priv->tz_entry = NULL; |
3961 | + } |
3962 | + |
3963 | + if (priv->time_spin) { |
3964 | + gtk_widget_destroy (priv->time_spin); |
3965 | + priv->time_spin = NULL; |
3966 | + } |
3967 | + |
3968 | + if (priv->date_spin) { |
3969 | + gtk_widget_destroy (priv->date_spin); |
3970 | + priv->date_spin = NULL; |
3971 | + } |
3972 | + |
3973 | + G_OBJECT_CLASS (indicator_datetime_panel_parent_class)->dispose (object); |
3974 | +} |
3975 | + |
3976 | +static void |
3977 | +indicator_datetime_panel_class_finalize (IndicatorDatetimePanelClass *klass G_GNUC_UNUSED) |
3978 | +{ |
3979 | +} |
3980 | + |
3981 | +static const char * |
3982 | +indicator_datetime_panel_get_help_uri (CcPanel *panel G_GNUC_UNUSED) |
3983 | +{ |
3984 | + return "help:ubuntu-help/clock"; |
3985 | +} |
3986 | + |
3987 | +static void |
3988 | +indicator_datetime_panel_class_init (IndicatorDatetimePanelClass *klass) |
3989 | +{ |
3990 | + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); |
3991 | + CcPanelClass *panel_class = CC_PANEL_CLASS (klass); |
3992 | + |
3993 | + g_type_class_add_private (klass, sizeof (IndicatorDatetimePanelPrivate)); |
3994 | + |
3995 | + panel_class->get_help_uri = indicator_datetime_panel_get_help_uri; |
3996 | + |
3997 | + gobject_class->dispose = indicator_datetime_panel_dispose; |
3998 | +} |
3999 | + |
4000 | +void |
4001 | +g_io_module_load (GIOModule *module) |
4002 | +{ |
4003 | + bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); |
4004 | + bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); |
4005 | + |
4006 | + indicator_datetime_panel_register_type (G_TYPE_MODULE (module)); |
4007 | + g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT, |
4008 | + INDICATOR_DATETIME_TYPE_PANEL, |
4009 | + "datetime", 0); |
4010 | +} |
4011 | + |
4012 | +void |
4013 | +g_io_module_unload (GIOModule *module G_GNUC_UNUSED) |
4014 | +{ |
4015 | +} |
4016 | |
4017 | === added directory 'panels/datetime/icons' |
4018 | === added directory 'panels/datetime/icons/16x16' |
4019 | === added file 'panels/datetime/icons/16x16/unity-datetime-panel.png' |
4020 | Binary files panels/datetime/icons/16x16/unity-datetime-panel.png 1970-01-01 00:00:00 +0000 and panels/datetime/icons/16x16/unity-datetime-panel.png 2014-03-03 10:09:16 +0000 differ |
4021 | === added directory 'panels/datetime/icons/22x22' |
4022 | === added file 'panels/datetime/icons/22x22/unity-datetime-panel.png' |
4023 | Binary files panels/datetime/icons/22x22/unity-datetime-panel.png 1970-01-01 00:00:00 +0000 and panels/datetime/icons/22x22/unity-datetime-panel.png 2014-03-03 10:09:16 +0000 differ |
4024 | === added directory 'panels/datetime/icons/256x256' |
4025 | === added file 'panels/datetime/icons/256x256/unity-datetime-panel.png' |
4026 | Binary files panels/datetime/icons/256x256/unity-datetime-panel.png 1970-01-01 00:00:00 +0000 and panels/datetime/icons/256x256/unity-datetime-panel.png 2014-03-03 10:09:16 +0000 differ |
4027 | === added directory 'panels/datetime/icons/32x32' |
4028 | === added file 'panels/datetime/icons/32x32/unity-datetime-panel.png' |
4029 | Binary files panels/datetime/icons/32x32/unity-datetime-panel.png 1970-01-01 00:00:00 +0000 and panels/datetime/icons/32x32/unity-datetime-panel.png 2014-03-03 10:09:16 +0000 differ |
4030 | === added directory 'panels/datetime/icons/48x48' |
4031 | === added file 'panels/datetime/icons/48x48/unity-datetime-panel.png' |
4032 | Binary files panels/datetime/icons/48x48/unity-datetime-panel.png 1970-01-01 00:00:00 +0000 and panels/datetime/icons/48x48/unity-datetime-panel.png 2014-03-03 10:09:16 +0000 differ |
4033 | === added directory 'panels/datetime/icons/scalable' |
4034 | === added file 'panels/datetime/icons/scalable/unity-datetime-panel.svg' |
4035 | --- panels/datetime/icons/scalable/unity-datetime-panel.svg 1970-01-01 00:00:00 +0000 |
4036 | +++ panels/datetime/icons/scalable/unity-datetime-panel.svg 2014-03-03 10:09:16 +0000 |
4037 | @@ -0,0 +1,861 @@ |
4038 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
4039 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
4040 | + |
4041 | +<svg |
4042 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
4043 | + xmlns:cc="http://creativecommons.org/ns#" |
4044 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
4045 | + xmlns:svg="http://www.w3.org/2000/svg" |
4046 | + xmlns="http://www.w3.org/2000/svg" |
4047 | + xmlns:xlink="http://www.w3.org/1999/xlink" |
4048 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
4049 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
4050 | + width="48" |
4051 | + height="48" |
4052 | + id="svg3639" |
4053 | + version="1.1" |
4054 | + inkscape:version="0.47 r22583" |
4055 | + sodipodi:docname="New document 2"> |
4056 | + <defs |
4057 | + id="defs3641"> |
4058 | + <inkscape:perspective |
4059 | + sodipodi:type="inkscape:persp3d" |
4060 | + inkscape:vp_x="0 : 526.18109 : 1" |
4061 | + inkscape:vp_y="0 : 1000 : 0" |
4062 | + inkscape:vp_z="744.09448 : 526.18109 : 1" |
4063 | + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" |
4064 | + id="perspective3647" /> |
4065 | + <inkscape:perspective |
4066 | + id="perspective3453" |
4067 | + inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
4068 | + inkscape:vp_z="1 : 0.5 : 1" |
4069 | + inkscape:vp_y="0 : 1000 : 0" |
4070 | + inkscape:vp_x="0 : 0.5 : 1" |
4071 | + sodipodi:type="inkscape:persp3d" /> |
4072 | + <radialGradient |
4073 | + inkscape:collect="always" |
4074 | + xlink:href="#linearGradient13249-6-3" |
4075 | + id="radialGradient6295-0" |
4076 | + gradientUnits="userSpaceOnUse" |
4077 | + gradientTransform="matrix(0.9936278,0,0,0.3495627,3.5429153,708.68473)" |
4078 | + cx="556" |
4079 | + cy="1115.3873" |
4080 | + fx="556" |
4081 | + fy="1115.3873" |
4082 | + r="44" /> |
4083 | + <linearGradient |
4084 | + id="linearGradient13249-6-3"> |
4085 | + <stop |
4086 | + style="stop-color:#ffffff;stop-opacity:1;" |
4087 | + offset="0" |
4088 | + id="stop13251-6-5" /> |
4089 | + <stop |
4090 | + style="stop-color:#ffffff;stop-opacity:0;" |
4091 | + offset="1" |
4092 | + id="stop13253-9-5" /> |
4093 | + </linearGradient> |
4094 | + <radialGradient |
4095 | + inkscape:collect="always" |
4096 | + xlink:href="#linearGradient4254-7" |
4097 | + id="radialGradient6297-8" |
4098 | + gradientUnits="userSpaceOnUse" |
4099 | + gradientTransform="matrix(2.5434298,0,0,1.553224,-832.13128,-571.17705)" |
4100 | + cx="539.14423" |
4101 | + cy="1032.4518" |
4102 | + fx="539.14423" |
4103 | + fy="1032.4518" |
4104 | + r="44" /> |
4105 | + <linearGradient |
4106 | + inkscape:collect="always" |
4107 | + id="linearGradient4254-7"> |
4108 | + <stop |
4109 | + style="stop-color:#ffffff;stop-opacity:1;" |
4110 | + offset="0" |
4111 | + id="stop4256-17" /> |
4112 | + <stop |
4113 | + style="stop-color:#ffffff;stop-opacity:0;" |
4114 | + offset="1" |
4115 | + id="stop4258-0" /> |
4116 | + </linearGradient> |
4117 | + <radialGradient |
4118 | + r="44" |
4119 | + fy="1053.6022" |
4120 | + fx="549.57959" |
4121 | + cy="1053.6022" |
4122 | + cx="549.57959" |
4123 | + gradientTransform="matrix(1.3773467,-1.791245e-7,1.7912446e-7,1.3773464,-207.83681,-395.55015)" |
4124 | + gradientUnits="userSpaceOnUse" |
4125 | + id="radialGradient6576-6" |
4126 | + xlink:href="#linearGradient3541-12-0" |
4127 | + inkscape:collect="always" /> |
4128 | + <linearGradient |
4129 | + id="linearGradient3541-12-0"> |
4130 | + <stop |
4131 | + id="stop3543-20-4" |
4132 | + offset="0" |
4133 | + style="stop-color:#ffffff;stop-opacity:1" /> |
4134 | + <stop |
4135 | + style="stop-color:#babdb6;stop-opacity:1" |
4136 | + offset="0.30514973" |
4137 | + id="stop5354-2-1" /> |
4138 | + <stop |
4139 | + style="stop-color:#555753;stop-opacity:1" |
4140 | + offset="0.63298833" |
4141 | + id="stop5352-17-3" /> |
4142 | + <stop |
4143 | + style="stop-color:#888a85;stop-opacity:1" |
4144 | + offset="0.85721445" |
4145 | + id="stop3545-51-0" /> |
4146 | + <stop |
4147 | + id="stop3547-7-2" |
4148 | + offset="1" |
4149 | + style="stop-color:#2e3436;stop-opacity:1" /> |
4150 | + </linearGradient> |
4151 | + <linearGradient |
4152 | + inkscape:collect="always" |
4153 | + xlink:href="#linearGradient4264-7-7-4-6" |
4154 | + id="linearGradient6869-9" |
4155 | + gradientUnits="userSpaceOnUse" |
4156 | + gradientTransform="translate(-1428.7632,365.14783)" |
4157 | + x1="720.7771" |
4158 | + y1="374.90027" |
4159 | + x2="717.61865" |
4160 | + y2="363.11279" /> |
4161 | + <linearGradient |
4162 | + inkscape:collect="always" |
4163 | + id="linearGradient4264-7-7-4-6"> |
4164 | + <stop |
4165 | + style="stop-color:#000000;stop-opacity:1;" |
4166 | + offset="0" |
4167 | + id="stop4266-78-1-3-0" /> |
4168 | + <stop |
4169 | + style="stop-color:#888a85;stop-opacity:1" |
4170 | + offset="1" |
4171 | + id="stop4268-2-9-7-9" /> |
4172 | + </linearGradient> |
4173 | + <linearGradient |
4174 | + inkscape:collect="always" |
4175 | + xlink:href="#linearGradient4264-8-1-0-9-5" |
4176 | + id="linearGradient6872-3" |
4177 | + gradientUnits="userSpaceOnUse" |
4178 | + gradientTransform="matrix(1,0,0,0.64285714,307.36277,-268.66396)" |
4179 | + x1="720.7771" |
4180 | + y1="374.90027" |
4181 | + x2="717.61865" |
4182 | + y2="363.11279" /> |
4183 | + <linearGradient |
4184 | + inkscape:collect="always" |
4185 | + id="linearGradient4264-8-1-0-9-5"> |
4186 | + <stop |
4187 | + style="stop-color:#000000;stop-opacity:1;" |
4188 | + offset="0" |
4189 | + id="stop4266-7-9-5-9-4" /> |
4190 | + <stop |
4191 | + style="stop-color:#888a85;stop-opacity:1" |
4192 | + offset="1" |
4193 | + id="stop4268-3-7-7-3-3" /> |
4194 | + </linearGradient> |
4195 | + <radialGradient |
4196 | + inkscape:collect="always" |
4197 | + xlink:href="#linearGradient4244-6-5" |
4198 | + id="radialGradient5610-5" |
4199 | + gradientUnits="userSpaceOnUse" |
4200 | + gradientTransform="matrix(1.7727271,0,0,1.7727271,-417.97349,-794.04003)" |
4201 | + cx="540.90698" |
4202 | + cy="1027.5814" |
4203 | + fx="540.90698" |
4204 | + fy="1027.5814" |
4205 | + r="45.023254" /> |
4206 | + <linearGradient |
4207 | + inkscape:collect="always" |
4208 | + id="linearGradient4244-6-5"> |
4209 | + <stop |
4210 | + style="stop-color:#babdb6;stop-opacity:1" |
4211 | + offset="0" |
4212 | + id="stop4246-6-3" /> |
4213 | + <stop |
4214 | + style="stop-color:#555753;stop-opacity:1" |
4215 | + offset="1" |
4216 | + id="stop4248-9-8" /> |
4217 | + </linearGradient> |
4218 | + <clipPath |
4219 | + clipPathUnits="userSpaceOnUse" |
4220 | + id="clipPath12885-6"> |
4221 | + <path |
4222 | + transform="translate(-8,-8)" |
4223 | + d="m 600,1068 a 44,44 0 1 1 -88,0 44,44 0 1 1 88,0 z" |
4224 | + sodipodi:ry="44" |
4225 | + sodipodi:rx="44" |
4226 | + sodipodi:cy="1068" |
4227 | + sodipodi:cx="556" |
4228 | + id="path12888-7" |
4229 | + style="fill:#555753;fill-opacity:1;stroke:none;display:inline" |
4230 | + sodipodi:type="arc" /> |
4231 | + </clipPath> |
4232 | + <radialGradient |
4233 | + inkscape:collect="always" |
4234 | + xlink:href="#linearGradient12863-6" |
4235 | + id="radialGradient5612-3" |
4236 | + gradientUnits="userSpaceOnUse" |
4237 | + gradientTransform="matrix(1.1388493,0,0,1.200468,-77.200227,-214.605)" |
4238 | + cx="556" |
4239 | + cy="1063.7086" |
4240 | + fx="556" |
4241 | + fy="1063.7086" |
4242 | + r="44" /> |
4243 | + <linearGradient |
4244 | + id="linearGradient12863-6"> |
4245 | + <stop |
4246 | + style="stop-color:#babdb6;stop-opacity:1" |
4247 | + offset="0" |
4248 | + id="stop12865-0" /> |
4249 | + <stop |
4250 | + id="stop12871-2" |
4251 | + offset="0.62350565" |
4252 | + style="stop-color:#888a85;stop-opacity:1" /> |
4253 | + <stop |
4254 | + style="stop-color:#2e3436;stop-opacity:1" |
4255 | + offset="0.8054316" |
4256 | + id="stop12873-6" /> |
4257 | + <stop |
4258 | + style="stop-color:#ffffff;stop-opacity:1" |
4259 | + offset="1" |
4260 | + id="stop12867-9" /> |
4261 | + </linearGradient> |
4262 | + <radialGradient |
4263 | + inkscape:collect="always" |
4264 | + xlink:href="#linearGradient12897-0" |
4265 | + id="radialGradient5614-3" |
4266 | + gradientUnits="userSpaceOnUse" |
4267 | + gradientTransform="matrix(1.8604586,0,0,1.8604586,-459.48492,-891.43519)" |
4268 | + cx="540.88086" |
4269 | + cy="1031.9064" |
4270 | + fx="540.88086" |
4271 | + fy="1031.9064" |
4272 | + r="44" /> |
4273 | + <linearGradient |
4274 | + id="linearGradient12897-0"> |
4275 | + <stop |
4276 | + style="stop-color:#ffffff;stop-opacity:1;" |
4277 | + offset="0" |
4278 | + id="stop12899-8" /> |
4279 | + <stop |
4280 | + id="stop3397-7" |
4281 | + offset="0.23620702" |
4282 | + style="stop-color:#ffffff;stop-opacity:1" /> |
4283 | + <stop |
4284 | + style="stop-color:#ffffff;stop-opacity:0;" |
4285 | + offset="1" |
4286 | + id="stop12901-65" /> |
4287 | + </linearGradient> |
4288 | + <filter |
4289 | + color-interpolation-filters="sRGB" |
4290 | + inkscape:collect="always" |
4291 | + id="filter12907-2"> |
4292 | + <feGaussianBlur |
4293 | + inkscape:collect="always" |
4294 | + stdDeviation="0.89191478" |
4295 | + id="feGaussianBlur12909-4" /> |
4296 | + </filter> |
4297 | + <linearGradient |
4298 | + inkscape:collect="always" |
4299 | + xlink:href="#linearGradient3580-0" |
4300 | + id="linearGradient5616-0" |
4301 | + gradientUnits="userSpaceOnUse" |
4302 | + x1="534.77368" |
4303 | + y1="1093.9681" |
4304 | + x2="576.95667" |
4305 | + y2="1020.9051" /> |
4306 | + <linearGradient |
4307 | + inkscape:collect="always" |
4308 | + id="linearGradient3580-0"> |
4309 | + <stop |
4310 | + style="stop-color:#ffffff;stop-opacity:1" |
4311 | + offset="0" |
4312 | + id="stop3582-6" /> |
4313 | + <stop |
4314 | + style="stop-color:#d3d7cf;stop-opacity:1" |
4315 | + offset="1" |
4316 | + id="stop3584-8" /> |
4317 | + </linearGradient> |
4318 | + <linearGradient |
4319 | + inkscape:collect="always" |
4320 | + xlink:href="#linearGradient5530-4" |
4321 | + id="linearGradient6781-5" |
4322 | + gradientUnits="userSpaceOnUse" |
4323 | + x1="143.99997" |
4324 | + y1="106.25386" |
4325 | + x2="143.99997" |
4326 | + y2="91.980705" /> |
4327 | + <linearGradient |
4328 | + inkscape:collect="always" |
4329 | + id="linearGradient5530-4"> |
4330 | + <stop |
4331 | + style="stop-color:#babdb6;stop-opacity:1" |
4332 | + offset="0" |
4333 | + id="stop5532-9" /> |
4334 | + <stop |
4335 | + style="stop-color:#555753;stop-opacity:1" |
4336 | + offset="1" |
4337 | + id="stop5534-4" /> |
4338 | + </linearGradient> |
4339 | + <linearGradient |
4340 | + inkscape:collect="always" |
4341 | + xlink:href="#linearGradient5530-4" |
4342 | + id="linearGradient3511" |
4343 | + gradientUnits="userSpaceOnUse" |
4344 | + x1="143.99997" |
4345 | + y1="106.25386" |
4346 | + x2="143.99997" |
4347 | + y2="91.980705" /> |
4348 | + <linearGradient |
4349 | + inkscape:collect="always" |
4350 | + xlink:href="#linearGradient5530-4" |
4351 | + id="linearGradient6783-6" |
4352 | + gradientUnits="userSpaceOnUse" |
4353 | + x1="143.77536" |
4354 | + y1="235.92043" |
4355 | + x2="143.77536" |
4356 | + y2="221.91942" /> |
4357 | + <linearGradient |
4358 | + inkscape:collect="always" |
4359 | + xlink:href="#linearGradient5530-4" |
4360 | + id="linearGradient3526" |
4361 | + gradientUnits="userSpaceOnUse" |
4362 | + x1="143.77536" |
4363 | + y1="235.92043" |
4364 | + x2="143.77536" |
4365 | + y2="221.91942" /> |
4366 | + <linearGradient |
4367 | + inkscape:collect="always" |
4368 | + xlink:href="#linearGradient5530-4" |
4369 | + id="linearGradient6785-8" |
4370 | + gradientUnits="userSpaceOnUse" |
4371 | + x1="211.0293" |
4372 | + y1="170.50592" |
4373 | + x2="211.0293" |
4374 | + y2="157.49393" /> |
4375 | + <linearGradient |
4376 | + inkscape:collect="always" |
4377 | + xlink:href="#linearGradient5530-4" |
4378 | + id="linearGradient3541" |
4379 | + gradientUnits="userSpaceOnUse" |
4380 | + x1="211.0293" |
4381 | + y1="170.50592" |
4382 | + x2="211.0293" |
4383 | + y2="157.49393" /> |
4384 | + <linearGradient |
4385 | + inkscape:collect="always" |
4386 | + xlink:href="#linearGradient5530-4" |
4387 | + id="linearGradient6787-3" |
4388 | + gradientUnits="userSpaceOnUse" |
4389 | + x1="77.136726" |
4390 | + y1="170.73593" |
4391 | + x2="77.136726" |
4392 | + y2="157.23462" /> |
4393 | + <linearGradient |
4394 | + inkscape:collect="always" |
4395 | + xlink:href="#linearGradient5530-4" |
4396 | + id="linearGradient3556" |
4397 | + gradientUnits="userSpaceOnUse" |
4398 | + x1="77.136726" |
4399 | + y1="170.73593" |
4400 | + x2="77.136726" |
4401 | + y2="157.23462" /> |
4402 | + <linearGradient |
4403 | + inkscape:collect="always" |
4404 | + xlink:href="#linearGradient4849-8-4-3" |
4405 | + id="linearGradient5626-2" |
4406 | + gradientUnits="userSpaceOnUse" |
4407 | + x1="556" |
4408 | + y1="1111.3027" |
4409 | + x2="552.65161" |
4410 | + y2="1085.869" /> |
4411 | + <linearGradient |
4412 | + inkscape:collect="always" |
4413 | + id="linearGradient4849-8-4-3"> |
4414 | + <stop |
4415 | + style="stop-color:#ffffff;stop-opacity:1;" |
4416 | + offset="0" |
4417 | + id="stop4851-7-8-6" /> |
4418 | + <stop |
4419 | + style="stop-color:#ffffff;stop-opacity:0;" |
4420 | + offset="1" |
4421 | + id="stop4853-4-4-2" /> |
4422 | + </linearGradient> |
4423 | + <filter |
4424 | + color-interpolation-filters="sRGB" |
4425 | + inkscape:collect="always" |
4426 | + id="filter4857-9-6-2"> |
4427 | + <feGaussianBlur |
4428 | + inkscape:collect="always" |
4429 | + stdDeviation="0.88" |
4430 | + id="feGaussianBlur4859-2-9-4" /> |
4431 | + </filter> |
4432 | + <linearGradient |
4433 | + inkscape:collect="always" |
4434 | + xlink:href="#linearGradient3453-8" |
4435 | + id="linearGradient5606-7" |
4436 | + gradientUnits="userSpaceOnUse" |
4437 | + x1="582.04169" |
4438 | + y1="1102.4139" |
4439 | + x2="582.04169" |
4440 | + y2="1023.9925" /> |
4441 | + <linearGradient |
4442 | + inkscape:collect="always" |
4443 | + id="linearGradient3453-8"> |
4444 | + <stop |
4445 | + style="stop-color:#000000;stop-opacity:1;" |
4446 | + offset="0" |
4447 | + id="stop3455-3" /> |
4448 | + <stop |
4449 | + style="stop-color:#000000;stop-opacity:0;" |
4450 | + offset="1" |
4451 | + id="stop3457-6" /> |
4452 | + </linearGradient> |
4453 | + <filter |
4454 | + color-interpolation-filters="sRGB" |
4455 | + inkscape:collect="always" |
4456 | + id="filter3449-7" |
4457 | + x="-0.21977592" |
4458 | + width="1.4395518" |
4459 | + y="-0.21977592" |
4460 | + height="1.4395518"> |
4461 | + <feGaussianBlur |
4462 | + inkscape:collect="always" |
4463 | + stdDeviation="8.05845" |
4464 | + id="feGaussianBlur3451-8" /> |
4465 | + </filter> |
4466 | + <linearGradient |
4467 | + y2="1023.9925" |
4468 | + x2="582.04169" |
4469 | + y1="1102.4139" |
4470 | + x1="582.04169" |
4471 | + gradientUnits="userSpaceOnUse" |
4472 | + id="linearGradient7629" |
4473 | + xlink:href="#linearGradient3453-8" |
4474 | + inkscape:collect="always" /> |
4475 | + <linearGradient |
4476 | + y2="1023.9925" |
4477 | + x2="582.04169" |
4478 | + y1="1102.4139" |
4479 | + x1="582.04169" |
4480 | + gradientUnits="userSpaceOnUse" |
4481 | + id="linearGradient3637" |
4482 | + xlink:href="#linearGradient3453-8" |
4483 | + inkscape:collect="always" /> |
4484 | + </defs> |
4485 | + <sodipodi:namedview |
4486 | + id="base" |
4487 | + pagecolor="#ffffff" |
4488 | + bordercolor="#666666" |
4489 | + borderopacity="1.0" |
4490 | + inkscape:pageopacity="0.0" |
4491 | + inkscape:pageshadow="2" |
4492 | + inkscape:zoom="1" |
4493 | + inkscape:cx="24" |
4494 | + inkscape:cy="24" |
4495 | + inkscape:document-units="px" |
4496 | + inkscape:current-layer="layer1" |
4497 | + showgrid="false" |
4498 | + inkscape:window-width="1400" |
4499 | + inkscape:window-height="975" |
4500 | + inkscape:window-x="0" |
4501 | + inkscape:window-y="25" |
4502 | + inkscape:window-maximized="1" /> |
4503 | + <metadata |
4504 | + id="metadata3644"> |
4505 | + <rdf:RDF> |
4506 | + <cc:Work |
4507 | + rdf:about=""> |
4508 | + <dc:format>image/svg+xml</dc:format> |
4509 | + <dc:type |
4510 | + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> |
4511 | + <dc:title></dc:title> |
4512 | + </cc:Work> |
4513 | + </rdf:RDF> |
4514 | + </metadata> |
4515 | + <g |
4516 | + inkscape:label="Layer 1" |
4517 | + inkscape:groupmode="layer" |
4518 | + id="layer1" |
4519 | + transform="translate(0,-1004.3622)"> |
4520 | + <g |
4521 | + style="display:inline;enable-background:new" |
4522 | + id="use6074" |
4523 | + transform="matrix(0.22542576,0,0,0.23295729,-7.4507583,988.13468)"> |
4524 | + <path |
4525 | + sodipodi:type="arc" |
4526 | + style="opacity:0.4;fill:url(#linearGradient5606-7);fill-opacity:1;stroke:none;display:inline;filter:url(#filter3449-7);enable-background:new" |
4527 | + id="path4544" |
4528 | + sodipodi:cx="556" |
4529 | + sodipodi:cy="1068" |
4530 | + sodipodi:rx="44" |
4531 | + sodipodi:ry="44" |
4532 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4533 | + transform="matrix(1.7516202,0,0,0.4743969,-829.90078,-260.99919)" /> |
4534 | + <path |
4535 | + sodipodi:type="arc" |
4536 | + style="opacity:0.8;fill:url(#linearGradient3637);fill-opacity:1;stroke:none;display:inline;filter:url(#filter3449-7);enable-background:new" |
4537 | + id="path4546" |
4538 | + sodipodi:cx="556" |
4539 | + sodipodi:cy="1068" |
4540 | + sodipodi:rx="44" |
4541 | + sodipodi:ry="44" |
4542 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4543 | + transform="matrix(1.2481235,0,0,0.3380333,-549.95657,-111.36283)" /> |
4544 | + </g> |
4545 | + <g |
4546 | + style="display:inline;enable-background:new" |
4547 | + id="use6076" |
4548 | + transform="translate(-694.9789,648.3622)"> |
4549 | + <path |
4550 | + sodipodi:type="arc" |
4551 | + style="fill:none;stroke:url(#radialGradient5610-5);stroke-width:4.19047403;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" |
4552 | + id="path4448" |
4553 | + sodipodi:cx="556" |
4554 | + sodipodi:cy="1068" |
4555 | + sodipodi:rx="44" |
4556 | + sodipodi:ry="44" |
4557 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4558 | + transform="matrix(0.47727297,0,0,0.47727297,454.63624,-130.72752)" /> |
4559 | + <g |
4560 | + id="g4450" |
4561 | + transform="matrix(0.21875002,0,0,0.21875002,688.5,343.125)"> |
4562 | + <g |
4563 | + style="display:inline;enable-background:new" |
4564 | + id="g4452" |
4565 | + transform="matrix(2.1818181,0,0,2.1818181,-1051.6363,-2148.7272)"> |
4566 | + <g |
4567 | + clip-path="url(#clipPath12885-6)" |
4568 | + id="g4454"> |
4569 | + <path |
4570 | + sodipodi:type="arc" |
4571 | + style="fill:url(#radialGradient5612-3);fill-opacity:1;stroke:none" |
4572 | + id="path4456" |
4573 | + sodipodi:cx="556" |
4574 | + sodipodi:cy="1068" |
4575 | + sodipodi:rx="44" |
4576 | + sodipodi:ry="44" |
4577 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4578 | + transform="translate(-8,-8)" /> |
4579 | + <path |
4580 | + sodipodi:type="arc" |
4581 | + style="fill:url(#radialGradient5614-3);fill-opacity:1;stroke:none;display:inline" |
4582 | + id="path4458" |
4583 | + sodipodi:cx="556" |
4584 | + sodipodi:cy="1068" |
4585 | + sodipodi:rx="44" |
4586 | + sodipodi:ry="44" |
4587 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4588 | + transform="translate(-8.0000005,-8)" /> |
4589 | + <path |
4590 | + transform="matrix(0.83749189,0,0,0.83749189,82.354503,165.55866)" |
4591 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4592 | + sodipodi:ry="44" |
4593 | + sodipodi:rx="44" |
4594 | + sodipodi:cy="1068" |
4595 | + sodipodi:cx="556" |
4596 | + id="path4460" |
4597 | + style="fill:#888a85;stroke:#888a85;stroke-width:5.00360203;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;filter:url(#filter12907-2)" |
4598 | + sodipodi:type="arc" /> |
4599 | + </g> |
4600 | + <path |
4601 | + transform="matrix(0.805203,0,0,0.805203,100.30713,200.04319)" |
4602 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4603 | + sodipodi:ry="44" |
4604 | + sodipodi:rx="44" |
4605 | + sodipodi:cy="1068" |
4606 | + sodipodi:cx="556" |
4607 | + id="path4462" |
4608 | + style="fill:#888a85;stroke:#2e3436;stroke-width:2.60212398;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;filter:url(#filter12907-2)" |
4609 | + sodipodi:type="arc" /> |
4610 | + </g> |
4611 | + <g |
4612 | + id="g4464" |
4613 | + transform="translate(10,0)"> |
4614 | + <path |
4615 | + transform="matrix(1.7662308,0,0,1.7662308,-848.02435,-1722.3347)" |
4616 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4617 | + sodipodi:ry="44" |
4618 | + sodipodi:rx="44" |
4619 | + sodipodi:cy="1068" |
4620 | + sodipodi:cx="556" |
4621 | + id="path4466" |
4622 | + style="fill:url(#linearGradient5616-0);fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4623 | + sodipodi:type="arc" /> |
4624 | + <g |
4625 | + transform="matrix(1.0456695,0,0,1.0456695,-16.576394,-7.4897813)" |
4626 | + style="opacity:0.2;fill:#000000" |
4627 | + id="g4468"> |
4628 | + <path |
4629 | + sodipodi:type="arc" |
4630 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4631 | + id="path4470" |
4632 | + sodipodi:cx="556" |
4633 | + sodipodi:cy="1068" |
4634 | + sodipodi:rx="44" |
4635 | + sodipodi:ry="44" |
4636 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4637 | + transform="matrix(0.05904885,0.03409187,-0.03409187,0.05904885,180.07888,25.689011)" /> |
4638 | + <path |
4639 | + sodipodi:type="arc" |
4640 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4641 | + id="path4472" |
4642 | + sodipodi:cx="556" |
4643 | + sodipodi:cy="1068" |
4644 | + sodipodi:rx="44" |
4645 | + sodipodi:ry="44" |
4646 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4647 | + transform="matrix(0.05904885,0.03409187,-0.03409187,0.05904885,115.07888,138.27231)" /> |
4648 | + <path |
4649 | + sodipodi:type="arc" |
4650 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4651 | + id="path4474" |
4652 | + sodipodi:cx="556" |
4653 | + sodipodi:cy="1068" |
4654 | + sodipodi:rx="44" |
4655 | + sodipodi:ry="44" |
4656 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4657 | + transform="matrix(0.03409187,0.05904885,-0.05904885,0.03409187,244.40066,62.258638)" /> |
4658 | + <path |
4659 | + sodipodi:type="arc" |
4660 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4661 | + id="path4476" |
4662 | + sodipodi:cx="556" |
4663 | + sodipodi:cy="1068" |
4664 | + sodipodi:rx="44" |
4665 | + sodipodi:ry="44" |
4666 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4667 | + transform="matrix(0.03409187,0.05904885,-0.05904885,0.03409187,131.81736,127.25864)" /> |
4668 | + <path |
4669 | + sodipodi:type="arc" |
4670 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4671 | + id="path4478" |
4672 | + sodipodi:cx="556" |
4673 | + sodipodi:cy="1068" |
4674 | + sodipodi:rx="44" |
4675 | + sodipodi:ry="44" |
4676 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4677 | + transform="matrix(-0.05904885,0.03409187,0.03409187,0.05904885,107.92096,25.689013)" /> |
4678 | + <path |
4679 | + sodipodi:type="arc" |
4680 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4681 | + id="path4480" |
4682 | + sodipodi:cx="556" |
4683 | + sodipodi:cy="1068" |
4684 | + sodipodi:rx="44" |
4685 | + sodipodi:ry="44" |
4686 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4687 | + transform="matrix(-0.05904885,0.03409187,0.03409187,0.05904885,172.92096,138.27231)" /> |
4688 | + <path |
4689 | + sodipodi:type="arc" |
4690 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4691 | + id="path4482" |
4692 | + sodipodi:cx="556" |
4693 | + sodipodi:cy="1068" |
4694 | + sodipodi:rx="44" |
4695 | + sodipodi:ry="44" |
4696 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4697 | + transform="matrix(-0.03409187,0.05904885,0.05904885,0.03409187,43.599175,62.258632)" /> |
4698 | + <path |
4699 | + sodipodi:type="arc" |
4700 | + style="fill:#000000;fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4701 | + id="path4484" |
4702 | + sodipodi:cx="556" |
4703 | + sodipodi:cy="1068" |
4704 | + sodipodi:rx="44" |
4705 | + sodipodi:ry="44" |
4706 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4707 | + transform="matrix(-0.03409187,0.05904885,0.05904885,0.03409187,156.18248,127.25863)" /> |
4708 | + </g> |
4709 | + <g |
4710 | + transform="translate(-10,0)" |
4711 | + id="g4486"> |
4712 | + <text |
4713 | + xml:space="preserve" |
4714 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#ffffff;stroke:#ffffff;stroke-width:4.57142782;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4715 | + x="143.77536" |
4716 | + y="106.96484" |
4717 | + id="text4488"><tspan |
4718 | + sodipodi:role="line" |
4719 | + id="tspan4490" |
4720 | + x="143.77536" |
4721 | + y="106.96484" |
4722 | + style="stroke-width:4.57142782">12</tspan></text> |
4723 | + <text |
4724 | + xml:space="preserve" |
4725 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:url(#linearGradient6781-5);fill-opacity:1;stroke:none;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4726 | + x="143.77536" |
4727 | + y="105.96484" |
4728 | + id="text4492"><tspan |
4729 | + sodipodi:role="line" |
4730 | + id="tspan4494" |
4731 | + x="143.77536" |
4732 | + y="105.96484" |
4733 | + style="fill:url(#linearGradient6781-5);fill-opacity:1">12</tspan></text> |
4734 | + <text |
4735 | + xml:space="preserve" |
4736 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#ffffff;stroke:#ffffff;stroke-width:4.57142782;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4737 | + x="143.77536" |
4738 | + y="236.80469" |
4739 | + id="text4496"><tspan |
4740 | + sodipodi:role="line" |
4741 | + id="tspan4498" |
4742 | + x="143.77536" |
4743 | + y="236.80469" |
4744 | + style="stroke-width:4.57142782">6</tspan></text> |
4745 | + <text |
4746 | + xml:space="preserve" |
4747 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:url(#linearGradient6783-6);stroke:none;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4748 | + x="143.77536" |
4749 | + y="235.80469" |
4750 | + id="text4500"><tspan |
4751 | + sodipodi:role="line" |
4752 | + id="tspan4502" |
4753 | + x="143.77536" |
4754 | + y="235.80469" |
4755 | + style="fill:url(#linearGradient6783-6)">6</tspan></text> |
4756 | + <text |
4757 | + xml:space="preserve" |
4758 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#ffffff;stroke:#ffffff;stroke-width:4.57142782;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4759 | + x="211.16602" |
4760 | + y="171.87004" |
4761 | + id="text4504"><tspan |
4762 | + sodipodi:role="line" |
4763 | + id="tspan4506" |
4764 | + x="211.16602" |
4765 | + y="171.87004" |
4766 | + style="stroke-width:4.57142782">3</tspan></text> |
4767 | + <text |
4768 | + xml:space="preserve" |
4769 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:url(#linearGradient6785-8);stroke:none;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4770 | + x="211.16602" |
4771 | + y="170.87004" |
4772 | + id="text4508"><tspan |
4773 | + sodipodi:role="line" |
4774 | + id="tspan4510" |
4775 | + x="211.16602" |
4776 | + y="170.87004" |
4777 | + style="fill:url(#linearGradient6785-8)">3</tspan></text> |
4778 | + <text |
4779 | + xml:space="preserve" |
4780 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#ffffff;stroke:#ffffff;stroke-width:4.57142782;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4781 | + x="77.166023" |
4782 | + y="171.87004" |
4783 | + id="text4512"><tspan |
4784 | + sodipodi:role="line" |
4785 | + id="tspan4514" |
4786 | + x="77.166023" |
4787 | + y="171.87004" |
4788 | + style="stroke-width:4.57142782">9</tspan></text> |
4789 | + <text |
4790 | + xml:space="preserve" |
4791 | + style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:url(#linearGradient6787-3);stroke:none;display:inline;enable-background:new;font-family:Liberation Sans;-inkscape-font-specification:Bitstream Vera Sans Bold" |
4792 | + x="77.166023" |
4793 | + y="170.87004" |
4794 | + id="text4516"><tspan |
4795 | + sodipodi:role="line" |
4796 | + id="tspan4518" |
4797 | + x="77.166023" |
4798 | + y="170.87004" |
4799 | + style="fill:url(#linearGradient6787-3)">9</tspan></text> |
4800 | + </g> |
4801 | + </g> |
4802 | + </g> |
4803 | + <path |
4804 | + sodipodi:type="arc" |
4805 | + style="opacity:0.2;fill:none;stroke:#ffffff;stroke-width:2.14634037;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" |
4806 | + id="path4520" |
4807 | + sodipodi:cx="556" |
4808 | + sodipodi:cy="1068" |
4809 | + sodipodi:rx="44" |
4810 | + sodipodi:ry="44" |
4811 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4812 | + transform="matrix(0.46590933,0,0,0.46590933,460.95442,-118.59116)" /> |
4813 | + <path |
4814 | + sodipodi:type="arc" |
4815 | + style="opacity:0.5550661;fill:none;stroke:url(#linearGradient5626-2);stroke-width:2.39686704;stroke-miterlimit:4;stroke-dasharray:none;display:inline;filter:url(#filter4857-9-6-2);enable-background:new" |
4816 | + id="path4522" |
4817 | + sodipodi:cx="556" |
4818 | + sodipodi:cy="1068" |
4819 | + sodipodi:rx="44" |
4820 | + sodipodi:ry="44" |
4821 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4822 | + transform="matrix(0.41721124,0,0,0.41721124,488.15556,-66.58162)" /> |
4823 | + </g> |
4824 | + <rect |
4825 | + style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" |
4826 | + id="rect4262-7-7-9-0-7" |
4827 | + width="2" |
4828 | + height="9" |
4829 | + x="1027.3629" |
4830 | + y="-35.021137" |
4831 | + transform="matrix(0,1,-1,0,0,0)" |
4832 | + inkscape:transform-center-x="-4.5" /> |
4833 | + <rect |
4834 | + style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" |
4835 | + id="rect4262-77-9-6-1" |
4836 | + width="2" |
4837 | + height="14" |
4838 | + x="-710.46991" |
4839 | + y="730.85492" |
4840 | + inkscape:transform-center-y="-4.9497476" |
4841 | + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" |
4842 | + inkscape:transform-center-x="4.9497489" /> |
4843 | + <rect |
4844 | + style="color:#000000;fill:url(#linearGradient6872-3);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" |
4845 | + id="rect4262-7-7-8-1" |
4846 | + width="2" |
4847 | + height="9" |
4848 | + x="1026.3629" |
4849 | + y="-34.021137" |
4850 | + transform="matrix(0,1,-1,0,0,0)" |
4851 | + inkscape:transform-center-x="-4.5" /> |
4852 | + <rect |
4853 | + style="color:#000000;fill:url(#linearGradient6869-9);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" |
4854 | + id="rect4262-77-97-1" |
4855 | + width="2" |
4856 | + height="14" |
4857 | + x="-709.76282" |
4858 | + y="730.14783" |
4859 | + inkscape:transform-center-y="-4.9497476" |
4860 | + transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)" |
4861 | + inkscape:transform-center-x="4.9497489" /> |
4862 | + <path |
4863 | + transform="matrix(0.05681172,0,0,0.05681172,-6.5661183,966.68757)" |
4864 | + d="m 600,1068 a 44,44 0 1 1 -88,0 44,44 0 1 1 88,0 z" |
4865 | + sodipodi:ry="44" |
4866 | + sodipodi:rx="44" |
4867 | + sodipodi:cy="1068" |
4868 | + sodipodi:cx="556" |
4869 | + id="use4604-0-7" |
4870 | + style="fill:url(#radialGradient6576-6);fill-opacity:1;stroke:#555753;stroke-width:17.6020031;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new" |
4871 | + sodipodi:type="arc" /> |
4872 | + <g |
4873 | + style="display:inline;enable-background:new" |
4874 | + transform="matrix(0.94444449,0,0,0.94444449,-654.97894,669.41774)" |
4875 | + id="use6078"> |
4876 | + <path |
4877 | + sodipodi:type="arc" |
4878 | + style="opacity:0.7;fill:url(#radialGradient6295-0);fill-opacity:1;stroke:#babdb6;stroke-width:2.66218281;stroke-miterlimit:4;stroke-dasharray:none;display:inline;enable-background:new" |
4879 | + id="path4438" |
4880 | + sodipodi:cx="556" |
4881 | + sodipodi:cy="1068" |
4882 | + sodipodi:rx="44" |
4883 | + sodipodi:ry="44" |
4884 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4885 | + transform="matrix(0.39772755,0,0,0.39772755,498.86347,-45.773011)" /> |
4886 | + <path |
4887 | + sodipodi:type="arc" |
4888 | + style="opacity:0.86976743;fill:url(#radialGradient6297-8);fill-opacity:1;stroke:none;display:inline;enable-background:new" |
4889 | + id="path4440" |
4890 | + sodipodi:cx="556" |
4891 | + sodipodi:cy="1068" |
4892 | + sodipodi:rx="44" |
4893 | + sodipodi:ry="44" |
4894 | + d="m 600,1068 c 0,24.3005 -19.69947,44 -44,44 -24.30053,0 -44,-19.6995 -44,-44 0,-24.3005 19.69947,-44 44,-44 24.30053,0 44,19.6995 44,44 z" |
4895 | + transform="matrix(0.25911855,0,0,0.15265075,575.93008,206.95338)" /> |
4896 | + </g> |
4897 | + </g> |
4898 | +</svg> |
4899 | |
4900 | === added file 'panels/datetime/settings-shared.h' |
4901 | --- panels/datetime/settings-shared.h 1970-01-01 00:00:00 +0000 |
4902 | +++ panels/datetime/settings-shared.h 2014-03-03 10:09:16 +0000 |
4903 | @@ -0,0 +1,50 @@ |
4904 | +/* |
4905 | +An indicator to show date and time information. |
4906 | + |
4907 | +Copyright 2010 Canonical Ltd. |
4908 | + |
4909 | +Authors: |
4910 | + Ted Gould <ted@canonical.com> |
4911 | + |
4912 | +This program is free software: you can redistribute it and/or modify it |
4913 | +under the terms of the GNU General Public License version 3, as published |
4914 | +by the Free Software Foundation. |
4915 | + |
4916 | +This program is distributed in the hope that it will be useful, but |
4917 | +WITHOUT ANY WARRANTY; without even the implied warranties of |
4918 | +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
4919 | +PURPOSE. See the GNU General Public License for more details. |
4920 | + |
4921 | +You should have received a copy of the GNU General Public License along |
4922 | +with this program. If not, see <http://www.gnu.org/licenses/>. |
4923 | +*/ |
4924 | + |
4925 | +#ifndef __DATETIME_SETTINGS_SHARED_H__ |
4926 | +#define __DATETIME_SETTINGS_SHARED_H__ |
4927 | + |
4928 | +typedef enum |
4929 | +{ |
4930 | + TIME_FORMAT_MODE_LOCALE_DEFAULT, |
4931 | + TIME_FORMAT_MODE_12_HOUR, |
4932 | + TIME_FORMAT_MODE_24_HOUR, |
4933 | + TIME_FORMAT_MODE_CUSTOM |
4934 | +} |
4935 | +TimeFormatMode; |
4936 | + |
4937 | +#define SETTINGS_INTERFACE "com.canonical.indicator.datetime" |
4938 | +#define SETTINGS_SHOW_CLOCK_S "show-clock" |
4939 | +#define SETTINGS_TIME_FORMAT_S "time-format" |
4940 | +#define SETTINGS_SHOW_SECONDS_S "show-seconds" |
4941 | +#define SETTINGS_SHOW_DAY_S "show-day" |
4942 | +#define SETTINGS_SHOW_DATE_S "show-date" |
4943 | +#define SETTINGS_SHOW_YEAR_S "show-year" |
4944 | +#define SETTINGS_CUSTOM_TIME_FORMAT_S "custom-time-format" |
4945 | +#define SETTINGS_SHOW_CALENDAR_S "show-calendar" |
4946 | +#define SETTINGS_SHOW_WEEK_NUMBERS_S "show-week-numbers" |
4947 | +#define SETTINGS_SHOW_EVENTS_S "show-events" |
4948 | +#define SETTINGS_SHOW_LOCATIONS_S "show-locations" |
4949 | +#define SETTINGS_SHOW_DETECTED_S "show-auto-detected-location" |
4950 | +#define SETTINGS_LOCATIONS_S "locations" |
4951 | +#define SETTINGS_TIMEZONE_NAME_S "timezone-name" |
4952 | + |
4953 | +#endif |
4954 | |
4955 | === added file 'panels/datetime/unity-datetime-panel.desktop.in.in' |
4956 | --- panels/datetime/unity-datetime-panel.desktop.in.in 1970-01-01 00:00:00 +0000 |
4957 | +++ panels/datetime/unity-datetime-panel.desktop.in.in 2014-03-03 10:09:16 +0000 |
4958 | @@ -0,0 +1,12 @@ |
4959 | +[Desktop Entry] |
4960 | +Version=1.0 |
4961 | +_Name=Time & Date |
4962 | +_Comment=Change your clock and date settings |
4963 | +Icon=unity-datetime-panel |
4964 | +TryExec=unity-control-center |
4965 | +Exec=unity-control-center datetime |
4966 | +StartupNotify=true |
4967 | +Type=Application |
4968 | +Categories=GNOME;GTK;Utility;DesktopSettings;Settings;X-GNOME-SystemSettings;X-Unity-Settings-Panel; |
4969 | +X-Unity-Settings-Panel=datetime |
4970 | +OnlyShowIn=Unity; |
4971 | |
4972 | === added file 'panels/datetime/utils.c' |
4973 | --- panels/datetime/utils.c 1970-01-01 00:00:00 +0000 |
4974 | +++ panels/datetime/utils.c 2014-03-03 10:09:16 +0000 |
4975 | @@ -0,0 +1,468 @@ |
4976 | +/* -*- Mode: C; coding: utf-8; indent-tabs-mode: nil; tab-width: 2 -*- |
4977 | + |
4978 | +A dialog for setting time and date preferences. |
4979 | + |
4980 | +Copyright 2010 Canonical Ltd. |
4981 | + |
4982 | +Authors: |
4983 | + Michael Terry <michael.terry@canonical.com> |
4984 | + |
4985 | +This program is free software: you can redistribute it and/or modify it |
4986 | +under the terms of the GNU General Public License version 3, as published |
4987 | +by the Free Software Foundation. |
4988 | + |
4989 | +This program is distributed in the hope that it will be useful, but |
4990 | +WITHOUT ANY WARRANTY; without even the implied warranties of |
4991 | +MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
4992 | +PURPOSE. See the GNU General Public License for more details. |
4993 | + |
4994 | +You should have received a copy of the GNU General Public License along |
4995 | +with this program. If not, see <http://www.gnu.org/licenses/>. |
4996 | +*/ |
4997 | + |
4998 | +#include <config.h> |
4999 | + |
5000 | +#include <glib/gi18n-lib.h> |