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

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: 362
Proposed branch: lp:~3v1n0/nautilus/reuse-already-opened-views
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Prerequisite: lp:~3v1n0/nautilus/progress-quicklist-improvements
Diff against target: 555 lines (+366/-34)
6 files modified
debian/changelog (+10/-1)
debian/patches/10_reuse_already_opened_views.patch (+302/-0)
debian/patches/12_unity_launcher_support.patch (+35/-28)
debian/patches/17_static_unity_quicklist.patch (+5/-5)
debian/patches/19_add_desktop_keywords.patch (+12/-0)
debian/patches/series (+2/-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+152981@code.launchpad.net

This proposal supersedes 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.
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

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-13 12:40:27 +0000
+++ debian/changelog 2013-03-13 12:40:27 +0000
@@ -1,10 +1,19 @@
1nautilus (1:3.6.3-0ubuntu9) UNRELEASED; urgency=low1nautilus (1:3.6.3-0ubuntu9) UNRELEASED; urgency=low
22
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)
3 * debian/patches/12_unity_launcher_support.patch:6 * debian/patches/12_unity_launcher_support.patch:
4 - Quicklist entries to show the copy dialog should use a separator (lp: #1154109)7 - 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)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 * debian/patches/19_add_desktop_keywords.patch:
14 - Adding .desktop files keywords from upstream
615
7 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 12 Mar 2013 15:31:21 +010016 -- Marco Trevisan (Treviño) <marco@ubuntu.com> Tue, 12 Mar 2013 18:57:21 +0100
817
9nautilus (1:3.6.3-0ubuntu8) raring; urgency=low18nautilus (1:3.6.3-0ubuntu8) raring; urgency=low
1019
1120
=== 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-13 12:40:27 +0000
@@ -0,0 +1,302 @@
1Description: Focus already opened nautilus windows or tabs when an already
2 opened location is requested. Add a --new-window command to force the opening
3 of a new window.
4
5Origin: upstream, https://git.gnome.org/browse/nautilus/commit/?id=c8ee0c5
6 https://git.gnome.org/browse/nautilus/commit/?id=d0b0b
7 https://git.gnome.org/browse/nautilus/commit/?id=ce4255cf
8Bug: https://bugzilla.gnome.org/show_bug.cgi?id=694034
9Bug-Ubuntu: https://bugs.launchpad.net/nautilus/+bug/692444
10Forwarded: yes
11Applied-Upstream: 3.7.91
12Author: Marco Trevisan <marco@ubuntu.com>
13
14Index: nautilus/data/nautilus.desktop.in.in
15===================================================================
16--- nautilus.orig/data/nautilus.desktop.in.in 2013-03-12 19:34:31.066512196 +0100
17+++ nautilus/data/nautilus.desktop.in.in 2013-03-12 19:34:41.726459664 +0100
18@@ -1,7 +1,7 @@
19 [Desktop Entry]
20 _Name=Files
21 _Comment=Access and organize files
22-Exec=nautilus %U
23+Exec=nautilus --new-window %U
24 Icon=system-file-manager
25 Terminal=false
26 Type=Application
27Index: nautilus/libnautilus-private/nautilus-file-utilities.c
28===================================================================
29--- nautilus.orig/libnautilus-private/nautilus-file-utilities.c 2013-03-12 19:34:31.066512196 +0100
30+++ nautilus/libnautilus-private/nautilus-file-utilities.c 2013-03-12 19:34:31.058512174 +0100
31@@ -1296,6 +1296,48 @@
32 return NULL;
33 }
34
35+gboolean
36+nautilus_file_selection_equal (GList *selection_a,
37+ GList *selection_b)
38+{
39+ GList *al, *bl;
40+ gboolean selection_matches;
41+
42+ if (selection_a == NULL || selection_b == NULL) {
43+ return (selection_a == selection_b);
44+ }
45+
46+ if (g_list_length (selection_a) != g_list_length (selection_b)) {
47+ return FALSE;
48+ }
49+
50+ selection_matches = TRUE;
51+
52+ for (al = selection_a; al; al = al->next) {
53+ GFile *a_location = nautilus_file_get_location (NAUTILUS_FILE (al->data));
54+ gboolean found = FALSE;
55+
56+ for (bl = selection_b; bl; bl = bl->next) {
57+ GFile *b_location = nautilus_file_get_location (NAUTILUS_FILE (bl->data));
58+ found = g_file_equal (b_location, a_location);
59+ g_object_unref (b_location);
60+
61+ if (found) {
62+ break;
63+ }
64+ }
65+
66+ selection_matches = found;
67+ g_object_unref (a_location);
68+
69+ if (!selection_matches) {
70+ break;
71+ }
72+ }
73+
74+ return selection_matches;
75+}
76+
77 #if !defined (NAUTILUS_OMIT_SELF_CHECK)
78
79 void
80Index: nautilus/libnautilus-private/nautilus-file-utilities.h
81===================================================================
82--- nautilus.orig/libnautilus-private/nautilus-file-utilities.h 2013-03-12 19:34:31.066512196 +0100
83+++ nautilus/libnautilus-private/nautilus-file-utilities.h 2013-03-12 19:34:31.058512174 +0100
84@@ -95,4 +95,6 @@
85 GCancellable *cancellable,
86 gpointer user_data);
87
88+gboolean nautilus_file_selection_equal (GList *selection_a, GList *selection_b);
89+
90 #endif /* NAUTILUS_FILE_UTILITIES_H */
91Index: nautilus/src/nautilus-application.c
92===================================================================
93--- nautilus.orig/src/nautilus-application.c 2013-03-12 19:34:31.066512196 +0100
94+++ nautilus/src/nautilus-application.c 2013-03-12 19:34:31.058512174 +0100
95@@ -576,6 +576,47 @@
96 }
97 }
98
99+static NautilusWindowSlot *
100+get_window_slot_for_location (NautilusApplication *application, GFile *location)
101+{
102+ NautilusWindowSlot *slot;
103+ GList *l, *sl;
104+
105+ slot = NULL;
106+
107+ if (g_file_query_file_type (location, G_FILE_QUERY_INFO_NONE, NULL) != G_FILE_TYPE_DIRECTORY) {
108+ location = g_file_get_parent (location);
109+ } else {
110+ g_object_ref (location);
111+ }
112+
113+ for (l = gtk_application_get_windows (GTK_APPLICATION (application)); l; l = l->next) {
114+ NautilusWindow *win = NAUTILUS_WINDOW (l->data);
115+
116+ if (NAUTILUS_IS_DESKTOP_WINDOW (win))
117+ continue;
118+
119+ for (sl = nautilus_window_get_slots (win); sl; sl = sl->next) {
120+ NautilusWindowSlot *current = NAUTILUS_WINDOW_SLOT (sl->data);
121+ GFile *slot_location = nautilus_window_slot_get_location (current);
122+
123+ if (g_file_equal (slot_location, location)) {
124+ slot = current;
125+ break;
126+ }
127+ }
128+
129+ if (slot) {
130+ break;
131+ }
132+ }
133+
134+ g_object_unref (location);
135+
136+ return slot;
137+}
138+
139+
140 static void
141 open_window (NautilusApplication *application,
142 GFile *location, GdkScreen *screen, const char *geometry)
143@@ -609,6 +650,7 @@
144
145 static void
146 open_windows (NautilusApplication *application,
147+ gboolean force_new,
148 GFile **files,
149 gint n_files,
150 GdkScreen *screen,
151@@ -621,8 +663,22 @@
152 open_window (application, NULL, screen, geometry);
153 } else {
154 /* Open windows at each requested location. */
155- for (i = 0; i < n_files; i++) {
156- open_window (application, files[i], screen, geometry);
157+ for (i = 0; i < n_files; ++i) {
158+ NautilusWindowSlot *slot = NULL;
159+
160+ if (!force_new)
161+ slot = get_window_slot_for_location (application, files[i]);
162+
163+ if (!slot) {
164+ open_window (application, files[i], screen, geometry);
165+ } else {
166+ /* We open the location again to update any possible selection */
167+ nautilus_window_slot_open_location (slot, files[i], 0);
168+
169+ NautilusWindow *window = nautilus_window_slot_get_window (slot);
170+ nautilus_window_set_active_slot (window, slot);
171+ gtk_window_present (GTK_WINDOW (window));
172+ }
173 }
174 }
175 }
176@@ -634,19 +690,28 @@
177 const char *startup_id)
178 {
179 NautilusWindow *window;
180+ NautilusWindowSlot *slot;
181 GList *sel_list = NULL;
182
183 nautilus_profile_start (NULL);
184
185- window = nautilus_application_create_window (application, gdk_screen_get_default ());
186- gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
187+ slot = get_window_slot_for_location (application, location);
188+
189+ if (!slot) {
190+ window = nautilus_application_create_window (application, gdk_screen_get_default ());
191+ slot = nautilus_window_get_active_slot (window);
192+ } else {
193+ window = nautilus_window_slot_get_window (slot);
194+ nautilus_window_set_active_slot (window, slot);
195+ gtk_window_present (GTK_WINDOW (window));
196+ }
197
198 if (selection != NULL) {
199 sel_list = g_list_prepend (sel_list, nautilus_file_get (selection));
200 }
201
202- nautilus_window_slot_open_location_full (nautilus_window_get_active_slot (window), location,
203- 0, sel_list, NULL, NULL);
204+ gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
205+ nautilus_window_slot_open_location_full (slot, location, 0, sel_list, NULL, NULL);
206
207 if (sel_list != NULL) {
208 nautilus_file_list_free (sel_list);
209@@ -665,7 +730,9 @@
210
211 DEBUG ("Open called on the GApplication instance; %d files", n_files);
212
213- open_windows (self, files, n_files,
214+ gboolean force_new = (g_strcmp0 (hint, "new-window") == 0);
215+
216+ open_windows (self, force_new, files, n_files,
217 gdk_screen_get_default (),
218 self->priv->geometry);
219 }
220@@ -1059,6 +1126,7 @@
221 gboolean version = FALSE;
222 gboolean browser = FALSE;
223 gboolean kill_shell = FALSE;
224+ gboolean open_new_window = FALSE;
225 gboolean no_default_window = FALSE;
226 gchar **remaining = NULL;
227 NautilusApplication *self = NAUTILUS_APPLICATION (application);
228@@ -1075,6 +1143,8 @@
229 N_("Show the version of the program."), NULL },
230 { "geometry", 'g', 0, G_OPTION_ARG_STRING, &self->priv->geometry,
231 N_("Create the initial window with the given geometry."), N_("GEOMETRY") },
232+ { "new-window", 'w', 0, G_OPTION_ARG_NONE, &open_new_window,
233+ N_("Always open a new window for browsing specified URIs"), NULL },
234 { "no-default-window", 'n', 0, G_OPTION_ARG_NONE, &no_default_window,
235 N_("Only create windows for explicitly specified URIs."), NULL },
236 { "no-desktop", '\0', 0, G_OPTION_ARG_NONE, &self->priv->no_desktop,
237@@ -1089,7 +1159,6 @@
238 GError *error = NULL;
239 gint argc = 0;
240 gchar **argv = NULL;
241-
242 *exit_status = EXIT_SUCCESS;
243
244 nautilus_profile_start (NULL);
245@@ -1127,8 +1196,8 @@
246 goto out;
247 }
248
249- DEBUG ("Parsing local command line, no_default_window %d, quit %d, "
250- "self checks %d, no_desktop %d",
251+ DEBUG ("Parsing local command line, open_new_window %d, no_default_window %d, "
252+ "quit %d, self checks %d, no_desktop %d", open_new_window,
253 no_default_window, kill_shell, perform_self_check, self->priv->no_desktop);
254
255 g_application_register (application, NULL, &error);
256@@ -1185,7 +1254,7 @@
257
258 /* Invoke "Open" to create new windows */
259 if (len > 0) {
260- g_application_open (application, files, len, "");
261+ g_application_open (application, files, len, open_new_window ? "new-window" : "");
262 }
263
264 for (idx = 0; idx < len; idx++) {
265Index: nautilus/src/nautilus-window-manage-views.c
266===================================================================
267--- nautilus.orig/src/nautilus-window-manage-views.c 2013-03-12 19:34:31.066512196 +0100
268+++ nautilus/src/nautilus-window-manage-views.c 2013-03-12 19:34:31.062512185 +0100
269@@ -427,6 +427,7 @@
270 NautilusWindowSlot *target_slot;
271 NautilusWindowOpenFlags slot_flags;
272 GFile *old_location;
273+ GList *old_selection;
274 char *old_uri, *new_uri;
275 int new_slot_position;
276 gboolean use_same;
277@@ -525,9 +526,14 @@
278 }
279 }
280
281- if (target_window == window && target_slot == slot &&
282+ old_selection = NULL;
283+ if (slot->content_view != NULL) {
284+ old_selection = nautilus_view_get_selection (slot->content_view);
285+ }
286+
287+ if (target_window == window && target_slot == slot && !is_desktop &&
288 old_location && g_file_equal (old_location, location) &&
289- !is_desktop) {
290+ nautilus_file_selection_equal (old_selection, new_selection)) {
291
292 if (callback != NULL) {
293 callback (window, location, NULL, user_data);
294@@ -537,7 +543,7 @@
295 }
296
297 slot->pending_use_default_location = ((flags & NAUTILUS_WINDOW_OPEN_FLAG_USE_DEFAULT_LOCATION) != 0);
298- begin_location_change (target_slot, location, old_location, new_selection,
299+ begin_location_change (target_slot, location, old_location, new_selection,
300 NAUTILUS_LOCATION_CHANGE_STANDARD, 0, NULL, callback, user_data);
301
302 done:
0303
=== modified file 'debian/patches/12_unity_launcher_support.patch'
--- debian/patches/12_unity_launcher_support.patch 2013-03-13 12:40:27 +0000
+++ debian/patches/12_unity_launcher_support.patch 2013-03-13 12:40:27 +0000
@@ -1,8 +1,8 @@
1=== modified file 'configure.in'1=== modified file 'configure.in'
2Index: nautilus/configure.in2Index: nautilus/configure.in
3===================================================================3===================================================================
4--- nautilus.orig/configure.in 2013-03-12 13:29:48.958239697 +01004--- nautilus.orig/configure.in 2013-03-12 17:57:43.417743091 +0100
5+++ nautilus/configure.in 2013-03-12 13:29:48.950239703 +01005+++ 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)
@@ -52,8 +52,8 @@
52 52
53Index: nautilus/libnautilus-private/nautilus-progress-info.c53Index: nautilus/libnautilus-private/nautilus-progress-info.c
54===================================================================54===================================================================
55--- nautilus.orig/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.958239697 +010055--- nautilus.orig/libnautilus-private/nautilus-progress-info.c 2013-03-12 17:57:43.417743091 +0100
56+++ nautilus/libnautilus-private/nautilus-progress-info.c 2013-03-12 13:29:48.950239703 +010056+++ 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;
@@ -117,8 +117,8 @@
117 }117 }
118Index: nautilus/libnautilus-private/nautilus-progress-info.h118Index: nautilus/libnautilus-private/nautilus-progress-info.h
119===================================================================119===================================================================
120--- nautilus.orig/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.958239697 +0100120--- nautilus.orig/libnautilus-private/nautilus-progress-info.h 2013-03-12 17:57:43.417743091 +0100
121+++ nautilus/libnautilus-private/nautilus-progress-info.h 2013-03-12 13:29:48.950239703 +0100121+++ 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);
@@ -130,8 +130,8 @@
130 void nautilus_progress_info_finish (NautilusProgressInfo *info);130 void nautilus_progress_info_finish (NautilusProgressInfo *info);
131Index: nautilus/src/Makefile.am131Index: nautilus/src/Makefile.am
132===================================================================132===================================================================
133--- nautilus.orig/src/Makefile.am 2013-03-12 13:29:48.958239697 +0100133--- nautilus.orig/src/Makefile.am 2013-03-12 17:57:43.417743091 +0100
134+++ nautilus/src/Makefile.am 2013-03-12 13:29:48.950239703 +0100134+++ 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)\"" \
@@ -161,8 +161,8 @@
161 nodist_nautilus_SOURCES = \161 nodist_nautilus_SOURCES = \
162Index: nautilus/src/nautilus-progress-ui-handler.c162Index: nautilus/src/nautilus-progress-ui-handler.c
163===================================================================163===================================================================
164--- nautilus.orig/src/nautilus-progress-ui-handler.c 2013-03-12 13:29:48.958239697 +0100164--- nautilus.orig/src/nautilus-progress-ui-handler.c 2013-03-12 17:57:43.417743091 +0100
165+++ nautilus/src/nautilus-progress-ui-handler.c 2013-03-12 15:25:31.435572751 +0100165+++ 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>
@@ -432,7 +432,7 @@
432Index: nautilus/src/unity-quicklist-handler.c432Index: nautilus/src/unity-quicklist-handler.c
433===================================================================433===================================================================
434--- /dev/null 1970-01-01 00:00:00.000000000 +0000434--- /dev/null 1970-01-01 00:00:00.000000000 +0000
435+++ nautilus/src/unity-quicklist-handler.c 2013-03-12 14:07:43.835192621 +0100435+++ nautilus/src/unity-quicklist-handler.c 2013-03-12 17:57:43.413743092 +0100
436@@ -0,0 +1,153 @@436@@ -0,0 +1,153 @@
437+/*unity-quicklist-handler.c: handle Unity quicklists437+/*unity-quicklist-handler.c: handle Unity quicklists
438+ *438+ *
@@ -590,7 +590,7 @@
590Index: nautilus/src/unity-quicklist-handler.h590Index: nautilus/src/unity-quicklist-handler.h
591===================================================================591===================================================================
592--- /dev/null 1970-01-01 00:00:00.000000000 +0000592--- /dev/null 1970-01-01 00:00:00.000000000 +0000
593+++ nautilus/src/unity-quicklist-handler.h 2013-03-12 14:07:14.835176946 +0100593+++ nautilus/src/unity-quicklist-handler.h 2013-03-12 17:57:43.413743092 +0100
594@@ -0,0 +1,75 @@594@@ -0,0 +1,75 @@
595+/* -*- 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 -*- */
596+/*596+/*
@@ -669,8 +669,8 @@
669+#endif /* __UNITY_QUICKLIST_HANDLER_H__ */669+#endif /* __UNITY_QUICKLIST_HANDLER_H__ */
670Index: nautilus/src/nautilus-application.c670Index: nautilus/src/nautilus-application.c
671===================================================================671===================================================================
672--- nautilus.orig/src/nautilus-application.c 2013-03-12 13:29:48.958239697 +0100672--- nautilus.orig/src/nautilus-application.c 2013-03-12 17:57:43.417743091 +0100
673+++ nautilus/src/nautilus-application.c 2013-03-12 13:29:48.954239700 +0100673+++ nautilus/src/nautilus-application.c 2013-03-12 17:57:43.417743091 +0100
674@@ -79,6 +79,10 @@674@@ -79,6 +79,10 @@
675 #include <gdk/gdkx.h>675 #include <gdk/gdkx.h>
676 #include <gtk/gtk.h>676 #include <gtk/gtk.h>
@@ -682,7 +682,7 @@
682 /* Keep window from shrinking down ridiculously small; numbers are somewhat arbitrary */682 /* Keep window from shrinking down ridiculously small; numbers are somewhat arbitrary */
683 #define APPLICATION_WINDOW_MIN_WIDTH 300683 #define APPLICATION_WINDOW_MIN_WIDTH 300
684 #define APPLICATION_WINDOW_MIN_HEIGHT 100684 #define APPLICATION_WINDOW_MIN_HEIGHT 100
685@@ -1479,6 +1483,10 @@685@@ -1548,6 +1552,10 @@
686 nautilus_application_init_actions (self);686 nautilus_application_init_actions (self);
687 687
688 nautilus_profile_end (NULL);688 nautilus_profile_end (NULL);
@@ -696,8 +696,8 @@
696Index: nautilus/src/unity-bookmarks-handler.c696Index: nautilus/src/unity-bookmarks-handler.c
697===================================================================697===================================================================
698--- /dev/null 1970-01-01 00:00:00.000000000 +0000698--- /dev/null 1970-01-01 00:00:00.000000000 +0000
699+++ nautilus/src/unity-bookmarks-handler.c 2013-03-12 13:29:48.954239700 +0100699+++ nautilus/src/unity-bookmarks-handler.c 2013-03-12 18:57:09.410958729 +0100
700@@ -0,0 +1,137 @@700@@ -0,0 +1,144 @@
701+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist701+/*unity-bookmarks-handler.c: handle Unity bookmark for quicklist
702+ *702+ *
703+ * Copyright (C) 2012 Canonical703+ * Copyright (C) 2012 Canonical
@@ -741,19 +741,26 @@
741+ guint timestamp,741+ guint timestamp,
742+ NautilusBookmark *bookmark)742+ NautilusBookmark *bookmark)
743+{743+{
744+ g_assert (NAUTILUS_IS_BOOKMARK (bookmark));744+ g_return_if_fail (NAUTILUS_IS_BOOKMARK (bookmark));
745+745+
746+ GFile *location;746+ GFile *locations[2];
747+ GList *windows, *l;
747+ NautilusApplication *application;748+ NautilusApplication *application;
748+ NautilusWindow *new_window;
749+749+
750+ location = nautilus_bookmark_get_location (bookmark);750+ locations[0] = nautilus_bookmark_get_location (bookmark);
751+ locations[1] = NULL;
751+752+
752+ application = NAUTILUS_APPLICATION (g_application_get_default ());753+ application = NAUTILUS_APPLICATION (g_application_get_default ());
753+ new_window = nautilus_application_create_window (application, gdk_screen_get_default ());754+
754+ nautilus_window_slot_open_location (nautilus_window_get_active_slot (new_window), location, 0);755+ /* Make sure that the application timestamp matches the event */
755+756+ for (l = gtk_application_get_windows (GTK_APPLICATION (application)); l; l = l->next) {
756+ 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]);
757+}764+}
758+765+
759+static void766+static void
@@ -838,7 +845,7 @@
838Index: nautilus/src/unity-bookmarks-handler.h845Index: nautilus/src/unity-bookmarks-handler.h
839===================================================================846===================================================================
840--- /dev/null 1970-01-01 00:00:00.000000000 +0000847--- /dev/null 1970-01-01 00:00:00.000000000 +0000
841+++ nautilus/src/unity-bookmarks-handler.h 2013-03-12 13:29:48.954239700 +0100848+++ nautilus/src/unity-bookmarks-handler.h 2013-03-12 17:57:43.417743091 +0100
842@@ -0,0 +1,31 @@849@@ -0,0 +1,31 @@
843+/* -*- 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 -*- */
844+/*851+/*
@@ -873,8 +880,8 @@
873+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/880+#endif /* __UNITY_BOOKMARKS_HANDLER_H__*/
874Index: nautilus/po/POTFILES.in881Index: nautilus/po/POTFILES.in
875===================================================================882===================================================================
876--- nautilus.orig/po/POTFILES.in 2013-03-12 13:29:48.958239697 +0100883--- nautilus.orig/po/POTFILES.in 2013-03-12 17:57:43.417743091 +0100
877+++ nautilus/po/POTFILES.in 2013-03-12 13:29:48.954239700 +0100884+++ nautilus/po/POTFILES.in 2013-03-12 17:57:43.417743091 +0100
878@@ -90,3 +90,4 @@885@@ -90,3 +90,4 @@
879 src/nautilus-window-private.h886 src/nautilus-window-private.h
880 src/nautilus-window-slot.c887 src/nautilus-window-slot.c
881888
=== 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-13 12:40:27 +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
=== added file 'debian/patches/19_add_desktop_keywords.patch'
--- debian/patches/19_add_desktop_keywords.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/19_add_desktop_keywords.patch 2013-03-13 12:40:27 +0000
@@ -0,0 +1,12 @@
1Index: nautilus/data/nautilus.desktop.in.in
2===================================================================
3--- nautilus.orig/data/nautilus.desktop.in.in 2013-03-12 19:35:01.714349423 +0100
4+++ nautilus/data/nautilus.desktop.in.in 2013-03-12 19:37:25.077722944 +0100
5@@ -1,6 +1,7 @@
6 [Desktop Entry]
7 _Name=Files
8 _Comment=Access and organize files
9+_Keywords=folder;manager;explore;disk;filesystem;
10 Exec=nautilus --new-window %U
11 Icon=system-file-manager
12 Terminal=false
013
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-03-08 13:44:44 +0000
+++ debian/patches/series 2013-03-13 12:40:27 +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
@@ -11,6 +12,7 @@
1116_unity_new_documents.patch1216_unity_new_documents.patch
1217_static_unity_quicklist.patch1317_static_unity_quicklist.patch
1318_unity_icon_color.patch1418_unity_icon_color.patch
1519_add_desktop_keywords.patch
14zg_activity_logging.patch16zg_activity_logging.patch
15dont_wrap_labels_after_dots.patch17dont_wrap_labels_after_dots.patch
16git_add_missing_tooltips.patch18git_add_missing_tooltips.patch

Subscribers

People subscribed via source and target branches

to all changes: