[gedit/zbrown/deteplification-src: 221/633] Window: fix some bottom panel issues




commit ed544fde095479485bf317b08b634c5c7e107afe
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Mar 19 15:31:50 2020 +0100

    Window: fix some bottom panel issues
    
    When pressing the keyboard shortcut to toggle the bottom panel
    visibility (Ctrl+F9), that keyboard shortcut didn't work (it did
    nothing) when the bottom panel was empty. Now it shows the empty panel.
    
    Also:
    Fixes https://gitlab.gnome.org/GNOME/gedit-plugins/issues/16

 gedit/gedit-window.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 67dd011d1..161535d1d 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -763,10 +763,6 @@ update_actions_sensitivity (GeditWindow *window)
        g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
                                     num_notebooks > 1);
 
-       action = g_action_map_lookup_action (G_ACTION_MAP (window), "bottom-panel");
-       g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
-                                    gtk_stack_get_visible_child (GTK_STACK (window->priv->bottom_panel)) != 
NULL);
-
        /* We disable File->Quit/SaveAll/CloseAll while printing to avoid to have two
           operations (save and print/print preview) that uses the message area at
           the same time (may be we can remove this limitation in the future) */
@@ -2481,8 +2477,7 @@ bottom_panel_item_added (GtkStack    *panel,
        n_children = g_list_length (children);
        g_list_free (children);
 
-       /* if it's the first item added, set the menu item
-        * sensitive and if needed show the panel */
+       /* First item added. */
        if (n_children == 1)
        {
                gboolean show;
@@ -2562,13 +2557,6 @@ init_panels_visibility (GeditWindow *window)
 
                g_free (panel_page);
        }
-       else
-       {
-               GAction *action;
-
-               action = g_action_map_lookup_action (G_ACTION_MAP (window), "bottom-panel");
-               g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
-       }
 
        /* start track sensitivity after the initial state is set */
        window->priv->bottom_panel_item_removed_handler_id =


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