[epiphany/gnome-40] action-bar-start: Don't hide new tab button in fullscreen



commit 5c95b036470668c274443d7157ecf26b042fb6fd
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Mar 14 18:18:52 2021 +0000

    action-bar-start: Don't hide new tab button in fullscreen
    
    Since we show tabs now, the button should be visible too.
    
    
    (cherry picked from commit 40ca51980e35ed3e6123357c55d09c677738272f)

 src/ephy-action-bar-start.c | 16 +---------------
 src/ephy-action-bar-start.h |  2 --
 src/ephy-header-bar.c       |  1 -
 3 files changed, 1 insertion(+), 18 deletions(-)
---
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index 135e6ebe0..2cb1955d9 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -49,7 +49,6 @@ struct _EphyActionBarStart {
   GtkWidget *placeholder;
 
   guint navigation_buttons_menu_timeout;
-  gboolean is_fullscreen;
 };
 
 G_DEFINE_TYPE (EphyActionBarStart, ephy_action_bar_start, GTK_TYPE_BOX)
@@ -503,8 +502,7 @@ update_new_tab_button_visibility (EphyActionBarStart *action_bar_start)
 
   gtk_widget_set_visible (action_bar_start->new_tab_button,
                           (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_APPLICATION) &&
-                          !is_desktop_pantheon () &&
-                          !action_bar_start->is_fullscreen);
+                          !is_desktop_pantheon ());
 }
 
 static void
@@ -617,7 +615,6 @@ ephy_action_bar_start_class_init (EphyActionBarStartClass *klass)
 static void
 ephy_action_bar_start_init (EphyActionBarStart *action_bar_start)
 {
-  action_bar_start->is_fullscreen = FALSE;
 }
 
 EphyActionBarStart *
@@ -653,17 +650,6 @@ ephy_action_bar_start_change_combined_stop_reload_state (EphyActionBarStart *act
   }
 }
 
-void
-ephy_action_bar_set_is_fullscreen (EphyActionBarStart *action_bar_start,
-                                   gboolean            fullscreen)
-{
-  if (action_bar_start->is_fullscreen == fullscreen)
-    return;
-
-  action_bar_start->is_fullscreen = fullscreen;
-  update_new_tab_button_visibility (action_bar_start);
-}
-
 GtkWidget *
 ephy_action_bar_start_get_placeholder (EphyActionBarStart *action_bar_start)
 {
diff --git a/src/ephy-action-bar-start.h b/src/ephy-action-bar-start.h
index 1a4c106a9..ee6b20703 100644
--- a/src/ephy-action-bar-start.h
+++ b/src/ephy-action-bar-start.h
@@ -35,8 +35,6 @@ 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_is_fullscreen                       (EphyActionBarStart 
*action_bar_start,
-                                                                             gboolean            fullscreen);
 GtkWidget          *ephy_action_bar_start_get_placeholder                   (EphyActionBarStart 
*action_bar_start);
 
 void                ephy_action_bar_start_set_adaptive_mode                 (EphyActionBarStart *action_bar,
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 4d8e41176..057f4c696 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -140,7 +140,6 @@ fullscreen_changed_cb (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_is_fullscreen (header_bar->action_bar_start, fullscreen);
 
   if (fullscreen) {
     g_clear_handle_id (&header_bar->popover_hide_timeout_id, g_source_remove);


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