[gnome-commander] Fix display of unmount widget via pixmap or label in the main window



commit e35fd22a41ce6b44909a587b9fc7c28ad6e3fbdf
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Jun 6 22:09:01 2021 +0200

    Fix display of unmount widget via pixmap or label in the main window

 src/gnome-cmd-main-win.cc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 0d0247542..657036e9e 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -152,7 +152,7 @@ static gint gnome_cmd_key_snooper(GtkWidget *grab_widget, GdkEventKey *event, Gn
     {
         return FALSE;
     }
-    
+
     if ((gnome_cmd_data.options.quick_search == GNOME_CMD_QUICK_SEARCH_JUST_A_CHARACTER) &&
         (state_is_ctrl (event->state) || state_is_ctrl_shift (event->state) || state_is_ctrl_alt_shift 
(event->state)
         || (state_is_alt (event->state) || state_is_alt_shift (event->state))
@@ -659,7 +659,7 @@ void GnomeCmdMainWin::update_drop_con_button(GnomeCmdFileList *fl)
     if (prev_pixmap)
     {
         gtk_widget_destroy (prev_pixmap);
-        prev_pixmap = NULL;
+        prev_pixmap = nullptr;
     }
 
     if (gnome_cmd_con_is_closeable (con))
@@ -680,7 +680,7 @@ void GnomeCmdMainWin::update_drop_con_button(GnomeCmdFileList *fl)
         {
             g_object_ref (pixmap);
             gtk_widget_show (pixmap);
-            gtk_container_add (GTK_CONTAINER (btn), pixmap);
+            gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON(btn), pixmap);
             prev_pixmap = pixmap;
         }
     }
@@ -691,7 +691,7 @@ void GnomeCmdMainWin::update_drop_con_button(GnomeCmdFileList *fl)
         {
             g_object_ref (label);
             gtk_widget_show (label);
-            gtk_container_add (GTK_CONTAINER (btn), label);
+            gtk_tool_button_set_label_widget(GTK_TOOL_BUTTON(btn), label);
             prev_pixmap = label;
         }
     }


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