Merge lp:~roignac/nautilus/bug_32542_save_search_as_button into lp:~ubuntu-desktop/nautilus/ubuntu

Proposed by Vadim Rutkovsky on 2012-03-07
Status: Work in progress
Proposed branch: lp:~roignac/nautilus/bug_32542_save_search_as_button
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Diff against target: 117 lines (+95/-0) 3 files modified
To merge this branch: bzr merge lp:~roignac/nautilus/bug_32542_save_search_as_button
Reviewer Review Type Date Requested Status
Ubuntu Desktop 2012-03-07 Pending
Review via email: mp+96340@code.launchpad.net

Description of the Change

Add 'Save search as' to search toolbar

To post a comment you must log in.
Sebastien Bacher (seb128) wrote :

Thank you for your work there, I'm unsure that saving searches is something users do enough to justify to be added to the toolbar though, also we are ui frozen for precise so that will have to wait the next cycle. I will watch the upstream comments though and review the patch again next cycle if they don't do it

Unmerged revisions

273. By Vadim Rutkovsky on 2012-03-07

* debian/patches/21_save_search_on_toolbar.patch:
  - Add 'Save search as' button on search toolbar (lp: #32542)

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2012-03-06 21:21:03 +0000
3+++ debian/changelog 2012-03-07 11:59:19 +0000
4@@ -1,3 +1,10 @@
5+nautilus (1:3.3.91-0ubuntu3) UNRELEASED; urgency=low
6+
7+ * debian/patches/21_save_search_on_toolbar.patch:
8+ - Add 'Save search as' button on search toolbar (lp: #32542)
9+
10+ -- Vadim Rutkovsky <roignac@gmail.com> Wed, 07 Mar 2012 14:07:27 +0300
11+
12 nautilus (1:3.3.91-0ubuntu2) UNRELEASED; urgency=low
13
14 * debian/patches/20_static_unity_quicklist.patch:
15
16=== added file 'debian/patches/21_save_search_on_toolbar.patch'
17--- debian/patches/21_save_search_on_toolbar.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/21_save_search_on_toolbar.patch 2012-03-07 11:59:19 +0000
19@@ -0,0 +1,87 @@
20+## Description: Add 'Save search as' button on search toolbar
21+## Origin/Author: Vadim Rutkovsky <roignac@gmail.com>
22+## Bug: https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/32542, https://bugzilla.gnome.org/show_bug.cgi?id=332299
23+Index: trunk/src/nautilus-query-editor.c
24+===================================================================
25+--- trunk.orig/src/nautilus-query-editor.c 2012-03-07 09:45:57.319085722 +0300
26++++ trunk/src/nautilus-query-editor.c 2012-03-07 11:59:08.746123993 +0300
27+@@ -24,6 +24,8 @@
28+ #include <config.h>
29+ #include "nautilus-query-editor.h"
30+ #include "nautilus-window-slot.h"
31++#include "nautilus-actions.h"
32++#include "nautilus-view.h"
33+
34+ #include <string.h>
35+ #include <glib/gi18n.h>
36+@@ -1017,9 +1019,19 @@
37+ }
38+
39+ static void
40++save_search_cb (GtkButton *clicked_button, NautilusQueryEditor *editor)
41++{
42++
43++ NautilusView *view;
44++
45++ view = nautilus_window_slot_get_current_view (editor->details->slot);
46++ nautilus_activate_search_save_as (view);
47++}
48++
49++static void
50+ finish_first_line (NautilusQueryEditor *editor, GtkWidget *hbox, gboolean use_go)
51+ {
52+- GtkWidget *button, *image;
53++ GtkWidget *button, *save_search_as, *image;
54+
55+ button = gtk_button_new ();
56+ image = gtk_image_new_from_stock (GTK_STOCK_ADD,
57+@@ -1051,6 +1063,14 @@
58+ G_CALLBACK (go_search_cb), editor);
59+
60+ gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
61++
62++ if (!use_go) {
63++ save_search_as = gtk_button_new_with_label (_("Save Search as"));
64++ g_signal_connect (save_search_as, "clicked",
65++ G_CALLBACK (save_search_cb), editor);
66++ gtk_widget_show (save_search_as);
67++ gtk_box_pack_end (GTK_BOX (hbox), save_search_as, FALSE, FALSE, 0);
68++ }
69+ }
70+
71+ static void
72+Index: trunk/src/nautilus-view.c
73+===================================================================
74+--- trunk.orig/src/nautilus-view.c 2012-03-07 08:08:01.221113000 +0300
75++++ trunk/src/nautilus-view.c 2012-03-07 12:00:50.982630965 +0300
76+@@ -1774,6 +1774,18 @@
77+ }
78+ }
79+
80++void
81++nautilus_activate_search_save_as (NautilusView *view)
82++{
83++ GtkAction *action;
84++
85++ g_assert (NAUTILUS_IS_VIEW (view));
86++
87++ action = gtk_action_group_get_action (view->details->dir_action_group,
88++ NAUTILUS_ACTION_SAVE_SEARCH_AS);
89++ gtk_action_activate (action);
90++}
91++
92+
93+ static void
94+ action_empty_trash_callback (GtkAction *action,
95+Index: trunk/src/nautilus-view.h
96+===================================================================
97+--- trunk.orig/src/nautilus-view.h 2012-03-07 08:08:01.221113000 +0300
98++++ trunk/src/nautilus-view.h 2012-03-07 11:58:58.938075362 +0300
99+@@ -365,6 +365,7 @@
100+
101+ /* NautilusView methods */
102+ const char * nautilus_view_get_view_id (NautilusView *view);
103++void nautilus_activate_search_save_as (NautilusView *view);
104+
105+ /* file operations */
106+ char * nautilus_view_get_backing_uri (NautilusView *view);
107
108=== modified file 'debian/patches/series'
109--- debian/patches/series 2012-03-05 18:48:13 +0000
110+++ debian/patches/series 2012-03-07 11:59:19 +0000
111@@ -12,5 +12,6 @@
112 14_bring_del_instead_ctrl_del.patch
113 15_use-ubuntu-help.patch
114 20_static_unity_quicklist.patch
115+21_save_search_on_toolbar.patch
116 git-0001-Workaround-focus-issues-on-typeahead.patch
117 zg_activity_logging.patch

Subscribers

People subscribed via source and target branches

to all changes: