summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author张雯 <[email protected]>2018-02-13 15:06:07 +0800
committerraveit65 <[email protected]>2018-03-13 08:26:32 +0100
commitd8856945be447589fb4d01882a8befcf04582ebe (patch)
treea3b2f078fc432ddac127e6ea74454cf5af5f1cca /src
parentfcbee7f879675a8e8c0e728dc11e985df00f539f (diff)
downloadcaja-d8856945be447589fb4d01882a8befcf04582ebe.tar.bz2
caja-d8856945be447589fb4d01882a8befcf04582ebe.tar.xz
can selected all the search keywords with Ctrl+a.
Fixes #918
Diffstat (limited to 'src')
-rw-r--r--src/caja-navigation-window-pane.c2
-rw-r--r--src/caja-search-bar.c11
-rw-r--r--src/caja-search-bar.h3
3 files changed, 13 insertions, 3 deletions
diff --git a/src/caja-navigation-window-pane.c b/src/caja-navigation-window-pane.c
index 62e0f9a2..19c63d1f 100644
--- a/src/caja-navigation-window-pane.c
+++ b/src/caja-navigation-window-pane.c
@@ -784,7 +784,7 @@ caja_navigation_window_pane_setup (CajaNavigationWindowPane *pane)
pane->navigation_bar,
TRUE, TRUE, 0);
- pane->search_bar = caja_search_bar_new ();
+ pane->search_bar = caja_search_bar_new (CAJA_WINDOW_PANE (pane)->window);
g_signal_connect_object (pane->search_bar, "activate",
G_CALLBACK (search_bar_activate_callback), pane, 0);
g_signal_connect_object (pane->search_bar, "cancel",
diff --git a/src/caja-search-bar.c b/src/caja-search-bar.c
index af0531ea..6c5d221a 100644
--- a/src/caja-search-bar.c
+++ b/src/caja-search-bar.c
@@ -28,6 +28,7 @@
#include <eel/eel-gtk-macros.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+#include <libcaja-private/caja-clipboard.h>
struct CajaSearchBarDetails
{
@@ -212,11 +213,19 @@ caja_search_bar_return_entry (CajaSearchBar *bar)
}
GtkWidget *
-caja_search_bar_new (void)
+caja_search_bar_new (CajaWindow *window)
{
GtkWidget *bar;
+ CajaSearchBar *search_bar;
bar = g_object_new (CAJA_TYPE_SEARCH_BAR, NULL);
+ search_bar = CAJA_SEARCH_BAR(bar);
+
+ /* Clipboard */
+ caja_clipboard_set_up_editable
+ (GTK_EDITABLE (search_bar->details->entry),
+ caja_window_get_ui_manager (window),
+ TRUE);
return bar;
}
diff --git a/src/caja-search-bar.h b/src/caja-search-bar.h
index 35fce4d9..81af49cc 100644
--- a/src/caja-search-bar.h
+++ b/src/caja-search-bar.h
@@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <libcaja-private/caja-query.h>
+#include "caja-window.h"
#define CAJA_TYPE_SEARCH_BAR caja_search_bar_get_type()
#define CAJA_SEARCH_BAR(obj) \
@@ -57,7 +58,7 @@ typedef struct
} CajaSearchBarClass;
GType caja_search_bar_get_type (void);
-GtkWidget* caja_search_bar_new (void);
+GtkWidget* caja_search_bar_new (CajaWindow *window);
GtkWidget * caja_search_bar_borrow_entry (CajaSearchBar *bar);
void caja_search_bar_return_entry (CajaSearchBar *bar);