[master] 278adc0 - Fix "Gtk-CRITICAL messages from native file chooser" (#209)

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 278adc0 - Fix "Gtk-CRITICAL messages from native file chooser" (#209) "Albrecht Schlosser" 06:47 Apr 04 top right image
 
commit 278adc097c6471a32191bd16dab6a4955a79d67d
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Sun Apr 4 15:45:56 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Sun Apr 4 15:45:56 2021 +0200

    Fix "Gtk-CRITICAL messages from native file chooser" (#209)
    
    See GitHub Issue #209: https://github.com/fltk/fltk/issues/209
    
    Warning was: "Gtk-CRITICAL **: ... gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed
    
    Close #209

 src/Fl_Native_File_Chooser_GTK.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Fl_Native_File_Chooser_GTK.cxx src/Fl_Native_File_Chooser_GTK.cxx
index afee784..1087774 100644
--- src/Fl_Native_File_Chooser_GTK.cxx
+++ src/Fl_Native_File_Chooser_GTK.cxx
@@ -739,8 +739,8 @@ int Fl_GTK_Native_File_Chooser_Driver::fl_gtk_chooser_wrapper()
     fl_g_signal_connect_data((GtkFileChooser *)gtkw_ptr, "update-preview", G_CALLBACK(update_preview_cb), preview,
                              NULL, (GConnectFlags)0);
     GtkWidget *preview_button = fl_gtk_check_button_new_with_label(Fl_File_Chooser::preview_label);
-    fl_g_signal_connect_data(preview_button, "toggled", G_CALLBACK(preview_cb), gtkw_ptr, NULL, (GConnectFlags) 0);
     fl_gtk_toggle_button_set_active((GtkToggleButton *)preview_button, want_preview);
+    fl_g_signal_connect_data(preview_button, "toggled", G_CALLBACK(preview_cb), gtkw_ptr, NULL, (GConnectFlags) 0);
     fl_gtk_table_attach_defaults(table, preview_button, 0, 1, 0, 1);
 
     plus_button = fl_gtk_button_new_with_label("<--->");
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.