[gnome-usage] Fix search button activation
- From: Petr Štětka <pstetka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-usage] Fix search button activation
- Date: Thu, 9 Mar 2017 14:16:09 +0000 (UTC)
commit 4ab396a5c574d0e3ae4710407e165006d41019d4
Author: Petr Štětka <pstetka redhat com>
Date: Thu Mar 9 15:15:54 2017 +0100
Fix search button activation
src/header-bar.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/header-bar.vala b/src/header-bar.vala
index 9563d82..f1b6e71 100644
--- a/src/header-bar.vala
+++ b/src/header-bar.vala
@@ -12,6 +12,7 @@ namespace Usage
{
private Gtk.StackSwitcher stack_switcher;
private Gtk.ToggleButton? performance_search_button;
+ private bool active_performance_search_btn = false;
private Gtk.Button? storage_back_button;
private Gtk.Button? storage_rescan_button;
private bool show_storage_back_btn = false;
@@ -57,7 +58,9 @@ namespace Usage
show_stack_switcher();
performance_search_button = new Gtk.ToggleButton();
performance_search_button.set_image(new
Gtk.Image.from_icon_name("system-search-symbolic", Gtk.IconSize.BUTTON));
+ performance_search_button.set_active(active_performance_search_btn);
performance_search_button.toggled.connect(() => {
+ active_performance_search_btn = performance_search_button.active;
((PerformanceView) (GLib.Application.get_default() as
Application).get_window().get_views()[0]).set_search_mode(performance_search_button.active);
});
performance_search_button.show();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]