[dconf-editor] Remove the InvisibleButton.



commit 4e3135e7f1e0ab875da2f70ac02d9fbd0a999712
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Tue Feb 12 16:13:36 2019 +0100

    Remove the InvisibleButton.
    
    It is making impossible to double-
    click on headerbar for maximizing.
    
    Reported as #10.

 editor/large-pathbar.vala | 34 ----------------------------------
 1 file changed, 34 deletions(-)
---
diff --git a/editor/large-pathbar.vala b/editor/large-pathbar.vala
index 6d37972..312af6c 100644
--- a/editor/large-pathbar.vala
+++ b/editor/large-pathbar.vala
@@ -84,11 +84,6 @@ private class LargePathbar : Box, Pathbar
             return;
 
         _set_path (type, path);
-        if (invisible_button != null)
-        {
-            Variant variant = new Variant.string (complete_path);
-            ((!) invisible_button).set_detailed_action_name ("browser.open-search(" + variant.print (false) 
+ ")");
-        }
         update_active_button_cursor (type, ref active_button);
     }
     private void _set_path (ViewType type, string path)
@@ -104,12 +99,6 @@ private class LargePathbar : Box, Pathbar
         bool destroy_all = false;
         bool maintain_all = false;
         @foreach ((child) => {
-                if (child is InvisibleButton)
-                {
-                    child.destroy ();
-                    invisible_button = null;
-                    return;
-                }
 
                 if (child is Label)
                 {
@@ -170,7 +159,6 @@ private class LargePathbar : Box, Pathbar
             }
         }
 
-        add_invisible_button ();
         @foreach ((child) => child.show ());
     }
     private static inline void update_config_style_class (bool type_is_config, StyleContext context)
@@ -256,14 +244,6 @@ private class LargePathbar : Box, Pathbar
     * * widgets management
     \*/
 
-    InvisibleButton? invisible_button = null;
-
-    private void add_invisible_button ()
-    {
-        invisible_button = new InvisibleButton ();
-        add ((!) invisible_button);
-    }
-
     private void add_slash_label ()
     {
         add (new Label ("/"));
@@ -324,20 +304,6 @@ private class LargePathbar : Box, Pathbar
     }
 }
 
-private class InvisibleButton : Button
-{
-    construct
-    {
-        set_detailed_action_name ("browser.open-search('/')");
-        hexpand = true;
-        vexpand = true;
-        can_focus = false;
-        focus_on_click = false;
-        StyleContext context = get_style_context ();
-        context.add_class ("invisible");
-    }
-}
-
 [GtkTemplate (ui = "/ca/desrt/dconf-editor/ui/large-pathbar-item.ui")]
 private class LargePathbarItem : Button
 {


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