masneyb / gftp

gFTP is a free multithreaded file transfer client for *NIX based machines. 56 language translations available.
http://www.gftp.org
MIT License
116 stars 20 forks source link

RFC: gftp-gtk.c: CreateConnectToolbar instead of returning toolbar, return the gtk box itself #88

Closed sedwards closed 4 years ago

sedwards commented 4 years ago

I am not sure if this is a GTK3 regression, or if gtk2 was perhaps more forgiving, (and gtk3 is less so...) but with this patch I am much closer to having the full UI function as in the gtk2 case. Please see the attached screenshots for your review.

GTK3

gtk3

GTK2

gtk2
wdlkmpx commented 4 years ago

GtkHandleBox was deprecated in gtk 3.4, and it seems the gtk devs decided that it should no longer work. I've seen deprecated code sometimes causes crashes, segfaults, etc..

The GtkHandleBox widget allows a portion of a window to be "torn off". It is a bin widget which displays its child and a handle that the user can drag to tear off a separate window (the “float window”) containing the child widget.

Well it can be said that GTK1 and GTK2 supported some nice features are not allowed in GTK3.

I see this warning, I'll merge a revised patch, I'll think what to do.

gftp-gtk.c: In function ‘CreateConnectToolbar’:
/usr/include/glib-2.0/gobject/gtype.h:2207:12: warning: ‘toolbar’ is used uninitialized in this function [-Wuninitialized]
(gftp-gtk:8484): Gtk-CRITICAL **: IA__gtk_container_add: assertion 'GTK_IS_CONTAINER (container)' failed