1 |
commit: b5b6d9c8a928a6c2fa64c6fbbe788739f6beb3f2 |
2 |
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 15 05:16:43 2017 +0000 |
4 |
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 18 02:01:00 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5b6d9c8 |
7 |
|
8 |
gnome-extra/gnome-calendar: bump to 3.24.3 plus a week grid fixes patch from stable branch |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
gnome-extra/gnome-calendar/Manifest | 1 + |
13 |
.../files/3.24.3-week-grid-fixes.patch | 112 +++++++++++++++++++++ |
14 |
.../gnome-calendar/gnome-calendar-3.24.3.ebuild | 41 ++++++++ |
15 |
3 files changed, 154 insertions(+) |
16 |
|
17 |
diff --git a/gnome-extra/gnome-calendar/Manifest b/gnome-extra/gnome-calendar/Manifest |
18 |
index d2a04364169..8669eda22d5 100644 |
19 |
--- a/gnome-extra/gnome-calendar/Manifest |
20 |
+++ b/gnome-extra/gnome-calendar/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST gnome-calendar-3.22.5.tar.xz 2376792 SHA256 5c933189b842f1e836bb366f2fb9e5323961440bcc16b62dc9ac6f6eb4f5314d SHA512 113a77c64fce8317f12d1704bf4076b48abb0f42e4d6e474a7912bc948295bf71e8b9ea00e50301464fa9726cdbfe453af92a24acd3c9ac76a6f40e92062e335 WHIRLPOOL 186efae0a9059b0fa3b4728bd5026f02ac39ccf74120bb9dc1e7d174513e19ceb6e0289204af440ca74b48b3f0a156a1a4d762f80e45e096205fb75b3c920202 |
23 |
DIST gnome-calendar-3.24.0.tar.xz 2400324 SHA256 8a21f51e10ce491e4a492e21c47de29a9ba1b568f4e2fd6f4e33616609d413d0 SHA512 4ed4198557e148da841554b77263e0fa44de31093ca641ae5a3f521787fe2712ab4dc0409d6459da83e105688d97e4c0e097ea2471ab21698b2bc08ab60f686e WHIRLPOOL df5a5320a08535561aecfe64bc39308bc8f54405debf65ec794db55f75d8ef02b19bed05c94cb47803592a278e16104582198ee06dac59c6fe88666583b1aec5 |
24 |
+DIST gnome-calendar-3.24.3.tar.xz 2425292 SHA256 3ecb4074f44cb6c883f81f93ebde2fa3890107f8e06740495be9f942190ff3ec SHA512 979a369a5c5fc7d4621ff1ae69dfb1b53002cc014b2f1c480c0122da5bf4282c1928df9dcdb3528352e9589099184ab51f96d1a065e346be8e639aa5fc96ac67 WHIRLPOOL 8a807675061ecfef862d535460845fd9feae86744f18667cf54ce4721f53ed100677a66ab9bb1a8f118ab9f41504e7a3c444e65c8d88652fe96e2b954bf6110c |
25 |
|
26 |
diff --git a/gnome-extra/gnome-calendar/files/3.24.3-week-grid-fixes.patch b/gnome-extra/gnome-calendar/files/3.24.3-week-grid-fixes.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..e382029ceeb |
29 |
--- /dev/null |
30 |
+++ b/gnome-extra/gnome-calendar/files/3.24.3-week-grid-fixes.patch |
31 |
@@ -0,0 +1,112 @@ |
32 |
+From 9f4bc90761bb9eb3b3e8bdc9ec6b42f44f02053e Mon Sep 17 00:00:00 2001 |
33 |
+From: Abdullahi Usman |
34 |
+Date: Mon, 10 Jul 2017 11:43:36 +0100 |
35 |
+Subject: week-grid : seperate week's events overlaps. |
36 |
+ |
37 |
+The week view can display mutilple events that can partly or fully span |
38 |
+same time ranges. |
39 |
+ |
40 |
+But week view fails to make correct assumption about the width of events when |
41 |
+two or more events span some time ranges in which these events also span some |
42 |
+time ranges with other events, and whereby the number of these other events |
43 |
+that they span time ranges with does not coincide with the number of the events |
44 |
+that the other event also span. Week view ended up calculating cells that |
45 |
+appears horizontally jointed up. Also int16_compare() does not dereference the |
46 |
+pointer from g_ptr_array_sort() correctly and that makes it sort events |
47 |
+incorrectly and hence making events appears vertically jointed up. |
48 |
+ |
49 |
+If an event have other events in which they span some time, we calcuate its width |
50 |
+by taking into consideration of all the events that the other event may span |
51 |
+time with. The event that has the higher number of time spans is considered. |
52 |
+We also save and retrieve our positions using UINT_TO_POINTER and POINTER_TO_UINT() |
53 |
+respectively, and then dereference the pointer from g_ptr_array_sort() correctly. |
54 |
+ |
55 |
+https://bugzilla.gnome.org/show_bug.cgi?id=777416 |
56 |
+--- |
57 |
+ src/views/gcal-week-grid.c | 41 +++++++++++++++++++++++++++++++++++------ |
58 |
+ 1 file changed, 35 insertions(+), 6 deletions(-) |
59 |
+ |
60 |
+diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c |
61 |
+index 20ddb48..ab125b0 100644 |
62 |
+--- a/src/views/gcal-week-grid.c |
63 |
++++ b/src/views/gcal-week-grid.c |
64 |
+@@ -184,10 +184,10 @@ get_event_range (GcalWeekGrid *self, |
65 |
+ } |
66 |
+ |
67 |
+ static inline gint |
68 |
+-int16_compare (gconstpointer a, |
69 |
+- gconstpointer b) |
70 |
++uint16_compare (gconstpointer a, |
71 |
++ gconstpointer b) |
72 |
+ { |
73 |
+- return GPOINTER_TO_INT (a) - GPOINTER_TO_INT (b); |
74 |
++ return GPOINTER_TO_UINT (*(gint*)a) - GPOINTER_TO_UINT (*(gint*)b); |
75 |
+ } |
76 |
+ |
77 |
+ static inline guint |
78 |
+@@ -204,7 +204,7 @@ get_event_index (GcalRangeTree *tree, |
79 |
+ if (!array) |
80 |
+ return 0; |
81 |
+ |
82 |
+- g_ptr_array_sort (array, int16_compare); |
83 |
++ g_ptr_array_sort (array, uint16_compare); |
84 |
+ |
85 |
+ for (i = 0; array && i < array->len; i++) |
86 |
+ { |
87 |
+@@ -235,6 +235,35 @@ count_overlaps_at_range (GcalRangeTree *self, |
88 |
+ |
89 |
+ n_events = gcal_range_tree_count_entries_at_range (self, i, i + 1); |
90 |
+ |
91 |
++ if (n_events == 0) |
92 |
++ break; |
93 |
++ |
94 |
++ counter = MAX (counter, n_events); |
95 |
++ } |
96 |
++ |
97 |
++ return counter; |
98 |
++} |
99 |
++ |
100 |
++static guint |
101 |
++count_overlaps_of_event (GcalRangeTree *self, |
102 |
++ guint16 day_start, |
103 |
++ guint16 day_end, |
104 |
++ guint16 event_start, |
105 |
++ guint16 event_end) |
106 |
++{ |
107 |
++ guint64 i, counter; |
108 |
++ |
109 |
++ counter = count_overlaps_at_range (self, event_start, day_end); |
110 |
++ |
111 |
++ for (i = event_start; i > day_start; i--) |
112 |
++ { |
113 |
++ guint n_events; |
114 |
++ |
115 |
++ n_events = gcal_range_tree_count_entries_at_range (self, i - 1, i); |
116 |
++ |
117 |
++ if (n_events == 0) |
118 |
++ break; |
119 |
++ |
120 |
+ counter = MAX (counter, n_events); |
121 |
+ } |
122 |
+ |
123 |
+@@ -652,7 +681,7 @@ gcal_week_grid_size_allocate (GtkWidget *widget, |
124 |
+ context = gtk_widget_get_style_context (event_widget); |
125 |
+ |
126 |
+ /* The total number of events available in this range */ |
127 |
+- events_at_range = count_overlaps_at_range (self->events, data->start, data->end); |
128 |
++ events_at_range = count_overlaps_of_event (self->events, day_start, day_end, data->start, data->end); |
129 |
+ |
130 |
+ /* The real horizontal position of this event */ |
131 |
+ widget_index = get_event_index (overlaps, data->start, data->end); |
132 |
+@@ -689,7 +718,7 @@ gcal_week_grid_size_allocate (GtkWidget *widget, |
133 |
+ gcal_range_tree_add_range (overlaps, |
134 |
+ data->start, |
135 |
+ data->end, |
136 |
+- GINT_TO_POINTER (widget_index)); |
137 |
++ GUINT_TO_POINTER (widget_index)); |
138 |
+ } |
139 |
+ |
140 |
+ g_clear_pointer (&widgets_data, g_ptr_array_unref); |
141 |
+-- |
142 |
+cgit v0.12 |
143 |
+ |
144 |
|
145 |
diff --git a/gnome-extra/gnome-calendar/gnome-calendar-3.24.3.ebuild b/gnome-extra/gnome-calendar/gnome-calendar-3.24.3.ebuild |
146 |
new file mode 100644 |
147 |
index 00000000000..75c1537a99c |
148 |
--- /dev/null |
149 |
+++ b/gnome-extra/gnome-calendar/gnome-calendar-3.24.3.ebuild |
150 |
@@ -0,0 +1,41 @@ |
151 |
+# Copyright 1999-2017 Gentoo Foundation |
152 |
+# Distributed under the terms of the GNU General Public License v2 |
153 |
+ |
154 |
+EAPI=6 |
155 |
+inherit gnome2 |
156 |
+ |
157 |
+DESCRIPTION="Manage your online calendars with simple and modern interface" |
158 |
+HOMEPAGE="https://wiki.gnome.org/Apps/Calendar" |
159 |
+ |
160 |
+LICENSE="GPL-2+" |
161 |
+SLOT="0" |
162 |
+KEYWORDS="~amd64 ~x86" |
163 |
+IUSE="" |
164 |
+ |
165 |
+# >=libical-1.0.1 for https://bugzilla.gnome.org/show_bug.cgi?id=751244 |
166 |
+RDEPEND=" |
167 |
+ >=dev-libs/glib-2.43.4:2 |
168 |
+ >=x11-libs/gtk+-3.21.6:3 |
169 |
+ >=gnome-extra/evolution-data-server-3.17.1:= |
170 |
+ >=dev-libs/libical-1.0.1:0= |
171 |
+ net-libs/libsoup:2.4 |
172 |
+ >=net-libs/gnome-online-accounts-3.2.0:= |
173 |
+ >=gnome-base/gsettings-desktop-schemas-3.21.2 |
174 |
+" |
175 |
+DEPEND="${RDEPEND} |
176 |
+ dev-libs/appstream-glib |
177 |
+ dev-util/gdbus-codegen |
178 |
+ >=dev-util/intltool-0.40.6 |
179 |
+ sys-devel/gettext |
180 |
+ virtual/pkgconfig |
181 |
+" |
182 |
+ |
183 |
+PATCHES=( |
184 |
+ "${FILESDIR}"/${PV}-week-grid-fixes.patch # from gnome-3-22 branch |
185 |
+) |
186 |
+ |
187 |
+src_configure() { |
188 |
+ # Explicit --enable-debug=minimum forces no -O and -g touching in development (odd minor) versions |
189 |
+ gnome2_src_configure \ |
190 |
+ --enable-debug=minimum |
191 |
+} |