The attached patch fixes this bug. Works for me. -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its friends are
diff -u gnome-shell-2.28.1~git20091125/debian/changelog gnome-shell-2.28.1~git20091125/debian/changelog --- gnome-shell-2.28.1~git20091125/debian/changelog +++ gnome-shell-2.28.1~git20091125/debian/changelog @@ -1,3 +1,9 @@ +gnome-shell (2.28.1~git20091125-2) unstable; urgency=low + + * Make it possible to set a custom clock_format. + + -- Tollef Fog Heen <tfh...@debian.org> Thu, 10 Dec 2009 19:10:54 +0100 + gnome-shell (2.28.1~git20091125-1) unstable; urgency=low * New upstream snapshot only in patch2: unchanged: --- gnome-shell-2.28.1~git20091125.orig/data/gnome-shell.schemas +++ gnome-shell-2.28.1~git20091125/data/gnome-shell.schemas @@ -46,6 +46,20 @@ </schema> <schema> + <key>/schemas/desktop/gnome/shell/clock_format</key> + <applyto>/desktop/gnome/shell/clock_format</applyto> + <owner>gnome-shell</owner> + <type>string</type> + <default>%a %l:%M %p</default> + <locale name="C"> + <short>Format used for displaying the clock at the top of the screen</short> + <long> + Please see date(1) for details about the format of this string. + </long> + </locale> + </schema> + + <schema> <key>/schemas/desktop/gnome/shell/sidebar/visible</key> <applyto>/desktop/gnome/shell/sidebar/visible</applyto> <owner>gnome-shell</owner> only in patch2: unchanged: --- gnome-shell-2.28.1~git20091125.orig/js/ui/panel.js +++ gnome-shell-2.28.1~git20091125/js/ui/panel.js @@ -140,6 +140,7 @@ Panel.prototype = { _init : function() { + this._gconf = Shell.GConf.get_default(); this.actor = new St.BoxLayout({ name: 'panel' }); this.actor._delegate = this; @@ -291,6 +292,9 @@ clockButton.set_child(this._clock); this._calendarPopup = null; + this._clock_format = this._gconf.get_string ("clock_format"); + this._gconf.connect('changed::clock_format', + Lang.bind(this, this._clockFormatChanged)); /* right */ @@ -385,6 +389,14 @@ }); }, + _clockFormatChanged: function() { + let clock_format = this._gconf.get_string("clock_format"); + if (clock_format == this._clock_format) + return; + this._clock_format = clock_format; + this._updateClock(); + }, + _onTrayIconAdded: function(o, icon, wmClass) { let role = STANDARD_TRAY_ICON_IMPLEMENTATIONS[wmClass]; if (!role) { @@ -437,7 +449,7 @@ msecRemaining += 60000; } /* Translators: This is a time format. */ - this._clock.set_text(displayDate.toLocaleFormat(_("%a %l:%M %p"))); + this._clock.set_text(displayDate.toLocaleFormat(this._clock_format)); Mainloop.timeout_add(msecRemaining, Lang.bind(this, this._updateClock)); return false; },