Merge lp:~3v1n0/nautilus/progress-quicklist-improvements into lp:~ubuntu-desktop/nautilus/ubuntu

Proposed by Marco Trevisan (Treviño) on 2013-03-12
Status: Merged
Merged at revision: 361
Proposed branch: lp:~3v1n0/nautilus/progress-quicklist-improvements
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Diff against target: 287 lines (+71/-51)
2 files modified
debian/changelog (+8/-0)
debian/patches/12_unity_launcher_support.patch (+63/-51)
To merge this branch: bzr merge lp:~3v1n0/nautilus/progress-quicklist-improvements
Reviewer Review Type Date Requested Status
Ubuntu Desktop 2013-03-12 Pending
Review via email: mp+152930@code.launchpad.net

Commit message

* debian/patches/12_unity_launcher_support.patch:
    - Quicklist entries to show the copy dialog should use a separator (lp: #1154109)
    - Transfer dialog should be presented using the correct timestamp (lp: #1154111)

Description of the change

Cleaned a little the progress quicklist code that now use a bool property for setting their type.
Also, removed the hack we used to focus the progress dialog, now we use the proper timestamp passed by unity to present it.
Also, the progress dialog quicklists are now separated if needed.

Activation fixes need lp:~3v1n0/unity/quicklist-activate-timestamp/+merge/152917 to work properly.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-03-08 15:56:13 +0000
+++ debian/changelog 2013-03-12 14:59:21 +0000
@@ -1,3 +1,11 @@
1nautilus (1:3.6.3-0ubuntu9) UNRELEASED; urgency=low
2
3 * debian/patches/12_unity_launcher_support.patch:
4 - Quicklist entries to show the copy dialog should use a separator (lp: #1154109)
5 - Transfer dialog should be presented using the correct timestamp (lp: #1154111)
6
7 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 12 Mar 2013 15:31:21 +0100
8
1nautilus (1:3.6.3-0ubuntu8) raring; urgency=low9nautilus (1:3.6.3-0ubuntu8) raring; urgency=low
210
3 * debian/control.in:11 * debian/control.in:
412
=== modified file 'debian/patches/12_unity_launcher_support.patch'
--- debian/patches/12_unity_launcher_support.patch 2012-10-31 07:02:17 +0000
+++ debian/patches/12_unity_launcher_support.patch 2013-03-12 14:59:21 +0000
@@ -1,8 +1,8 @@
1=== modified file 'configure.in'1=== modified file 'configure.in'
2Index: nautilus-3.6.2/configure.in2Index: nautilus/configure.in
3===================================================================3===================================================================
4--- nautilus-3.6.2.orig/configure.in 2012-10-31 02:33:43.228876867 -04004--- nautilus.orig/configure.in 2013-03-12 13:29:48.958239697 +0100
5+++ nautilus-3.6.2/configure.in 2012-10-31 02:34:01.976876084 -04005+++ nautilus/configure.in 2013-03-12 13:29:48.950239703 +0100
6@@ -10,6 +10,8 @@6@@ -10,6 +10,8 @@
7 m4_define(exif_minver, 0.6.20)7 m4_define(exif_minver, 0.6.20)
8 m4_define(exempi_minver, 2.1.0)8 m4_define(exempi_minver, 2.1.0)
@@ -50,10 +50,10 @@
50 nautilus-sendto ext: $enable_nst_extension50 nautilus-sendto ext: $enable_nst_extension
51 Tracker support: $enable_tracker51 Tracker support: $enable_tracker
52 52
53Index: nautilus-3.6.2/libnautilus-private/nautilus-progress-info.c53Index: nautilus/libnautilus-private/nautilus-progress-info.c
54===================================================================54===================================================================
55--- nautilus-3.6.2.orig/libnautilus-private/nautilus-progress-info.c 2012-10-31 02:33:43.228876867 -040055--- nautilus.orig/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.958239697 +0100
56+++ nautilus-3.6.2/libnautilus-private/nautilus-progress-info.c 2012-10-31 02:34:01.976876084 -040056+++ nautilus/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.950239703 +0100
57@@ -52,6 +52,8 @@57@@ -52,6 +52,8 @@
58 char *status;58 char *status;
59 char *details;59 char *details;
@@ -115,10 +115,10 @@
115 info->progress_at_idle = TRUE;115 info->progress_at_idle = TRUE;
116 queue_idle (info, FALSE);116 queue_idle (info, FALSE);
117 }117 }
118Index: nautilus-3.6.2/libnautilus-private/nautilus-progress-info.h118Index: nautilus/libnautilus-private/nautilus-progress-info.h
119===================================================================119===================================================================
120--- nautilus-3.6.2.orig/libnautilus-private/nautilus-progress-info.h 2012-10-31 02:33:43.228876867 -0400120--- nautilus.orig/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.958239697 +0100
121+++ nautilus-3.6.2/libnautilus-private/nautilus-progress-info.h 2012-10-31 02:34:01.980876084 -0400121+++ nautilus/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.950239703 +0100
122@@ -62,6 +62,8 @@122@@ -62,6 +62,8 @@
123 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);123 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);
124 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);124 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);
@@ -128,10 +128,10 @@
128 128
129 void nautilus_progress_info_start (NautilusProgressInfo *info);129 void nautilus_progress_info_start (NautilusProgressInfo *info);
130 void nautilus_progress_info_finish (NautilusProgressInfo *info);130 void nautilus_progress_info_finish (NautilusProgressInfo *info);
131Index: nautilus-3.6.2/src/Makefile.am131Index: nautilus/src/Makefile.am
132===================================================================132===================================================================
133--- nautilus-3.6.2.orig/src/Makefile.am 2012-10-31 02:33:43.228876867 -0400133--- nautilus.orig/src/Makefile.am 2013-03-12 13:29:48.958239697 +0100
134+++ nautilus-3.6.2/src/Makefile.am 2012-10-31 02:34:01.980876084 -0400134+++ nautilus/src/Makefile.am 2013-03-12 13:29:48.950239703 +0100
135@@ -31,6 +31,7 @@135@@ -31,6 +31,7 @@
136 -DSYSCONFDIR=\""$(sysconfdir)"\" \136 -DSYSCONFDIR=\""$(sysconfdir)"\" \
137 -DVERSION="\"$(VERSION)\"" \137 -DVERSION="\"$(VERSION)\"" \
@@ -159,10 +159,10 @@
159 $(NULL)159 $(NULL)
160 160
161 nodist_nautilus_SOURCES = \161 nodist_nautilus_SOURCES = \
162Index: nautilus-3.6.2/src/nautilus-progress-ui-handler.c162Index: nautilus/src/nautilus-progress-ui-handler.c
163===================================================================163===================================================================
164--- nautilus-3.6.2.orig/src/nautilus-progress-ui-handler.c 2012-10-31 02:33:43.228876867 -0400164--- nautilus.orig/src/nautilus-progress-ui-handler.c 2013-03-12 13:29:48.958239697 +0100
165+++ nautilus-3.6.2/src/nautilus-progress-ui-handler.c 2012-10-31 02:34:01.980876084 -0400165+++ nautilus/src/nautilus-progress-ui-handler.c 2013-03-12 15:25:31.435572751 +0100
166@@ -38,6 +38,11 @@166@@ -38,6 +38,11 @@
167 167
168 #include <libnotify/notify.h>168 #include <libnotify/notify.h>
@@ -185,7 +185,7 @@
185 };185 };
186 186
187 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);187 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);
188@@ -181,6 +189,208 @@188@@ -181,6 +189,221 @@
189 gtk_status_icon_set_visible (self->priv->status_icon, TRUE);189 gtk_status_icon_set_visible (self->priv->status_icon, TRUE);
190 }190 }
191 191
@@ -246,12 +246,7 @@
246+{246+{
247+ g_return_if_fail (self);247+ g_return_if_fail (self);
248+248+
249+ if (!gtk_widget_get_visible (self->priv->progress_window)) {249+ gtk_window_present_with_time (GTK_WINDOW (self->priv->progress_window), timestamp);
250+ gtk_window_present (GTK_WINDOW (self->priv->progress_window));
251+ } else {
252+ gtk_window_set_keep_above (GTK_WINDOW (self->priv->progress_window), TRUE);
253+ gtk_window_set_keep_above (GTK_WINDOW (self->priv->progress_window), FALSE);
254+ }
255+}250+}
256+251+
257+static void252+static void
@@ -279,28 +274,46 @@
279+274+
280+ for (l = unity_quicklist_get_launcher_entries (self->priv->unity_quicklist_handler); l; l = l->next) {275+ for (l = unity_quicklist_get_launcher_entries (self->priv->unity_quicklist_handler); l; l = l->next) {
281+ UnityLauncherEntry *entry = l->data;276+ UnityLauncherEntry *entry = l->data;
282+277+ DbusmenuMenuitem *ql = unity_launcher_entry_get_quicklist (entry);
283+ DbusmenuMenuitem *quickmenu = dbusmenu_menuitem_new ();278+ DbusmenuMenuitem *quickmenu;
279+
280+ if (ql) {
281+ quickmenu = dbusmenu_menuitem_new ();
282+ dbusmenu_menuitem_property_set (quickmenu,
283+ DBUSMENU_MENUITEM_PROP_TYPE,
284+ DBUSMENU_CLIENT_TYPES_SEPARATOR);
285+ dbusmenu_menuitem_property_set_bool (quickmenu,
286+ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
287+ dbusmenu_menuitem_property_set_bool (quickmenu,
288+ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
289+ unity_quicklist_handler_append_menuitem (entry, quickmenu);
290+ }
291+
292+ quickmenu = dbusmenu_menuitem_new ();
284+ dbusmenu_menuitem_property_set (quickmenu,293+ dbusmenu_menuitem_property_set (quickmenu,
285+ DBUSMENU_MENUITEM_PROP_LABEL,294+ DBUSMENU_MENUITEM_PROP_LABEL,
286+ UNITY_QUICKLIST_SHOW_COPY_DIALOG);295+ UNITY_QUICKLIST_SHOW_COPY_DIALOG);
287+ dbusmenu_menuitem_property_set_bool (quickmenu,296+ dbusmenu_menuitem_property_set_bool (quickmenu,
288+ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);297+ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
298+ dbusmenu_menuitem_property_set_bool (quickmenu,
299+ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
289+ unity_quicklist_handler_append_menuitem (entry, quickmenu);300+ unity_quicklist_handler_append_menuitem (entry, quickmenu);
290+ g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,301+ g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
291+ (GCallback) progress_ui_handler_unity_quicklist_show_activated,302+ (GCallback) progress_ui_handler_unity_quicklist_show_activated,
292+ self);303+ self);
293+304+
294+ quickmenu = dbusmenu_menuitem_new ();305+ quickmenu = dbusmenu_menuitem_new ();
295+ dbusmenu_menuitem_property_set (quickmenu,306+ dbusmenu_menuitem_property_set (quickmenu,
296+ DBUSMENU_MENUITEM_PROP_LABEL,307+ DBUSMENU_MENUITEM_PROP_LABEL,
297+ UNITY_QUICKLIST_CANCEL_COPY);308+ UNITY_QUICKLIST_CANCEL_COPY);
298+ dbusmenu_menuitem_property_set_bool (quickmenu,309+ dbusmenu_menuitem_property_set_bool (quickmenu,
299+ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);310+ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
311+ dbusmenu_menuitem_property_set_bool (quickmenu,
312+ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
300+ unity_quicklist_handler_append_menuitem (entry, quickmenu);313+ unity_quicklist_handler_append_menuitem (entry, quickmenu);
301+ g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,314+ g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
302+ (GCallback) progress_ui_handler_unity_quicklist_cancel_activated,315+ (GCallback) progress_ui_handler_unity_quicklist_cancel_activated,
303+ self);316+ self);
304+ }317+ }
305+}318+}
306+319+
@@ -394,7 +407,7 @@
394 static gboolean407 static gboolean
395 progress_window_delete_event (GtkWidget *widget,408 progress_window_delete_event (GtkWidget *widget,
396 GdkEvent *event,409 GdkEvent *event,
397@@ -313,6 +523,10 @@410@@ -313,6 +536,10 @@
398 progress_ui_handler_show_complete_notification (self);411 progress_ui_handler_show_complete_notification (self);
399 }412 }
400 }413 }
@@ -405,7 +418,7 @@
405 }418 }
406 419
407 static void420 static void
408@@ -335,6 +549,10 @@421@@ -335,6 +562,10 @@
409 progress_ui_handler_update_notification_or_status (self);422 progress_ui_handler_update_notification_or_status (self);
410 }423 }
411 }424 }
@@ -416,11 +429,11 @@
416 }429 }
417 430
418 typedef struct {431 typedef struct {
419Index: nautilus-3.6.2/src/unity-quicklist-handler.c432Index: nautilus/src/unity-quicklist-handler.c
420===================================================================433===================================================================
421--- /dev/null 1970-01-01 00:00:00.000000000 +0000434--- /dev/null 1970-01-01 00:00:00.000000000 +0000
422+++ nautilus-3.6.2/src/unity-quicklist-handler.c 2012-10-31 02:34:01.980876084 -0400435+++ nautilus/src/unity-quicklist-handler.c 2013-03-12 14:07:43.835192621 +0100
423@@ -0,0 +1,156 @@436@@ -0,0 +1,153 @@
424+/*unity-quicklist-handler.c: handle Unity quicklists437+/*unity-quicklist-handler.c: handle Unity quicklists
425+ *438+ *
426+ * Copyright (C) 2012 Canonical439+ * Copyright (C) 2012 Canonical
@@ -466,10 +479,7 @@
466+unity_quicklist_handler_menuitem_is_progress_item (DbusmenuMenuitem *ql)479+unity_quicklist_handler_menuitem_is_progress_item (DbusmenuMenuitem *ql)
467+{480+{
468+ g_return_val_if_fail(ql, FALSE);481+ g_return_val_if_fail(ql, FALSE);
469+ const gchar *label = dbusmenu_menuitem_property_get (ql, DBUSMENU_MENUITEM_PROP_LABEL);482+ return dbusmenu_menuitem_property_get_bool (ql, UNITY_QUICKLIST_PROGRESS_ITEM);
470+
471+ return ((g_strcmp0 (label, (const gchar*)UNITY_QUICKLIST_SHOW_COPY_DIALOG) == 0) ||
472+ (g_strcmp0 (label, (const gchar*)UNITY_QUICKLIST_CANCEL_COPY) == 0));
473+}483+}
474+484+
475+gboolean485+gboolean
@@ -577,11 +587,11 @@
577+ return g_object_new (UNITY_TYPE_QUICKLIST_HANDLER, NULL);587+ return g_object_new (UNITY_TYPE_QUICKLIST_HANDLER, NULL);
578+}588+}
579+589+
580Index: nautilus-3.6.2/src/unity-quicklist-handler.h590Index: nautilus/src/unity-quicklist-handler.h
581===================================================================591===================================================================
582--- /dev/null 1970-01-01 00:00:00.000000000 +0000592--- /dev/null 1970-01-01 00:00:00.000000000 +0000
583+++ nautilus-3.6.2/src/unity-quicklist-handler.h 2012-10-31 02:34:01.980876084 -0400593+++ nautilus/src/unity-quicklist-handler.h 2013-03-12 14:07:14.835176946 +0100
584@@ -0,0 +1,73 @@594@@ -0,0 +1,75 @@
585+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */595+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
586+/*596+/*
587+ * unity-quicklist.h: handle unity quicklists.597+ * unity-quicklist.h: handle unity quicklists.
@@ -630,6 +640,8 @@
630+640+
631+typedef struct _UnityQuicklistHandlerPriv UnityQuicklistHandlerPriv;641+typedef struct _UnityQuicklistHandlerPriv UnityQuicklistHandlerPriv;
632+642+
643+#define UNITY_QUICKLIST_PROGRESS_ITEM "unity-quicklist-progress-item"
644+
633+typedef struct {645+typedef struct {
634+ GObject parent;646+ GObject parent;
635+647+
@@ -655,10 +667,10 @@
655+#define UNITY_QUICKLIST_CANCEL_COPY _("Cancel All In-progress Actions")667+#define UNITY_QUICKLIST_CANCEL_COPY _("Cancel All In-progress Actions")
656+668+
657+#endif /* __UNITY_QUICKLIST_HANDLER_H__ */669+#endif /* __UNITY_QUICKLIST_HANDLER_H__ */
658Index: nautilus-3.6.2/src/nautilus-application.c670Index: nautilus/src/nautilus-application.c
659===================================================================671===================================================================
660--- nautilus-3.6.2.orig/src/nautilus-application.c 2012-10-31 02:33:43.228876867 -0400672--- nautilus.orig/src/nautilus-application.c 2013-03-12 13:29:48.958239697 +0100
661+++ nautilus-3.6.2/src/nautilus-application.c 2012-10-31 02:34:01.980876084 -0400673+++ nautilus/src/nautilus-application.c 2013-03-12 13:29:48.954239700 +0100
662@@ -79,6 +79,10 @@674@@ -79,6 +79,10 @@
663 #include <gdk/gdkx.h>675 #include <gdk/gdkx.h>
664 #include <gtk/gtk.h>676 #include <gtk/gtk.h>
@@ -681,10 +693,10 @@
681 }693 }
682 694
683 static void695 static void
684Index: nautilus-3.6.2/src/unity-bookmarks-handler.c696Index: nautilus/src/unity-bookmarks-handler.c
685===================================================================697===================================================================
686--- /dev/null 1970-01-01 00:00:00.000000000 +0000698--- /dev/null 1970-01-01 00:00:00.000000000 +0000
687+++ nautilus-3.6.2/src/unity-bookmarks-handler.c 2012-10-31 02:34:01.980876084 -0400699+++ nautilus/src/unity-bookmarks-handler.c 2013-03-12 13:29:48.954239700 +0100
688@@ -0,0 +1,137 @@700@@ -0,0 +1,137 @@
689+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist701+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist
690+ *702+ *
@@ -823,10 +835,10 @@
823+ G_CALLBACK (unity_bookmarks_handler_refresh_bookmarks), 0);835+ G_CALLBACK (unity_bookmarks_handler_refresh_bookmarks), 0);
824+}836+}
825+837+
826Index: nautilus-3.6.2/src/unity-bookmarks-handler.h838Index: nautilus/src/unity-bookmarks-handler.h
827===================================================================839===================================================================
828--- /dev/null 1970-01-01 00:00:00.000000000 +0000840--- /dev/null 1970-01-01 00:00:00.000000000 +0000
829+++ nautilus-3.6.2/src/unity-bookmarks-handler.h 2012-10-31 02:34:01.980876084 -0400841+++ nautilus/src/unity-bookmarks-handler.h 2013-03-12 13:29:48.954239700 +0100
830@@ -0,0 +1,31 @@842@@ -0,0 +1,31 @@
831+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */843+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
832+/*844+/*
@@ -859,10 +871,10 @@
859+void unity_bookmarks_handler_initialize (void);871+void unity_bookmarks_handler_initialize (void);
860+872+
861+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/873+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/
862Index: nautilus-3.6.2/po/POTFILES.in874Index: nautilus/po/POTFILES.in
863===================================================================875===================================================================
864--- nautilus-3.6.2.orig/po/POTFILES.in 2012-10-31 02:33:43.228876867 -0400876--- nautilus.orig/po/POTFILES.in 2013-03-12 13:29:48.958239697 +0100
865+++ nautilus-3.6.2/po/POTFILES.in 2012-10-31 02:34:01.980876084 -0400877+++ nautilus/po/POTFILES.in 2013-03-12 13:29:48.954239700 +0100
866@@ -90,3 +90,4 @@878@@ -90,3 +90,4 @@
867 src/nautilus-window-private.h879 src/nautilus-window-private.h
868 src/nautilus-window-slot.c880 src/nautilus-window-slot.c

Subscribers

People subscribed via source and target branches

to all changes: