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

Proposed by Marco Trevisan (Treviño)
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
debian/changelog (+12/-0)
debian/control (+3/-2)
debian/patches/11_copy_skipping_pager.patch (+4/-4)
debian/patches/12_unity_launcher_support.patch (+37/-26)
debian/rules (+1/-0)
To merge this branch: bzr merge lp:~3v1n0/nautilus/ubuntu-unity-launcher-support
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Sebastien Bacher 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.
Revision history for this message
Didier Roche-Tolomelli (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
Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-09-06 07:51:22 +0000
+++ debian/changelog 2011-09-07 11:48:10 +0000
@@ -1,3 +1,15 @@
1nautilus (1:3.1.90-0ubuntu2) oneiric; urgency=low
2
3 * debian/patches/12_unity_launcher_support.patch:
4 - avoid progress division per zero, causing unity bad rendering (LP: #841609)
5 - reset the progress value at the end of the operations
6 - force to update the progress at the beginning of an operation
7 - show the count when there are more than one in-progress operations
8 * debian/rules:
9 - Pass --disable-appindicator to configure flags.
10
11 -- Marco Trevisan (Treviño) <3v1n0@ubuntu.com> Wed, 07 Sep 2011 03:26:09 +0200
12
1nautilus (1:3.1.90-0ubuntu1) oneiric; urgency=low13nautilus (1:3.1.90-0ubuntu1) oneiric; urgency=low
214
3 * New upstream version15 * New upstream version
416
=== modified file 'debian/control'
--- debian/control 2011-07-25 15:10:11 +0000
+++ debian/control 2011-09-07 11:48:10 +0000
@@ -36,10 +36,11 @@
36 libglib2.0-doc,36 libglib2.0-doc,
37 libgtk-3-doc,37 libgtk-3-doc,
38 liblaunchpad-integration-3.0-dev,38 liblaunchpad-integration-3.0-dev,
39 libappindicator3-dev,39 libappindicator3-dev (>> 0.3.91),
40 libunity-dev (>= 4.0.0)
40Homepage: http://www.gnome.org/projects/nautilus/41Homepage: http://www.gnome.org/projects/nautilus/
41Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/nautilus/ubuntu42Vcs-Bzr: https://code.launchpad.net/~ubuntu-desktop/nautilus/ubuntu
42Standards-Version: 3.9.043Standards-Version: 3.9.2
4344
44Package: nautilus45Package: nautilus
45Architecture: any46Architecture: any
4647
=== modified file 'debian/patches/11_copy_skipping_pager.patch'
--- debian/patches/11_copy_skipping_pager.patch 2011-07-18 09:28:13 +0000
+++ debian/patches/11_copy_skipping_pager.patch 2011-09-07 11:48:10 +0000
@@ -1,8 +1,8 @@
1Index: nautilus-3.1.3/src/nautilus-progress-ui-handler.c1Index: nautilus/src/nautilus-progress-ui-handler.c
2===================================================================2===================================================================
3--- nautilus-3.1.3.orig/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:03.139187027 +02003--- nautilus.orig/src/nautilus-progress-ui-handler.c 2011-08-06 04:45:23.332026621 +0200
4+++ nautilus-3.1.3/src/nautilus-progress-ui-handler.c 2011-07-18 11:16:58.303460573 +02004+++ nautilus/src/nautilus-progress-ui-handler.c 2011-08-06 04:46:02.201537962 +0200
5@@ -217,6 +217,8 @@5@@ -305,6 +305,8 @@
6 GTK_WIN_POS_CENTER);6 GTK_WIN_POS_CENTER);
7 gtk_window_set_icon_name (GTK_WINDOW (progress_window),7 gtk_window_set_icon_name (GTK_WINDOW (progress_window),
8 "system-file-manager");8 "system-file-manager");
99
=== modified file 'debian/patches/12_unity_launcher_support.patch'
--- debian/patches/12_unity_launcher_support.patch 2011-08-12 19:16:13 +0000
+++ debian/patches/12_unity_launcher_support.patch 2011-09-07 11:48:10 +0000
@@ -1,6 +1,8 @@
1=== modified file 'configure.in'1=== modified file 'configure.in'
2--- old/configure.in 2011-08-12 19:02:32 +00002Index: unity-launcher-support/configure.in
3+++ new/configure.in 2011-08-12 19:02:37 +00003===================================================================
4--- unity-launcher-support.orig/configure.in 2011-09-07 03:23:59.413084000 +0200
5+++ unity-launcher-support/configure.in 2011-09-07 03:23:59.413084000 +0200
4@@ -10,6 +10,8 @@6@@ -10,6 +10,8 @@
5 m4_define(exif_minver, 0.6.20)7 m4_define(exif_minver, 0.6.20)
6 m4_define(exempi_minver, 2.1.0)8 m4_define(exempi_minver, 2.1.0)
@@ -56,10 +58,10 @@
56 nautilus-sendto ext: $enable_nst_extension58 nautilus-sendto ext: $enable_nst_extension
57 59
58 profiling support: ${profiling_support}60 profiling support: ${profiling_support}
5961Index: unity-launcher-support/libnautilus-private/nautilus-progress-info.c
60=== modified file 'libnautilus-private/nautilus-progress-info.c'62===================================================================
61--- old/libnautilus-private/nautilus-progress-info.c 2011-08-12 19:00:28 +000063--- unity-launcher-support.orig/libnautilus-private/nautilus-progress-info.c 2011-09-07 03:23:59.413084000 +0200
62+++ new/libnautilus-private/nautilus-progress-info.c 2011-08-12 19:02:37 +000064+++ unity-launcher-support/libnautilus-private/nautilus-progress-info.c 2011-09-07 03:22:52.161623000 +0200
63@@ -52,6 +52,8 @@65@@ -52,6 +52,8 @@
64 char *status;66 char *status;
65 char *details;67 char *details;
@@ -121,10 +123,10 @@
121 info->progress_at_idle = TRUE;123 info->progress_at_idle = TRUE;
122 queue_idle (info, FALSE);124 queue_idle (info, FALSE);
123 }125 }
124126Index: unity-launcher-support/libnautilus-private/nautilus-progress-info.h
125=== modified file 'libnautilus-private/nautilus-progress-info.h'127===================================================================
126--- old/libnautilus-private/nautilus-progress-info.h 2011-08-12 19:00:28 +0000128--- unity-launcher-support.orig/libnautilus-private/nautilus-progress-info.h 2011-09-07 03:23:59.413084000 +0200
127+++ new/libnautilus-private/nautilus-progress-info.h 2011-08-12 19:02:37 +0000129+++ unity-launcher-support/libnautilus-private/nautilus-progress-info.h 2011-09-07 03:22:52.161623000 +0200
128@@ -62,6 +62,8 @@130@@ -62,6 +62,8 @@
129 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);131 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);
130 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);132 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);
@@ -134,10 +136,10 @@
134 136
135 void nautilus_progress_info_start (NautilusProgressInfo *info);137 void nautilus_progress_info_start (NautilusProgressInfo *info);
136 void nautilus_progress_info_finish (NautilusProgressInfo *info);138 void nautilus_progress_info_finish (NautilusProgressInfo *info);
137139Index: unity-launcher-support/src/Makefile.am
138=== modified file 'src/Makefile.am'140===================================================================
139--- old/src/Makefile.am 2011-08-12 19:02:32 +0000141--- unity-launcher-support.orig/src/Makefile.am 2011-09-07 03:23:59.413084000 +0200
140+++ new/src/Makefile.am 2011-08-12 19:02:37 +0000142+++ unity-launcher-support/src/Makefile.am 2011-09-07 03:23:59.413084000 +0200
141@@ -31,6 +31,7 @@143@@ -31,6 +31,7 @@
142 -DVERSION="\"$(VERSION)\"" \144 -DVERSION="\"$(VERSION)\"" \
143 $(DISABLE_DEPRECATED_CFLAGS) \145 $(DISABLE_DEPRECATED_CFLAGS) \
@@ -154,10 +156,10 @@
154 $(NULL)156 $(NULL)
155 157
156 nautilus_SOURCES = \158 nautilus_SOURCES = \
157159Index: unity-launcher-support/src/nautilus-progress-ui-handler.c
158=== modified file 'src/nautilus-progress-ui-handler.c'160===================================================================
159--- old/src/nautilus-progress-ui-handler.c 2011-08-12 19:02:32 +0000161--- unity-launcher-support.orig/src/nautilus-progress-ui-handler.c 2011-09-07 03:23:59.413084000 +0200
160+++ new/src/nautilus-progress-ui-handler.c 2011-08-12 19:04:17 +0000162+++ unity-launcher-support/src/nautilus-progress-ui-handler.c 2011-09-07 03:47:59.761254961 +0200
161@@ -41,6 +41,10 @@163@@ -41,6 +41,10 @@
162 #include <libappindicator/app-indicator.h>164 #include <libappindicator/app-indicator.h>
163 #endif165 #endif
@@ -179,7 +181,7 @@
179 };181 };
180 182
181 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);183 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);
182@@ -259,6 +266,246 @@184@@ -259,6 +266,256 @@
183 g_free (tooltip);185 g_free (tooltip);
184 }186 }
185 187
@@ -194,8 +196,7 @@
194+ g_return_if_fail (self->priv->manager);196+ g_return_if_fail (self->priv->manager);
195+197+
196+ GList *infos, *l;198+ GList *infos, *l;
197+ double progress;199+ double progress = 0;
198+ size_t info_n = 0;
199+ double c, current = 0;200+ double c, current = 0;
200+ double t, total = 0;201+ double t, total = 0;
201+202+
@@ -211,10 +212,11 @@
211+212+
212+ total += t;213+ total += t;
213+ current += c;214+ current += c;
214+ info_n++;
215+ }215+ }
216+216+
217+ progress = current / total;217+ if (current >= 0 && total > 0)
218+ progress = current / total;
219+
218+ if (progress > 1.0)220+ if (progress > 1.0)
219+ progress = 1.0;221+ progress = 1.0;
220+222+
@@ -379,8 +381,18 @@
379+ if (self->priv->active_infos > 0) {381+ if (self->priv->active_infos > 0) {
380+ unity_launcher_entry_set_progress_visible (entry, TRUE);382+ unity_launcher_entry_set_progress_visible (entry, TRUE);
381+ progress_ui_handler_show_unity_quicklist (self, entry, TRUE);383+ progress_ui_handler_show_unity_quicklist (self, entry, TRUE);
384+ progress_ui_handler_unity_progress_changed (NULL, self);
385+
386+ if (self->priv->active_infos > 1) {
387+ unity_launcher_entry_set_count (entry, self->priv->active_infos);
388+ unity_launcher_entry_set_count_visible (entry, TRUE);
389+ } else {
390+ unity_launcher_entry_set_count_visible (entry, FALSE);
391+ }
382+ } else {392+ } else {
383+ unity_launcher_entry_set_progress_visible (entry, FALSE);393+ unity_launcher_entry_set_progress_visible (entry, FALSE);
394+ unity_launcher_entry_set_progress (entry, 0.0);
395+ unity_launcher_entry_set_count_visible (entry, FALSE);
384+ progress_ui_handler_show_unity_quicklist (self, entry, FALSE);396+ progress_ui_handler_show_unity_quicklist (self, entry, FALSE);
385+ GCancellable *pc = nautilus_progress_info_get_cancellable (info);397+ GCancellable *pc = nautilus_progress_info_get_cancellable (info);
386+398+
@@ -426,7 +438,7 @@
426 static gboolean438 static gboolean
427 progress_window_delete_event (GtkWidget *widget,439 progress_window_delete_event (GtkWidget *widget,
428 GdkEvent *event,440 GdkEvent *event,
429@@ -403,6 +650,10 @@441@@ -403,6 +660,10 @@
430 progress_ui_handler_show_complete_notification (self);442 progress_ui_handler_show_complete_notification (self);
431 }443 }
432 }444 }
@@ -437,7 +449,7 @@
437 }449 }
438 450
439 static void451 static void
440@@ -425,6 +676,10 @@452@@ -425,6 +686,10 @@
441 progress_ui_handler_update_notification_or_status (self);453 progress_ui_handler_update_notification_or_status (self);
442 }454 }
443 }455 }
@@ -448,4 +460,3 @@
448 }460 }
449 461
450 typedef struct {462 typedef struct {
451
452463
=== modified file 'debian/rules'
--- debian/rules 2011-08-26 14:09:23 +0000
+++ debian/rules 2011-09-07 11:48:10 +0000
@@ -12,6 +12,7 @@
12DEB_CONFIGURE_EXTRA_FLAGS += --libexecdir=/usr/lib/nautilus \12DEB_CONFIGURE_EXTRA_FLAGS += --libexecdir=/usr/lib/nautilus \
13 --disable-update-mimedb \13 --disable-update-mimedb \
14 --disable-packagekit \14 --disable-packagekit \
15 --disable-appindicator \
15 --enable-introspection16 --enable-introspection
16LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed17LDFLAGS += -Wl,-z,defs -Wl,-O1 -Wl,--as-needed
17DEB_DH_MAKESHLIBS_ARGS_libnautilus-extension1 += -V 'libnautilus-extension1 (>= 1:2.91)'18DEB_DH_MAKESHLIBS_ARGS_libnautilus-extension1 += -V 'libnautilus-extension1 (>= 1:2.91)'

Subscribers

People subscribed via source and target branches

to all changes: