[gitg] Show the correct header bars buttons depending on the state



commit dd45e351b85095105db55ae0292feabc19eb1ecf
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Fri Dec 12 12:52:47 2014 +0100

    Show the correct header bars buttons depending on the state

 gitg/gitg-window.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gitg/gitg-window.vala b/gitg/gitg-window.vala
index 026407a..b00f054 100644
--- a/gitg/gitg-window.vala
+++ b/gitg/gitg-window.vala
@@ -854,13 +854,14 @@ public class Window : Gtk.ApplicationWindow, GitgExt.Application, Initable
                        }
 
                        var issel = (d_selectable_mode == GitgExt.SelectionMode.SELECTION);
+                       var searchable = current_activity as GitgExt.Searchable;
 
                        d_header_bar.show_close_button = !issel;
-                       d_search_button.visible = !issel;
+                       d_search_button.visible = !issel && searchable != null;
                        d_gear_menu.visible = !issel;
                        d_select_button.visible = !issel;
                        d_dash_button.visible = !issel;
-                       d_activities_switcher.visible = !issel;
+                       d_activities_switcher.visible = !issel && d_repository != null;
                        d_select_cancel_button.visible = issel;
 
                        d_select_button.active = issel;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]