[gnome-shell/datetime: 133/134] Adjust for merging commit 24f1e87
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/datetime: 133/134] Adjust for merging commit 24f1e87
- Date: Wed, 19 Jan 2011 16:13:03 +0000 (UTC)
commit 8bc396a7e0e0fce2e4b3537bed4c85fa14745f5a
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Jan 17 23:01:59 2011 +0100
Adjust for merging commit 24f1e87
Signed-off-by: David Zeuthen <davidz redhat com>
data/clock-preferences.ui | 50 +-----------------------------------------
js/prefs/clockPreferences.js | 13 -----------
js/ui/dateMenu.js | 26 ++++++++-------------
3 files changed, 11 insertions(+), 78 deletions(-)
---
diff --git a/data/clock-preferences.ui b/data/clock-preferences.ui
index 68e60ce..2e22d9a 100644
--- a/data/clock-preferences.ui
+++ b/data/clock-preferences.ui
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<interface>
+<interface domain="gnome-shell">
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="prefs-dialog">
@@ -145,54 +145,6 @@
<property name="position">1</property>
</packing>
</child>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkCheckButton" id="week_check">
- <property name="label" translatable="yes">Show _week numbers</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label_display1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Calendar</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
</object>
<packing>
<property name="padding">6</property>
diff --git a/js/prefs/clockPreferences.js b/js/prefs/clockPreferences.js
index 866fc30..f35d8e2 100644
--- a/js/prefs/clockPreferences.js
+++ b/js/prefs/clockPreferences.js
@@ -13,7 +13,6 @@ const FORMAT_KEY = 'format';
const SHOW_DATE_KEY = 'show-date';
const SHOW_SECONDS_KEY = 'show-seconds';
-const SHOW_WEEKDATE_KEY = 'show-weekdate';
function ClockPreferences(uiFile) {
this._init(uiFile);
@@ -31,7 +30,6 @@ ClockPreferences.prototype = {
this._24hrRadio = builder.get_object('24hr_radio');
this._dateCheck = builder.get_object('date_check');
this._secondsCheck = builder.get_object('seconds_check');
- this._weekCheck = builder.get_object('week_check');
delete builder;
@@ -39,10 +37,6 @@ ClockPreferences.prototype = {
this._notifyId = this._settings.connect('changed',
Lang.bind(this,
this._updateDialog));
- this._calendar_settings = new Gio.Settings({ schema: 'org.gnome.shell.calendar' });
- this._calendar_notifyId = this._calendar_settings.connect('changed',
- Lang.bind(this,
- this._updateDialog));
this._12hrRadio.connect('toggled', Lang.bind(this,
function() {
@@ -59,11 +53,6 @@ ClockPreferences.prototype = {
this._settings.set_boolean(SHOW_SECONDS_KEY,
this._secondsCheck.active);
}));
- this._weekCheck.connect('toggled', Lang.bind(this,
- function() {
- this._calendar_settings.set_boolean(SHOW_WEEKDATE_KEY,
- this._weekCheck.active);
- }));
this._updateDialog();
},
@@ -79,13 +68,11 @@ ClockPreferences.prototype = {
this._dateCheck.active = this._settings.get_boolean(SHOW_DATE_KEY);
this._secondsCheck.active = this._settings.get_boolean(SHOW_SECONDS_KEY);
- this._weekCheck.active = this._calendar_settings.get_boolean(SHOW_WEEKDATE_KEY);
},
_onResponse: function() {
this._dialog.destroy();
this._settings.disconnect(this._notifyId);
- this._calendar_settings.disconnect(this._calendar_notifyId);
this.emit('destroy');
}
};
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index 23853b4..b11aa0c 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -16,8 +16,10 @@ const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const Calendar = imports.ui.calendar;
-const CLOCK_FORMAT_KEY = 'format';
-const CLOCK_CUSTOM_FORMAT_KEY = 'custom-format';
+// in org.gnome.desktop.interface
+const CLOCK_FORMAT_KEY = 'clock-format';
+
+// in org.gnome.shell.clock
const CLOCK_SHOW_DATE_KEY = 'show-date';
const CLOCK_SHOW_SECONDS_KEY = 'show-seconds';
@@ -120,7 +122,9 @@ DateMenuButton.prototype = {
this.menu.addMenuItem(item);
// Track changes to clock settings
+ this._desktopSettings = new Gio.Settings({ schema: 'org.gnome.desktop.interface' });
this._clockSettings = new Gio.Settings({ schema: 'org.gnome.shell.clock' });
+ this._desktopSettings.connect('changed', Lang.bind(this, this._clockSettingsChanged));
this._clockSettings.connect('changed', Lang.bind(this, this._clockSettingsChanged));
// Start the clock
@@ -132,7 +136,7 @@ DateMenuButton.prototype = {
},
_updateClockAndDate: function() {
- let format = this._clockSettings.get_string(CLOCK_FORMAT_KEY);
+ let format = this._desktopSettings.get_string(CLOCK_FORMAT_KEY);
let showDate = this._clockSettings.get_boolean(CLOCK_SHOW_DATE_KEY);
let showSeconds = this._clockSettings.get_boolean(CLOCK_SHOW_SECONDS_KEY);
@@ -140,17 +144,7 @@ DateMenuButton.prototype = {
let dateFormat;
switch (format) {
- case 'unix':
- // force updates every second
- showSeconds = true;
- clockFormat = '%s';
- break;
- case 'custom':
- // force updates every second
- showSeconds = true;
- clockFormat = this._clockSettings.get_string(CLOCK_CUSTOM_FORMAT_KEY);
- break;
- case '24-hour':
+ case '24h':
if (showDate)
/* Translators: This is the time format with date used
in 24-hour mode. */
@@ -162,7 +156,7 @@ DateMenuButton.prototype = {
clockFormat = showSeconds ? _("%a %R:%S")
: _("%a %R");
break;
- case '12-hour':
+ case '12h':
default:
if (showDate)
/* Translators: This is a time format with date used
@@ -206,7 +200,7 @@ DateMenuButton.prototype = {
_onPreferencesActivate: function() {
Main.overview.hide();
- this._spawn(['gnome-shell-clock-preferences']);
+ this._spawn(['gnome-control-center', 'datetime']);
},
_spawn: function(args) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]