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

Proposed by Marco Trevisan (Treviño)
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 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
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-03-08 15:56:13 +0000
3+++ debian/changelog 2013-03-12 14:59:21 +0000
4@@ -1,3 +1,11 @@
5+nautilus (1:3.6.3-0ubuntu9) UNRELEASED; urgency=low
6+
7+ * debian/patches/12_unity_launcher_support.patch:
8+ - Quicklist entries to show the copy dialog should use a separator (lp: #1154109)
9+ - Transfer dialog should be presented using the correct timestamp (lp: #1154111)
10+
11+ -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 12 Mar 2013 15:31:21 +0100
12+
13 nautilus (1:3.6.3-0ubuntu8) raring; urgency=low
14
15 * debian/control.in:
16
17=== modified file 'debian/patches/12_unity_launcher_support.patch'
18--- debian/patches/12_unity_launcher_support.patch 2012-10-31 07:02:17 +0000
19+++ debian/patches/12_unity_launcher_support.patch 2013-03-12 14:59:21 +0000
20@@ -1,8 +1,8 @@
21 === modified file 'configure.in'
22-Index: nautilus-3.6.2/configure.in
23+Index: nautilus/configure.in
24 ===================================================================
25---- nautilus-3.6.2.orig/configure.in 2012-10-31 02:33:43.228876867 -0400
26-+++ nautilus-3.6.2/configure.in 2012-10-31 02:34:01.976876084 -0400
27+--- nautilus.orig/configure.in 2013-03-12 13:29:48.958239697 +0100
28++++ nautilus/configure.in 2013-03-12 13:29:48.950239703 +0100
29 @@ -10,6 +10,8 @@
30 m4_define(exif_minver, 0.6.20)
31 m4_define(exempi_minver, 2.1.0)
32@@ -50,10 +50,10 @@
33 nautilus-sendto ext: $enable_nst_extension
34 Tracker support: $enable_tracker
35
36-Index: nautilus-3.6.2/libnautilus-private/nautilus-progress-info.c
37+Index: nautilus/libnautilus-private/nautilus-progress-info.c
38 ===================================================================
39---- nautilus-3.6.2.orig/libnautilus-private/nautilus-progress-info.c 2012-10-31 02:33:43.228876867 -0400
40-+++ nautilus-3.6.2/libnautilus-private/nautilus-progress-info.c 2012-10-31 02:34:01.976876084 -0400
41+--- nautilus.orig/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.958239697 +0100
42++++ nautilus/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.950239703 +0100
43 @@ -52,6 +52,8 @@
44 char *status;
45 char *details;
46@@ -115,10 +115,10 @@
47 info->progress_at_idle = TRUE;
48 queue_idle (info, FALSE);
49 }
50-Index: nautilus-3.6.2/libnautilus-private/nautilus-progress-info.h
51+Index: nautilus/libnautilus-private/nautilus-progress-info.h
52 ===================================================================
53---- nautilus-3.6.2.orig/libnautilus-private/nautilus-progress-info.h 2012-10-31 02:33:43.228876867 -0400
54-+++ nautilus-3.6.2/libnautilus-private/nautilus-progress-info.h 2012-10-31 02:34:01.980876084 -0400
55+--- nautilus.orig/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.958239697 +0100
56++++ nautilus/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.950239703 +0100
57 @@ -62,6 +62,8 @@
58 gboolean nautilus_progress_info_get_is_started (NautilusProgressInfo *info);
59 gboolean nautilus_progress_info_get_is_finished (NautilusProgressInfo *info);
60@@ -128,10 +128,10 @@
61
62 void nautilus_progress_info_start (NautilusProgressInfo *info);
63 void nautilus_progress_info_finish (NautilusProgressInfo *info);
64-Index: nautilus-3.6.2/src/Makefile.am
65+Index: nautilus/src/Makefile.am
66 ===================================================================
67---- nautilus-3.6.2.orig/src/Makefile.am 2012-10-31 02:33:43.228876867 -0400
68-+++ nautilus-3.6.2/src/Makefile.am 2012-10-31 02:34:01.980876084 -0400
69+--- nautilus.orig/src/Makefile.am 2013-03-12 13:29:48.958239697 +0100
70++++ nautilus/src/Makefile.am 2013-03-12 13:29:48.950239703 +0100
71 @@ -31,6 +31,7 @@
72 -DSYSCONFDIR=\""$(sysconfdir)"\" \
73 -DVERSION="\"$(VERSION)\"" \
74@@ -159,10 +159,10 @@
75 $(NULL)
76
77 nodist_nautilus_SOURCES = \
78-Index: nautilus-3.6.2/src/nautilus-progress-ui-handler.c
79+Index: nautilus/src/nautilus-progress-ui-handler.c
80 ===================================================================
81---- nautilus-3.6.2.orig/src/nautilus-progress-ui-handler.c 2012-10-31 02:33:43.228876867 -0400
82-+++ nautilus-3.6.2/src/nautilus-progress-ui-handler.c 2012-10-31 02:34:01.980876084 -0400
83+--- nautilus.orig/src/nautilus-progress-ui-handler.c 2013-03-12 13:29:48.958239697 +0100
84++++ nautilus/src/nautilus-progress-ui-handler.c 2013-03-12 15:25:31.435572751 +0100
85 @@ -38,6 +38,11 @@
86
87 #include <libnotify/notify.h>
88@@ -185,7 +185,7 @@
89 };
90
91 G_DEFINE_TYPE (NautilusProgressUIHandler, nautilus_progress_ui_handler, G_TYPE_OBJECT);
92-@@ -181,6 +189,208 @@
93+@@ -181,6 +189,221 @@
94 gtk_status_icon_set_visible (self->priv->status_icon, TRUE);
95 }
96
97@@ -246,12 +246,7 @@
98 +{
99 + g_return_if_fail (self);
100 +
101-+ if (!gtk_widget_get_visible (self->priv->progress_window)) {
102-+ gtk_window_present (GTK_WINDOW (self->priv->progress_window));
103-+ } else {
104-+ gtk_window_set_keep_above (GTK_WINDOW (self->priv->progress_window), TRUE);
105-+ gtk_window_set_keep_above (GTK_WINDOW (self->priv->progress_window), FALSE);
106-+ }
107++ gtk_window_present_with_time (GTK_WINDOW (self->priv->progress_window), timestamp);
108 +}
109 +
110 +static void
111@@ -279,28 +274,46 @@
112 +
113 + for (l = unity_quicklist_get_launcher_entries (self->priv->unity_quicklist_handler); l; l = l->next) {
114 + UnityLauncherEntry *entry = l->data;
115-+
116-+ DbusmenuMenuitem *quickmenu = dbusmenu_menuitem_new ();
117++ DbusmenuMenuitem *ql = unity_launcher_entry_get_quicklist (entry);
118++ DbusmenuMenuitem *quickmenu;
119++
120++ if (ql) {
121++ quickmenu = dbusmenu_menuitem_new ();
122++ dbusmenu_menuitem_property_set (quickmenu,
123++ DBUSMENU_MENUITEM_PROP_TYPE,
124++ DBUSMENU_CLIENT_TYPES_SEPARATOR);
125++ dbusmenu_menuitem_property_set_bool (quickmenu,
126++ DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
127++ dbusmenu_menuitem_property_set_bool (quickmenu,
128++ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
129++ unity_quicklist_handler_append_menuitem (entry, quickmenu);
130++ }
131++
132++ quickmenu = dbusmenu_menuitem_new ();
133 + dbusmenu_menuitem_property_set (quickmenu,
134 + DBUSMENU_MENUITEM_PROP_LABEL,
135-+ UNITY_QUICKLIST_SHOW_COPY_DIALOG);
136++ UNITY_QUICKLIST_SHOW_COPY_DIALOG);
137 + dbusmenu_menuitem_property_set_bool (quickmenu,
138 + DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
139++ dbusmenu_menuitem_property_set_bool (quickmenu,
140++ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
141 + unity_quicklist_handler_append_menuitem (entry, quickmenu);
142 + g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
143 + (GCallback) progress_ui_handler_unity_quicklist_show_activated,
144-+ self);
145++ self);
146 +
147 + quickmenu = dbusmenu_menuitem_new ();
148 + dbusmenu_menuitem_property_set (quickmenu,
149-+ DBUSMENU_MENUITEM_PROP_LABEL,
150-+ UNITY_QUICKLIST_CANCEL_COPY);
151++ DBUSMENU_MENUITEM_PROP_LABEL,
152++ UNITY_QUICKLIST_CANCEL_COPY);
153 + dbusmenu_menuitem_property_set_bool (quickmenu,
154 + DBUSMENU_MENUITEM_PROP_VISIBLE, FALSE);
155++ dbusmenu_menuitem_property_set_bool (quickmenu,
156++ UNITY_QUICKLIST_PROGRESS_ITEM, TRUE);
157 + unity_quicklist_handler_append_menuitem (entry, quickmenu);
158 + g_signal_connect (quickmenu, DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
159 + (GCallback) progress_ui_handler_unity_quicklist_cancel_activated,
160-+ self);
161++ self);
162 + }
163 +}
164 +
165@@ -394,7 +407,7 @@
166 static gboolean
167 progress_window_delete_event (GtkWidget *widget,
168 GdkEvent *event,
169-@@ -313,6 +523,10 @@
170+@@ -313,6 +536,10 @@
171 progress_ui_handler_show_complete_notification (self);
172 }
173 }
174@@ -405,7 +418,7 @@
175 }
176
177 static void
178-@@ -335,6 +549,10 @@
179+@@ -335,6 +562,10 @@
180 progress_ui_handler_update_notification_or_status (self);
181 }
182 }
183@@ -416,11 +429,11 @@
184 }
185
186 typedef struct {
187-Index: nautilus-3.6.2/src/unity-quicklist-handler.c
188+Index: nautilus/src/unity-quicklist-handler.c
189 ===================================================================
190 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
191-+++ nautilus-3.6.2/src/unity-quicklist-handler.c 2012-10-31 02:34:01.980876084 -0400
192-@@ -0,0 +1,156 @@
193++++ nautilus/src/unity-quicklist-handler.c 2013-03-12 14:07:43.835192621 +0100
194+@@ -0,0 +1,153 @@
195 +/*unity-quicklist-handler.c: handle Unity quicklists
196 + *
197 + * Copyright (C) 2012 Canonical
198@@ -466,10 +479,7 @@
199 +unity_quicklist_handler_menuitem_is_progress_item (DbusmenuMenuitem *ql)
200 +{
201 + g_return_val_if_fail(ql, FALSE);
202-+ const gchar *label = dbusmenu_menuitem_property_get (ql, DBUSMENU_MENUITEM_PROP_LABEL);
203-+
204-+ return ((g_strcmp0 (label, (const gchar*)UNITY_QUICKLIST_SHOW_COPY_DIALOG) == 0) ||
205-+ (g_strcmp0 (label, (const gchar*)UNITY_QUICKLIST_CANCEL_COPY) == 0));
206++ return dbusmenu_menuitem_property_get_bool (ql, UNITY_QUICKLIST_PROGRESS_ITEM);
207 +}
208 +
209 +gboolean
210@@ -577,11 +587,11 @@
211 + return g_object_new (UNITY_TYPE_QUICKLIST_HANDLER, NULL);
212 +}
213 +
214-Index: nautilus-3.6.2/src/unity-quicklist-handler.h
215+Index: nautilus/src/unity-quicklist-handler.h
216 ===================================================================
217 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
218-+++ nautilus-3.6.2/src/unity-quicklist-handler.h 2012-10-31 02:34:01.980876084 -0400
219-@@ -0,0 +1,73 @@
220++++ nautilus/src/unity-quicklist-handler.h 2013-03-12 14:07:14.835176946 +0100
221+@@ -0,0 +1,75 @@
222 +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
223 +/*
224 + * unity-quicklist.h: handle unity quicklists.
225@@ -630,6 +640,8 @@
226 +
227 +typedef struct _UnityQuicklistHandlerPriv UnityQuicklistHandlerPriv;
228 +
229++#define UNITY_QUICKLIST_PROGRESS_ITEM "unity-quicklist-progress-item"
230++
231 +typedef struct {
232 + GObject parent;
233 +
234@@ -655,10 +667,10 @@
235 +#define UNITY_QUICKLIST_CANCEL_COPY _("Cancel All In-progress Actions")
236 +
237 +#endif /* __UNITY_QUICKLIST_HANDLER_H__ */
238-Index: nautilus-3.6.2/src/nautilus-application.c
239+Index: nautilus/src/nautilus-application.c
240 ===================================================================
241---- nautilus-3.6.2.orig/src/nautilus-application.c 2012-10-31 02:33:43.228876867 -0400
242-+++ nautilus-3.6.2/src/nautilus-application.c 2012-10-31 02:34:01.980876084 -0400
243+--- nautilus.orig/src/nautilus-application.c 2013-03-12 13:29:48.958239697 +0100
244++++ nautilus/src/nautilus-application.c 2013-03-12 13:29:48.954239700 +0100
245 @@ -79,6 +79,10 @@
246 #include <gdk/gdkx.h>
247 #include <gtk/gtk.h>
248@@ -681,10 +693,10 @@
249 }
250
251 static void
252-Index: nautilus-3.6.2/src/unity-bookmarks-handler.c
253+Index: nautilus/src/unity-bookmarks-handler.c
254 ===================================================================
255 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
256-+++ nautilus-3.6.2/src/unity-bookmarks-handler.c 2012-10-31 02:34:01.980876084 -0400
257++++ nautilus/src/unity-bookmarks-handler.c 2013-03-12 13:29:48.954239700 +0100
258 @@ -0,0 +1,137 @@
259 +/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist
260 + *
261@@ -823,10 +835,10 @@
262 + G_CALLBACK (unity_bookmarks_handler_refresh_bookmarks), 0);
263 +}
264 +
265-Index: nautilus-3.6.2/src/unity-bookmarks-handler.h
266+Index: nautilus/src/unity-bookmarks-handler.h
267 ===================================================================
268 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
269-+++ nautilus-3.6.2/src/unity-bookmarks-handler.h 2012-10-31 02:34:01.980876084 -0400
270++++ nautilus/src/unity-bookmarks-handler.h 2013-03-12 13:29:48.954239700 +0100
271 @@ -0,0 +1,31 @@
272 +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
273 +/*
274@@ -859,10 +871,10 @@
275 +void unity_bookmarks_handler_initialize (void);
276 +
277 +#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/
278-Index: nautilus-3.6.2/po/POTFILES.in
279+Index: nautilus/po/POTFILES.in
280 ===================================================================
281---- nautilus-3.6.2.orig/po/POTFILES.in 2012-10-31 02:33:43.228876867 -0400
282-+++ nautilus-3.6.2/po/POTFILES.in 2012-10-31 02:34:01.980876084 -0400
283+--- nautilus.orig/po/POTFILES.in 2013-03-12 13:29:48.958239697 +0100
284++++ nautilus/po/POTFILES.in 2013-03-12 13:29:48.954239700 +0100
285 @@ -90,3 +90,4 @@
286 src/nautilus-window-private.h
287 src/nautilus-window-slot.c

Subscribers

People subscribed via source and target branches

to all changes: