Merge lp:~3v1n0/nautilus/ubuntu-unity-launcher-support into lp:~ubuntu-desktop/nautilus/ubuntu

Proposed by Marco Trevisan (Treviño) on 2011-09-07
Status: Merged
Merged at revision: 169
Proposed branch: lp:~3v1n0/nautilus/ubuntu-unity-launcher-support
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Diff against target: 216 lines (+57/-32) 5 files modified
To merge this branch: bzr merge lp:~3v1n0/nautilus/ubuntu-unity-launcher-support
Reviewer Review Type Date Requested Status
Didier Roche Approve on 2011-09-08
Sebastien Bacher 2011-09-07 Pending
Review via email: mp+74401@code.launchpad.net

Description of the Change

Here I'm mostly fixing the bug #841609 caused by a division per zero which lead to a bad unity launcher progressbar rendering. Plus I've improved a little the unity support code with some improvements described in the changelog.

Also, as requested in the merge proposal [1] for the branch lp:~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support I've disabled the indicator support using the --disable-appindicator flag.
Of course that can be done also removing the related patch, but I'd keep there until it won't be outdated.

[1] https://code.launchpad.net/~3v1n0/ubuntu/oneiric/nautilus/progress-indicator-support/+merge/70645

PS: Previous merge request at https://code.launchpad.net/~3v1n0/ubuntu/oneiric/nautilus/unity-launcher-support/+merge/74324

To post a comment you must log in.
Didier Roche (didrocks) wrote :

Thanks a lot for your patch, looks good and works well :)

Some note I fixed before sponsoring:
- can you please ensure that you list everything you did in the packaging in the changelog (like the additional build-dep)
- also, we tend to keep "UNRELEASED" until the sponsor set to "oneiric" if there are more than one pending change by upload.

But that's really minor, thanks again for your work there. Sponsoring.

review: Approve
Marco Trevisan (Treviño) (3v1n0) wrote :

Thanks for fixing the issues above, but I forgot them since I was moving the debian folder from the branch to lp:ubuntu/oneiric/nautilus I've done.

Thanks for merging ;)

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2011-09-06 07:51:22 +0000
3+++ debian/changelog 2011-09-07 11:48:10 +0000
4@@ -1,3 +1,15 @@
5+nautilus (1:3.1.90-0ubuntu2) oneiric; urgency=low
6+
7+ * debian/patches/12_unity_launcher_support.patch:
8+ - avoid progress division per zero, causing unity bad rendering (LP: #841609)
9+ - reset the progress value at the end of the operations
10+ - force to update the progress at the beginning of an operation
11+ - show the count when there are more than one in-progress operations
12+ * debian/rules:
13+ - Pass --disable-appindicator to configure flags.
14+
15+ -- Marco Trevisan (Treviño) <3v1n0@ubuntu.com> Wed, 07 Sep 2011 03:26:09 +0200
16+
17 nautilus (1:3.1.90-0ubuntu1) oneiric; urgency=low
18
19 * New upstream version
20
21=== modified file 'debian/control'
22--- debian/control 2011-07-25 15:10:11 +0000
23+++ debian/control 2011-09-07 11:48:10 +0000
24@@ -36,10 +36,11 @@
25 libglib2.0-doc,
26 libgtk-3-doc,
27 liblaunchpad-integration-3.0-dev,
28- libappindicator3-dev,
29+ libappindicator3-dev (>> 0.3.91),
30+ libunity-dev (>= 4.0.0)
31 Homepage: http://www.gnome.org/projects/nautilus/
32 Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/nautilus/ubuntu
33-Standards-Version: 3.9.0
34+Standards-Version: 3.9.2
35
36 Package: nautilus
37 Architecture: any
38
39=== modified file 'debian/patches/11_copy_skipping_pager.patch'
40--- debian/patches/11_copy_skipping_pager.patch 2011-07-18 09:28:13 +0000
41+++ debian/patches/11_copy_skipping_pager.patch 2011-09-07 11:48:10 +0000
42@@ -1,8 +1,8 @@
43-Index: nautilus-3.1.3/src/nautilus-progress-ui-handler.c
44+Index: nautilus/src/nautilus-progress-ui-handler.c
45 ===================================================================
46---- nautilus-3.1.3.orig/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:03.139187027 +0200
47-+++ nautilus-3.1.3/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:58.303460573 +0200
48-@@ -217,6 +217,8 @@
49+--- nautilus.orig/src/nautilus-progress-ui-handler.c 2011-08-06 04:45:23.332026621 +0200
50++++ nautilus/src/nautilus-progress-ui-handler.c 2011-08-06 04:46:02.201537962 +0200
51+@@ -305,6 +305,8 @@
52 GTK_WIN_POS_CENTER);
53 gtk_window_set_icon_name (GTK_WINDOW (progress_window),
54 "system-file-manager");
55
56=== modified file 'debian/patches/12_unity_launcher_support.patch'
57--- debian/patches/12_unity_launcher_support.patch 2011-08-12 19:16:13 +0000
58+++ debian/patches/12_unity_launcher_support.patch 2011-09-07 11:48:10 +0000
59@@ -1,6 +1,8 @@
60 === modified file 'configure.in'
61---- old/configure.in 2011-08-12 19:02:32 +0000
62-+++ new/configure.in 2011-08-12 19:02:37 +0000
63+Index: unity-launcher-support/configure.in
64+===================================================================
65+--- unity-launcher-support.orig/configure.in 2011-09-07 03:23:59.413084000 +0200
66++++ unity-launcher-support/configure.in 2011-09-07 03:23:59.413084000 +0200
67 @@ -10,6 +10,8 @@
68 m4_define(exif_minver, 0.6.20)
69 m4_define(exempi_minver, 2.1.0)
70@@ -56,10 +58,10 @@
71 nautilus-sendto ext: $enable_nst_extension
72
73 profiling support: ${profiling_support}
74-
75-=== modified file 'libnautilus-private/nautilus-progress-info.c'
76---- old/libnautilus-private/nautilus-progress-info.c 2011-08-12 19:00:28 +0000
77-+++ new/libnautilus-private/nautilus-progress-info.c 2011-08-12 19:02:37 +0000
78+Index: unity-launcher-support/libnautilus-private/nautilus-progress-info.c
79+===================================================================
80+--- unity-launcher-support.orig/libnautilus-private/nautilus-progress-info.c 2011-09-07 03:23:59.413084000 +0200
81++++ unity-launcher-support/libnautilus-private/nautilus-progress-info.c 2011-09-07 03:22:52.161623000 +0200
82 @@ -52,6 +52,8 @@
83 char *status;
84 char *details;
85@@ -121,10 +123,10 @@
86 info->progress_at_idle = TRUE;
87 queue_idle (info, FALSE);
88 }
89-
90-=== modified file 'libnautilus-private/nautilus-progress-info.h'
91---- old/libnautilus-private/nautilus-progress-info.h 2011-08-12 19:00:28 +0000
92-+++ new/libnautilus-private/nautilus-progress-info.h 2011-08-12 19:02:37 +0000
93+Index: unity-launcher-support/libnautilus-private/nautilus-progress-info.h
94+===================================================================
95+--- unity-launcher-support.orig/libnautilus-private/nautilus-progress-info.h 2011-09-07 03:23:59.413084000 +0200
96++++ unity-launcher-support/libnautilus-private/nautilus-progress-info.h 2011-09-07 03:22:52.161623000 +0200
97 @@ -62,6 +62,8 @@
98 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);
99 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);
100@@ -134,10 +136,10 @@
101
102 void nautilus_progress_info_start (NautilusProgressInfo *info);
103 void nautilus_progress_info_finish (NautilusProgressInfo *info);
104-
105-=== modified file 'src/Makefile.am'
106---- old/src/Makefile.am 2011-08-12 19:02:32 +0000
107-+++ new/src/Makefile.am 2011-08-12 19:02:37 +0000
108+Index: unity-launcher-support/src/Makefile.am
109+===================================================================
110+--- unity-launcher-support.orig/src/Makefile.am 2011-09-07 03:23:59.413084000 +0200
111++++ unity-launcher-support/src/Makefile.am 2011-09-07 03:23:59.413084000 +0200
112 @@ -31,6 +31,7 @@
113 -DVERSION="\"$(VERSION)\"" \
114 $(DISABLE_DEPRECATED_CFLAGS) \
115@@ -154,10 +156,10 @@
116 $(NULL)
117
118 nautilus_SOURCES = \
119-
120-=== modified file 'src/nautilus-progress-ui-handler.c'
121---- old/src/nautilus-progress-ui-handler.c 2011-08-12 19:02:32 +0000
122-+++ new/src/nautilus-progress-ui-handler.c 2011-08-12 19:04:17 +0000
123+Index: unity-launcher-support/src/nautilus-progress-ui-handler.c
124+===================================================================
125+--- unity-launcher-support.orig/src/nautilus-progress-ui-handler.c 2011-09-07 03:23:59.413084000 +0200
126++++ unity-launcher-support/src/nautilus-progress-ui-handler.c 2011-09-07 03:47:59.761254961 +0200
127 @@ -41,6 +41,10 @@
128 #include <libappindicator/app-indicator.h>
129 #endif
130@@ -179,7 +181,7 @@
131 };
132
133 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);
134-@@ -259,6 +266,246 @@
135+@@ -259,6 +266,256 @@
136 g_free (tooltip);
137 }
138
139@@ -194,8 +196,7 @@
140 + g_return_if_fail (self->priv->manager);
141 +
142 + GList *infos, *l;
143-+ double progress;
144-+ size_t info_n = 0;
145++ double progress = 0;
146 + double c, current = 0;
147 + double t, total = 0;
148 +
149@@ -211,10 +212,11 @@
150 +
151 + total += t;
152 + current += c;
153-+ info_n++;
154 + }
155 +
156-+ progress = current / total;
157++ if (current >= 0 && total > 0)
158++ progress = current / total;
159++
160 + if (progress > 1.0)
161 + progress = 1.0;
162 +
163@@ -379,8 +381,18 @@
164 + if (self->priv->active_infos > 0) {
165 + unity_launcher_entry_set_progress_visible (entry, TRUE);
166 + progress_ui_handler_show_unity_quicklist (self, entry, TRUE);
167++ progress_ui_handler_unity_progress_changed (NULL, self);
168++
169++ if (self->priv->active_infos > 1) {
170++ unity_launcher_entry_set_count (entry, self->priv->active_infos);
171++ unity_launcher_entry_set_count_visible (entry, TRUE);
172++ } else {
173++ unity_launcher_entry_set_count_visible (entry, FALSE);
174++ }
175 + } else {
176 + unity_launcher_entry_set_progress_visible (entry, FALSE);
177++ unity_launcher_entry_set_progress (entry, 0.0);
178++ unity_launcher_entry_set_count_visible (entry, FALSE);
179 + progress_ui_handler_show_unity_quicklist (self, entry, FALSE);
180 + GCancellable *pc = nautilus_progress_info_get_cancellable (info);
181 +
182@@ -426,7 +438,7 @@
183 static gboolean
184 progress_window_delete_event (GtkWidget *widget,
185 GdkEvent *event,
186-@@ -403,6 +650,10 @@
187+@@ -403,6 +660,10 @@
188 progress_ui_handler_show_complete_notification (self);
189 }
190 }
191@@ -437,7 +449,7 @@
192 }
193
194 static void
195-@@ -425,6 +676,10 @@
196+@@ -425,6 +686,10 @@
197 progress_ui_handler_update_notification_or_status (self);
198 }
199 }
200@@ -448,4 +460,3 @@
201 }
202
203 typedef struct {
204-
205
206=== modified file 'debian/rules'
207--- debian/rules 2011-08-26 14:09:23 +0000
208+++ debian/rules 2011-09-07 11:48:10 +0000
209@@ -12,6 +12,7 @@
210 DEB_CONFIGURE_EXTRA_FLAGS += --libexecdir=/usr/lib/nautilus \
211 --disable-update-mimedb \
212 --disable-packagekit \
213+ --disable-appindicator \
214 --enable-introspection
215 LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
216 DEB_DH_MAKESHLIBS_ARGS_libnautilus-extension1 += -V 'libnautilus-extension1 (>= 1:2.91)'

Subscribers

People subscribed via source and target branches