Merge lp:~3v1n0/nautilus/reuse-already-opened-views into lp:~ubuntu-desktop/nautilus/ubuntu

Proposed by Marco Trevisan (Treviño)
Status: Superseded
Proposed branch: lp:~3v1n0/nautilus/reuse-already-opened-views
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Diff against target: 671 lines (+391/-66)
5 files modified
debian/changelog (+15/-0)
debian/patches/10_reuse_already_opened_views.patch (+290/-0)
debian/patches/12_unity_launcher_support.patch (+80/-61)
debian/patches/17_static_unity_quicklist.patch (+5/-5)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~3v1n0/nautilus/reuse-already-opened-views
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+152980@code.launchpad.net

This proposal has been superseded by a proposal from 2013-03-12.

Commit message

* debian/patches/10_reuse_already_opened_views.patch
  - Try to reuse the available windows or tabs when opening an already opened
    location (lp: #692444)
* debian/patches/12_unity_launcher_support.patch:
  - Use the quicklist activation timestamp to set the application user time
      so that the opened windows will be focused (lp: #1154237)
* debian/patches/17_static_unity_quicklist.patch:
  - Use nautilus --new-window to open a New window

Description of the change

- Backported the upstream patches I wrote to fix bug https://bugzilla.gnome.org/show_bug.cgi?id=694034
- Updated the unity launcher support patch to use g_application_open to use the same codepath
- Updated the Exec and the static quicklist to use the --new-window flag

To post a comment you must log in.
363. By Marco Trevisan (Treviño)

* debian/patches/19_add_desktop_keywords.patch:
  - Adding .desktop files keywords from upstream

364. By Marco Trevisan (Treviño)

debian/changelog: added missing entry

365. By Marco Trevisan (Treviño)

debian/patches/10_reuse_already_opened_views.patch: added DEP-3 headers

Unmerged revisions

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 18:30:31 +0000
@@ -1,3 +1,18 @@
1nautilus (1:3.6.3-0ubuntu9) UNRELEASED; urgency=low
2
3 * debian/patches/10_reuse_already_opened_views.patch
4 - Try to reuse the available windows or tabs when opening an already opened
5 location (lp: #692444)
6 * debian/patches/12_unity_launcher_support.patch:
7 - Quicklist entries to show the copy dialog should use a separator (lp: #1154109)
8 - Transfer dialog should be presented using the correct timestamp (lp: #1154111)
9 - Use the quicklist activation timestamp to set the application user time
10 so that the opened windows will be focused (lp: #1154237)
11 * debian/patches/17_static_unity_quicklist.patch:
12 - Use nautilus --new-window to open a New window
13
14 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 12 Mar 2013 18:57:21 +0100
15
1nautilus (1:3.6.3-0ubuntu8) raring; urgency=low16nautilus (1:3.6.3-0ubuntu8) raring; urgency=low
217
3 * debian/control.in:18 * debian/control.in:
419
=== added file 'debian/patches/10_reuse_already_opened_views.patch'
--- debian/patches/10_reuse_already_opened_views.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/10_reuse_already_opened_views.patch 2013-03-12 18:30:31 +0000
@@ -0,0 +1,290 @@
1Index: nautilus/data/nautilus.desktop.in.in
2===================================================================
3--- nautilus.orig/data/nautilus.desktop.in.in 2013-03-12 16:26:12.000000000 +0100
4+++ nautilus/data/nautilus.desktop.in.in 2013-03-12 16:27:57.254745628 +0100
5@@ -1,7 +1,8 @@
6 [Desktop Entry]
7 _Name=Files
8 _Comment=Access and organize files
9-Exec=nautilus %U
10+_Keywords=folder;manager;explore;disk;filesystem;
11+Exec=nautilus --new-window %U
12 Icon=system-file-manager
13 Terminal=false
14 Type=Application
15Index: nautilus/libnautilus-private/nautilus-file-utilities.c
16===================================================================
17--- nautilus.orig/libnautilus-private/nautilus-file-utilities.c 2013-03-12 16:26:03.146976000 +0100
18+++ nautilus/libnautilus-private/nautilus-file-utilities.c 2013-03-12 16:39:11.822510184 +0100
19@@ -1296,6 +1296,48 @@
20 return NULL;
21 }
22
23+gboolean
24+nautilus_file_selection_equal (GList *selection_a,
25+ GList *selection_b)
26+{
27+ GList *al, *bl;
28+ gboolean selection_matches;
29+
30+ if (selection_a == NULL || selection_b == NULL) {
31+ return (selection_a == selection_b);
32+ }
33+
34+ if (g_list_length (selection_a) != g_list_length (selection_b)) {
35+ return FALSE;
36+ }
37+
38+ selection_matches = TRUE;
39+
40+ for (al = selection_a; al; al = al->next) {
41+ GFile *a_location = nautilus_file_get_location (NAUTILUS_FILE (al->data));
42+ gboolean found = FALSE;
43+
44+ for (bl = selection_b; bl; bl = bl->next) {
45+ GFile *b_location = nautilus_file_get_location (NAUTILUS_FILE (bl->data));
46+ found = g_file_equal (b_location, a_location);
47+ g_object_unref (b_location);
48+
49+ if (found) {
50+ break;
51+ }
52+ }
53+
54+ selection_matches = found;
55+ g_object_unref (a_location);
56+
57+ if (!selection_matches) {
58+ break;
59+ }
60+ }
61+
62+ return selection_matches;
63+}
64+
65 #if !defined (NAUTILUS_OMIT_SELF_CHECK)
66
67 void
68Index: nautilus/libnautilus-private/nautilus-file-utilities.h
69===================================================================
70--- nautilus.orig/libnautilus-private/nautilus-file-utilities.h 2013-03-12 16:26:03.146976000 +0100
71+++ nautilus/libnautilus-private/nautilus-file-utilities.h 2013-03-12 16:39:11.822510184 +0100
72@@ -95,4 +95,6 @@
73 GCancellable *cancellable,
74 gpointer user_data);
75
76+gboolean nautilus_file_selection_equal (GList *selection_a, GList *selection_b);
77+
78 #endif /* NAUTILUS_FILE_UTILITIES_H */
79Index: nautilus/src/nautilus-application.c
80===================================================================
81--- nautilus.orig/src/nautilus-application.c 2013-03-12 16:26:13.000000000 +0100
82+++ nautilus/src/nautilus-application.c 2013-03-12 16:28:01.818743973 +0100
83@@ -576,6 +576,47 @@
84 }
85 }
86
87+static NautilusWindowSlot *
88+get_window_slot_for_location (NautilusApplication *application, GFile *location)
89+{
90+ NautilusWindowSlot *slot;
91+ GList *l, *sl;
92+
93+ slot = NULL;
94+
95+ if (g_file_query_file_type (location, G_FILE_QUERY_INFO_NONE, NULL) != G_FILE_TYPE_DIRECTORY) {
96+ location = g_file_get_parent (location);
97+ } else {
98+ g_object_ref (location);
99+ }
100+
101+ for (l = gtk_application_get_windows (GTK_APPLICATION (application)); l; l = l->next) {
102+ NautilusWindow *win = NAUTILUS_WINDOW (l->data);
103+
104+ if (NAUTILUS_IS_DESKTOP_WINDOW (win))
105+ continue;
106+
107+ for (sl = nautilus_window_get_slots (win); sl; sl = sl->next) {
108+ NautilusWindowSlot *current = NAUTILUS_WINDOW_SLOT (sl->data);
109+ GFile *slot_location = nautilus_window_slot_get_location (current);
110+
111+ if (g_file_equal (slot_location, location)) {
112+ slot = current;
113+ break;
114+ }
115+ }
116+
117+ if (slot) {
118+ break;
119+ }
120+ }
121+
122+ g_object_unref (location);
123+
124+ return slot;
125+}
126+
127+
128 static void
129 open_window (NautilusApplication *application,
130 GFile *location, GdkScreen *screen, const char *geometry)
131@@ -609,6 +650,7 @@
132
133 static void
134 open_windows (NautilusApplication *application,
135+ gboolean force_new,
136 GFile **files,
137 gint n_files,
138 GdkScreen *screen,
139@@ -621,8 +663,22 @@
140 open_window (application, NULL, screen, geometry);
141 } else {
142 /* Open windows at each requested location. */
143- for (i = 0; i < n_files; i++) {
144- open_window (application, files[i], screen, geometry);
145+ for (i = 0; i < n_files; ++i) {
146+ NautilusWindowSlot *slot = NULL;
147+
148+ if (!force_new)
149+ slot = get_window_slot_for_location (application, files[i]);
150+
151+ if (!slot) {
152+ open_window (application, files[i], screen, geometry);
153+ } else {
154+ /* We open the location again to update any possible selection */
155+ nautilus_window_slot_open_location (slot, files[i], 0);
156+
157+ NautilusWindow *window = nautilus_window_slot_get_window (slot);
158+ nautilus_window_set_active_slot (window, slot);
159+ gtk_window_present (GTK_WINDOW (window));
160+ }
161 }
162 }
163 }
164@@ -634,19 +690,28 @@
165 const char *startup_id)
166 {
167 NautilusWindow *window;
168+ NautilusWindowSlot *slot;
169 GList *sel_list = NULL;
170
171 nautilus_profile_start (NULL);
172
173- window = nautilus_application_create_window (application, gdk_screen_get_default ());
174- gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
175+ slot = get_window_slot_for_location (application, location);
176+
177+ if (!slot) {
178+ window = nautilus_application_create_window (application, gdk_screen_get_default ());
179+ slot = nautilus_window_get_active_slot (window);
180+ } else {
181+ window = nautilus_window_slot_get_window (slot);
182+ nautilus_window_set_active_slot (window, slot);
183+ gtk_window_present (GTK_WINDOW (window));
184+ }
185
186 if (selection != NULL) {
187 sel_list = g_list_prepend (sel_list, nautilus_file_get (selection));
188 }
189
190- nautilus_window_slot_open_location_full (nautilus_window_get_active_slot (window), location,
191- 0, sel_list, NULL, NULL);
192+ gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
193+ nautilus_window_slot_open_location_full (slot, location, 0, sel_list, NULL, NULL);
194
195 if (sel_list != NULL) {
196 nautilus_file_list_free (sel_list);
197@@ -665,7 +730,9 @@
198
199 DEBUG ("Open called on the GApplication instance; %d files", n_files);
200
201- open_windows (self, files, n_files,
202+ gboolean force_new = (g_strcmp0 (hint, "new-window") == 0);
203+
204+ open_windows (self, force_new, files, n_files,
205 gdk_screen_get_default (),
206 self->priv->geometry);
207 }
208@@ -1059,6 +1126,7 @@
209 gboolean version = FALSE;
210 gboolean browser = FALSE;
211 gboolean kill_shell = FALSE;
212+ gboolean open_new_window = FALSE;
213 gboolean no_default_window = FALSE;
214 gchar **remaining = NULL;
215 NautilusApplication *self = NAUTILUS_APPLICATION (application);
216@@ -1075,6 +1143,8 @@
217 N_("Show the version of the program."), NULL },
218 { "geometry", 'g', 0, G_OPTION_ARG_STRING, &self->priv->geometry,
219 N_("Create the initial window with the given geometry."), N_("GEOMETRY") },
220+ { "new-window", 'w', 0, G_OPTION_ARG_NONE, &open_new_window,
221+ N_("Always open a new window for browsing specified URIs"), NULL },
222 { "no-default-window", 'n', 0, G_OPTION_ARG_NONE, &no_default_window,
223 N_("Only create windows for explicitly specified URIs."), NULL },
224 { "no-desktop", '\0', 0, G_OPTION_ARG_NONE, &self->priv->no_desktop,
225@@ -1089,7 +1159,6 @@
226 GError *error = NULL;
227 gint argc = 0;
228 gchar **argv = NULL;
229-
230 *exit_status = EXIT_SUCCESS;
231
232 nautilus_profile_start (NULL);
233@@ -1127,8 +1196,8 @@
234 goto out;
235 }
236
237- DEBUG ("Parsing local command line, no_default_window %d, quit %d, "
238- "self checks %d, no_desktop %d",
239+ DEBUG ("Parsing local command line, open_new_window %d, no_default_window %d, "
240+ "quit %d, self checks %d, no_desktop %d", open_new_window,
241 no_default_window, kill_shell, perform_self_check, self->priv->no_desktop);
242
243 g_application_register (application, NULL, &error);
244@@ -1185,7 +1254,7 @@
245
246 /* Invoke "Open" to create new windows */
247 if (len > 0) {
248- g_application_open (application, files, len, "");
249+ g_application_open (application, files, len, open_new_window ? "new-window" : "");
250 }
251
252 for (idx = 0; idx < len; idx++) {
253Index: nautilus/src/nautilus-window-manage-views.c
254===================================================================
255--- nautilus.orig/src/nautilus-window-manage-views.c 2013-03-12 13:22:34.506542000 +0100
256+++ nautilus/src/nautilus-window-manage-views.c 2013-03-12 16:38:09.442531224 +0100
257@@ -427,6 +427,7 @@
258 NautilusWindowSlot *target_slot;
259 NautilusWindowOpenFlags slot_flags;
260 GFile *old_location;
261+ GList *old_selection;
262 char *old_uri, *new_uri;
263 int new_slot_position;
264 gboolean use_same;
265@@ -525,9 +526,14 @@
266 }
267 }
268
269- if (target_window == window && target_slot == slot &&
270+ old_selection = NULL;
271+ if (slot->content_view != NULL) {
272+ old_selection = nautilus_view_get_selection (slot->content_view);
273+ }
274+
275+ if (target_window == window && target_slot == slot && !is_desktop &&
276 old_location && g_file_equal (old_location, location) &&
277- !is_desktop) {
278+ nautilus_file_selection_equal (old_selection, new_selection)) {
279
280 if (callback != NULL) {
281 callback (window, location, NULL, user_data);
282@@ -537,7 +543,7 @@
283 }
284
285 slot->pending_use_default_location = ((flags & NAUTILUS_WINDOW_OPEN_FLAG_USE_DEFAULT_LOCATION) != 0);
286- begin_location_change (target_slot, location, old_location, new_selection,
287+ begin_location_change (target_slot, location, old_location, new_selection,
288 NAUTILUS_LOCATION_CHANGE_STANDARD, 0, NULL, callback, user_data);
289
290 done:
0291
=== 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 18:30:31 +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 17:57:43.417743091 +0100
5+++ nautilus-3.6.2/configure.in 2012-10-31 02:34:01.976876084 -04005+++ nautilus/configure.in 2013-03-12 17:57:43.413743092 +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 17:57:43.417743091 +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 17:57:43.413743092 +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 17:57:43.417743091 +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 17:57:43.413743092 +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 17:57:43.417743091 +0100
134+++ nautilus-3.6.2/src/Makefile.am 2012-10-31 02:34:01.980876084 -0400134+++ nautilus/src/Makefile.am 2013-03-12 17:57:43.413743092 +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 17:57:43.417743091 +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 17:57:43.413743092 +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 17:57:43.413743092 +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 17:57:43.413743092 +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 17:57:43.417743091 +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 17:57:43.417743091 +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>
@@ -670,7 +682,7 @@
670 /* Keep window from shrinking down ridiculously small; numbers are somewhat arbitrary */682 /* Keep window from shrinking down ridiculously small; numbers are somewhat arbitrary */
671 #define APPLICATION_WINDOW_MIN_WIDTH 300683 #define APPLICATION_WINDOW_MIN_WIDTH 300
672 #define APPLICATION_WINDOW_MIN_HEIGHT 100684 #define APPLICATION_WINDOW_MIN_HEIGHT 100
673@@ -1479,6 +1483,10 @@685@@ -1548,6 +1552,10 @@
674 nautilus_application_init_actions (self);686 nautilus_application_init_actions (self);
675 687
676 nautilus_profile_end (NULL);688 nautilus_profile_end (NULL);
@@ -681,11 +693,11 @@
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 18:57:09.410958729 +0100
688@@ -0,0 +1,137 @@700@@ -0,0 +1,144 @@
689+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist701+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist
690+ *702+ *
691+ * Copyright (C) 2012 Canonical703+ * Copyright (C) 2012 Canonical
@@ -729,19 +741,26 @@
729+ guint timestamp,741+ guint timestamp,
730+ NautilusBookmark *bookmark)742+ NautilusBookmark *bookmark)
731+{743+{
732+ g_assert (NAUTILUS_IS_BOOKMARK (bookmark));744+ g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
733+745+
734+ GFile *location;746+ GFile *locations[2];
747+ GList *windows, *l;
735+ NautilusApplication *application;748+ NautilusApplication *application;
736+ NautilusWindow *new_window;
737+749+
738+ location = nautilus_bookmark_get_location (bookmark);750+ locations[0] = nautilus_bookmark_get_location (bookmark);
751+ locations[1] = NULL;
739+752+
740+ application = NAUTILUS_APPLICATION (g_application_get_default ());753+ application = NAUTILUS_APPLICATION (g_application_get_default ());
741+ new_window = nautilus_application_create_window (application, gdk_screen_get_default ());754+
742+ nautilus_window_slot_open_location (nautilus_window_get_active_slot (new_window), location, 0);755+ /* Make sure that the application timestamp matches the event */
743+756+ for (l = gtk_application_get_windows (GTK_APPLICATION (application)); l; l = l->next) {
744+ g_object_unref (location);757+ GdkWindow *gdk_window = gtk_widget_get_window (GTK_WIDGET (l->data));
758+ gdk_x11_window_set_user_time (gdk_window, timestamp);
759+ }
760+
761+ g_application_open (G_APPLICATION (application), locations, 1, "");
762+
763+ g_object_unref (locations[0]);
745+}764+}
746+765+
747+static void766+static void
@@ -823,10 +842,10 @@
823+ G_CALLBACK (unity_bookmarks_handler_refresh_bookmarks), 0);842+ G_CALLBACK (unity_bookmarks_handler_refresh_bookmarks), 0);
824+}843+}
825+844+
826Index: nautilus-3.6.2/src/unity-bookmarks-handler.h845Index: nautilus/src/unity-bookmarks-handler.h
827===================================================================846===================================================================
828--- /dev/null 1970-01-01 00:00:00.000000000 +0000847--- /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 -0400848+++ nautilus/src/unity-bookmarks-handler.h 2013-03-12 17:57:43.417743091 +0100
830@@ -0,0 +1,31 @@849@@ -0,0 +1,31 @@
831+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */850+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
832+/*851+/*
@@ -859,10 +878,10 @@
859+void unity_bookmarks_handler_initialize (void);878+void unity_bookmarks_handler_initialize (void);
860+879+
861+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/880+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/
862Index: nautilus-3.6.2/po/POTFILES.in881Index: nautilus/po/POTFILES.in
863===================================================================882===================================================================
864--- nautilus-3.6.2.orig/po/POTFILES.in 2012-10-31 02:33:43.228876867 -0400883--- nautilus.orig/po/POTFILES.in 2013-03-12 17:57:43.417743091 +0100
865+++ nautilus-3.6.2/po/POTFILES.in 2012-10-31 02:34:01.980876084 -0400884+++ nautilus/po/POTFILES.in 2013-03-12 17:57:43.417743091 +0100
866@@ -90,3 +90,4 @@885@@ -90,3 +90,4 @@
867 src/nautilus-window-private.h886 src/nautilus-window-private.h
868 src/nautilus-window-slot.c887 src/nautilus-window-slot.c
869888
=== modified file 'debian/patches/17_static_unity_quicklist.patch'
--- debian/patches/17_static_unity_quicklist.patch 2013-03-08 13:44:44 +0000
+++ debian/patches/17_static_unity_quicklist.patch 2013-03-12 18:30:31 +0000
@@ -1,8 +1,8 @@
1Index: nautilus-3.5.5/data/nautilus.desktop.in.in1Index: nautilus/data/nautilus.desktop.in.in
2===================================================================2===================================================================
3--- nautilus-3.5.5.orig/data/nautilus.desktop.in.in 2012-05-08 06:28:08.000000000 +02003--- nautilus.orig/data/nautilus.desktop.in.in 2013-03-12 17:08:37.121951465 +0100
4+++ nautilus-3.5.5/data/nautilus.desktop.in.in 2012-08-08 09:41:30.183206868 +02004+++ nautilus/data/nautilus.desktop.in.in 2013-03-12 17:11:35.029894735 +0100
5@@ -13,3 +13,9 @@5@@ -14,3 +14,9 @@
6 X-GNOME-Bugzilla-Product=nautilus6 X-GNOME-Bugzilla-Product=nautilus
7 X-GNOME-Bugzilla-Component=general7 X-GNOME-Bugzilla-Component=general
8 X-GNOME-Bugzilla-Version=@VERSION@8 X-GNOME-Bugzilla-Version=@VERSION@
@@ -10,5 +10,5 @@
10+10+
11+[Desktop Action Window]11+[Desktop Action Window]
12+_Name=Open a New Window12+_Name=Open a New Window
13+Exec=nautilus13+Exec=nautilus --new-window
14+OnlyShowIn=Unity;14+OnlyShowIn=Unity;
1515
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-03-08 13:44:44 +0000
+++ debian/patches/series 2013-03-12 18:30:31 +0000
@@ -4,6 +4,7 @@
406_never_exec_nonexec_launchers.patch406_never_exec_nonexec_launchers.patch
508_clean_session_capplet.patch508_clean_session_capplet.patch
609_no-initial-fade.patch609_no-initial-fade.patch
710_reuse_already_opened_views.patch
711_copy_skipping_pager.patch811_copy_skipping_pager.patch
812_unity_launcher_support.patch912_unity_launcher_support.patch
914_bring_del_instead_ctrl_del.patch1014_bring_del_instead_ctrl_del.patch

Subscribers

People subscribed via source and target branches

to all changes: