[epiphany/wip/exalm/fullscreen: 2/2] action-bar-start: Hide new tab button in fullscreen



commit fd5cd7eefcc1f2a6b74cd806accc491573150220
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Sep 27 19:20:05 2019 +0500

    action-bar-start: Hide new tab button in fullscreen
    
    Ideally, there is a tab bar in fullscreen. However, since we don't have
    that, hide the button instead. This still leaves shortcuts though.

 src/ephy-action-bar-start.c | 7 +++++++
 src/ephy-action-bar-start.h | 2 ++
 src/ephy-header-bar.c       | 1 +
 3 files changed, 10 insertions(+)
---
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index 54b6839ad..b7270abdb 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -612,3 +612,10 @@ ephy_action_bar_start_change_combined_stop_reload_state (EphyActionBarStart *act
                                  _(REFRESH_BUTTON_TOOLTIP));
   }
 }
+
+void
+ephy_action_bar_set_new_tab_visible (EphyActionBarStart *action_bar_start,
+                                     gboolean            visible)
+{
+  gtk_widget_set_visible (action_bar_start->new_tab_button, visible);
+}
diff --git a/src/ephy-action-bar-start.h b/src/ephy-action-bar-start.h
index e64b8178a..2b458ccf0 100644
--- a/src/ephy-action-bar-start.h
+++ b/src/ephy-action-bar-start.h
@@ -33,5 +33,7 @@ EphyActionBarStart *ephy_action_bar_start_new                               (voi
 GtkWidget          *ephy_action_bar_start_get_navigation_box                (EphyActionBarStart 
*action_bar_start);
 void                ephy_action_bar_start_change_combined_stop_reload_state (EphyActionBarStart 
*action_bar_start,
                                                                              gboolean            loading);
+void                ephy_action_bar_set_new_tab_visible                     (EphyActionBarStart 
*action_bar_start,
+                                                                             gboolean            visible);
 
 G_END_DECLS
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index f62b110c5..95b85734d 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -124,6 +124,7 @@ fullscreen_changed (EphyHeaderBar *header_bar)
 
   gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header_bar), !fullscreen);
   gtk_widget_set_visible (header_bar->restore_button, fullscreen);
+  ephy_action_bar_set_new_tab_visible (header_bar->action_bar_start, !fullscreen);
 }
 
 static void


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