[gnome-shell/wip/fmuellner/notification-redux: 6/88] eventsList: Get rid of index parameter
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 6/88] eventsList: Get rid of index parameter
- Date: Sun, 15 Feb 2015 17:31:17 +0000 (UTC)
commit 2f0d3cd500bdd658378b84bc3d3067d633bfda0b
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Dec 5 16:38:34 2014 +0100
eventsList: Get rid of index parameter
js/ui/calendar.js | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index c83e7cb..7938b6f 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -742,7 +742,7 @@ const EventsList = new Lang.Class({
layout.attach(titleLabel, rtl ? 0 : 2, index, 1, 1);
},
- _addPeriod: function(header, index, periodBegin, periodEnd) {
+ _addPeriod: function(header, periodBegin, periodEnd) {
let events = this._eventSource.getEvents(periodBegin, periodEnd);
if (events.length == 0)
@@ -750,11 +750,10 @@ const EventsList = new Lang.Class({
let label = new St.Label({ style_class: 'events-day-header', text: header });
let layout = this.actor.layout_manager;
- layout.attach(label, 0, index, 3, 1);
- index++;
+ layout.attach(label, 0, 0, 3, 1);
for (let n = 0; n < events.length; n++)
- this._addEvent(events[n], index + n, periodBegin, periodEnd);
+ this._addEvent(events[n], n + 1, periodBegin, periodEnd);
},
_showOtherDay: function(day) {
@@ -774,7 +773,7 @@ const EventsList = new Lang.Class({
dayFormat = Shell.util_translate_time_string(NC_("calendar heading",
"%A, %B %d, %Y"));
let dayString = day.toLocaleFormat(dayFormat);
- this._addPeriod(dayString, 0, dayBegin, dayEnd);
+ this._addPeriod(dayString, dayBegin, dayEnd);
},
_showToday: function() {
@@ -783,7 +782,7 @@ const EventsList = new Lang.Class({
let now = new Date();
let dayBegin = _getBeginningOfDay(now);
let dayEnd = _getEndOfDay(now);
- this._addPeriod(_("Events"), 0, dayBegin, dayEnd);
+ this._addPeriod(_("Events"), dayBegin, dayEnd);
},
// Sets the event list to show events from a specific date
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]