[pan] fix (post-ui): rm handle_box to fix missing widgets



commit d92dc16a046fe762bf07c37af108789ae069c41f
Author: Dominique Dumont <dod debian org>
Date:   Tue Oct 5 19:25:50 2021 +0200

    fix (post-ui): rm handle_box to fix missing widgets
    
    Closes #132
    
    The widget were missing only with Gtk3.
    
    From Gtk3 doc:
    
     GtkHandleBox has been deprecated. It is very specialized, lacks
     features to make it useful and most importantly does not fit well
     into modern application design. Do not use it. There is no
     replacement.
    
    So I have removed it.
    
    HandleBox usage was found with GTK debugger:
    
    GTK_DEBUG=interactive ./pan/gui/pan
    
    See https://people.gnome.org/~ebassi/docs/_build/Gtk/4.0/running.html
    for details
    
    Funny thing, with Gtk3, even if the buttons were hidden, clicking them
    did launch their callback ...

 pan/gui/post-ui.cc | 7 -------
 1 file changed, 7 deletions(-)
---
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index 33b8ea5..ba7a5e4 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -531,13 +531,6 @@ namespace
 
   void add_widget (GtkUIManager*, GtkWidget* widget, gpointer vbox)
   {
-    if (GTK_IS_TOOLBAR (widget)) {
-      GtkWidget * handle_box = gtk_handle_box_new ();
-      gtk_widget_show (handle_box);
-      gtk_container_add (GTK_CONTAINER (handle_box), widget);
-      g_signal_connect_swapped (widget, "destroy", G_CALLBACK (gtk_widget_destroy), handle_box);
-      widget = handle_box;
-    }
     gtk_box_pack_start (GTK_BOX(vbox), widget, false, false, 0);
   }
 }


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