[gnome-system-monitor] Wire up search button
- From: Robert Roth <robertroth src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-system-monitor] Wire up search button
- Date: Thu, 1 Aug 2013 15:09:33 +0000 (UTC)
commit d60e02ef0690fafd1e99cba749cebc4945857f9e
Author: Stefano Facchini <stefano facchini gmail com>
Date: Thu Aug 1 11:02:07 2013 +0200
Wire up search button
And use for search the accelerator Control+F, stealing it from
openfiles action.
https://bugzilla.gnome.org/show_bug.cgi?id=705270
data/interface.ui | 1 +
data/menus.ui | 1 -
src/interface.cpp | 4 ++++
src/procman-app.cpp | 2 +-
4 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/data/interface.ui b/data/interface.ui
index 05c7b1a..d15bfef 100644
--- a/data/interface.ui
+++ b/data/interface.ui
@@ -43,6 +43,7 @@
<child>
<object class="GtkToggleButton" id="search_button">
<property name="visible">True</property>
+ <property name="action_name">win.search</property>
<style>
<class name="image-button"/>
</style>
diff --git a/data/menus.ui b/data/menus.ui
index c228b73..844e86c 100644
--- a/data/menus.ui
+++ b/data/menus.ui
@@ -140,7 +140,6 @@
<item>
<attribute name="label" translatable="yes" comments="Translators: this means 'Files that are open'
(open is not a verb here)">Open _Files</attribute>
<attribute name="action">win.open-files</attribute>
- <attribute name="accel"><Primary>f</attribute>
</item>
</section>
<section>
diff --git a/src/interface.cpp b/src/interface.cpp
index 0ef6710..8f76978 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -92,6 +92,8 @@ create_proc_view(ProcmanApp *app, GtkBuilder * builder)
G_CALLBACK (window_key_press_event_cb), search_bar);
g_signal_connect (app->search_entry, "changed", G_CALLBACK (search_text_changed), app);
+
+ g_object_bind_property (app->search_button, "active", search_bar, "search-mode-enabled",
G_BINDING_BIDIRECTIONAL);
}
void
@@ -612,6 +614,7 @@ create_main_window (ProcmanApp *app)
GActionEntry win_action_entries[] = {
{ "about", on_activate_about, NULL, NULL, NULL },
+ { "search", on_activate_toggle, NULL, "false", NULL },
{ "send-signal-stop", on_activate_send_signal, "i", NULL, NULL },
{ "send-signal-cont", on_activate_send_signal, "i", NULL, NULL },
{ "send-signal-end", on_activate_send_signal, "i", NULL, NULL },
@@ -707,6 +710,7 @@ update_sensitivity(ProcmanApp *app)
"process-properties" };
const char * const processes_actions[] = { "refresh",
+ "search",
"show-whose-processes",
"show-dependencies" };
diff --git a/src/procman-app.cpp b/src/procman-app.cpp
index f27141e..b522ba5 100644
--- a/src/procman-app.cpp
+++ b/src/procman-app.cpp
@@ -625,7 +625,7 @@ void ProcmanApp::on_startup()
add_accelerator("<Primary>e", "win.send-signal-end", g_variant_new_int32(SIGTERM));
add_accelerator("<Primary>k", "win.send-signal-kill", g_variant_new_int32 (SIGKILL));
add_accelerator("<Primary>m", "win.memory-maps", NULL);
- add_accelerator("<Primary>f", "win.open-files", NULL);
+ add_accelerator("<Primary>f", "win.search", NULL);
Gtk::Window::set_default_icon_name ("utilities-system-monitor");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]