r44183 - in /desktop/wheezy/gnome-shell/debian: changelog patches/29_week_number.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Thu Mar 26 20:37:29 UTC 2015


Author: joss
Date: Thu Mar 26 20:37:29 2015
New Revision: 44183

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=44183
Log:
29_week_number.patch: backported patch from upstream.
Fix week number computation, which is wrong in 2015.

Added:
    desktop/wheezy/gnome-shell/debian/patches/29_week_number.patch
Modified:
    desktop/wheezy/gnome-shell/debian/changelog
    desktop/wheezy/gnome-shell/debian/patches/series

Modified: desktop/wheezy/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/wheezy/gnome-shell/debian/changelog?rev=44183&op=diff
==============================================================================
--- desktop/wheezy/gnome-shell/debian/changelog	[utf-8] (original)
+++ desktop/wheezy/gnome-shell/debian/changelog	[utf-8] Thu Mar 26 20:37:29 2015
@@ -1,3 +1,10 @@
+gnome-shell (3.4.2-7+deb7u2) stable; urgency=low
+
+  * 29_week_number.patch: backported patch from upstream.
+    Fix week number computation, which is wrong in 2015.
+
+ -- Josselin Mouette <joss at debian.org>  Thu, 26 Mar 2015 21:36:58 +0100
+
 gnome-shell (3.4.2-7+deb7u1) stable; urgency=low
 
   [ Josselin Mouette ]

Added: desktop/wheezy/gnome-shell/debian/patches/29_week_number.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/wheezy/gnome-shell/debian/patches/29_week_number.patch?rev=44183&op=file
==============================================================================
--- desktop/wheezy/gnome-shell/debian/patches/29_week_number.patch	(added)
+++ desktop/wheezy/gnome-shell/debian/patches/29_week_number.patch	[utf-8] Thu Mar 26 20:37:29 2015
@@ -0,0 +1,41 @@
+Backported from 412d40f8448e0f83cd6bfd6c4841b25b010378d7
+
+https://bugzilla.gnome.org/show_bug.cgi?id=736722
+
+Index: gnome-shell-3.4.2/js/ui/calendar.js
+===================================================================
+--- gnome-shell-3.4.2.orig/js/ui/calendar.js	2015-03-26 21:34:47.064453237 +0100
++++ gnome-shell-3.4.2/js/ui/calendar.js	2015-03-26 21:34:23.752826288 +0100
+@@ -78,23 +78,6 @@ function _formatEventTime(event, clockFo
+     return ret;
+ }
+ 
+-function _getCalendarWeekForDate(date) {
+-    // Based on the algorithms found here:
+-    // http://en.wikipedia.org/wiki/Talk:ISO_week_date
+-    let midnightDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
+-    // Need to get Monday to be 1 ... Sunday to be 7
+-    let dayOfWeek = 1 + ((midnightDate.getDay() + 6) % 7);
+-    let nearestThursday = new Date(midnightDate.getFullYear(), midnightDate.getMonth(),
+-                                   midnightDate.getDate() + (4 - dayOfWeek));
+-
+-    let jan1st = new Date(nearestThursday.getFullYear(), 0, 1);
+-    let diffDate = nearestThursday - jan1st;
+-    let dayNumber = Math.floor(Math.abs(diffDate) / MSECS_IN_DAY);
+-    let weekNumber = Math.floor(dayNumber / 7) + 1;
+-
+-    return weekNumber;
+-}
+-
+ function _getDigitWidth(actor){
+     let context = actor.get_pango_context();
+     let themeNode = actor.get_theme_node();
+@@ -592,7 +575,7 @@ const Calendar = new Lang.Class({
+                            { row: row, col: offsetCols + (7 + iter.getDay() - this._weekStart) % 7 });
+ 
+             if (this._useWeekdate && iter.getDay() == 4) {
+-                let label = new St.Label({ text: _getCalendarWeekForDate(iter).toString(),
++                let label = new St.Label({ text: iter.toLocaleFormat('%V'),
+                                            style_class: 'calendar-day-base calendar-week-number'});
+                 this.actor.add(label,
+                                { row: row, col: 0, y_align: St.Align.MIDDLE });

Modified: desktop/wheezy/gnome-shell/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/wheezy/gnome-shell/debian/patches/series?rev=44183&op=diff
==============================================================================
--- desktop/wheezy/gnome-shell/debian/patches/series	[utf-8] (original)
+++ desktop/wheezy/gnome-shell/debian/patches/series	[utf-8] Thu Mar 26 20:37:29 2015
@@ -10,6 +10,7 @@
 26-networkAgent-use-absolute-path-if-configured.patch
 27-nm-libexec-path.patch
 28_network_user_connections.patch
+29_week_number.patch
 30_lockup_gc.patch
 32-enable-the-screen-reader-menu-item.patch
 33-screen-reader-l10n.patch




More information about the pkg-gnome-commits mailing list