masneyb / gftp

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

More gtk2/gtk3 compatibility patches #83

Closed sedwards closed 4 years ago

sedwards commented 4 years ago

I have not noticed a regression when testing this under GTK2 but please feel free to point out of any of my understanding is totally wrong.

wdlkmpx commented 4 years ago

Define GTK_CAN_DEFAULT TRUE for gtk3 builds this is not mergeable, the code block does not apply to GTK3 and GTK_CAN_DEFAULT is replaced by gtk_widget_set_can_default ()

The 2nd commit does not have a proper title.. I can create individual commits with the proper --author if you want, I'm yet to test the changes..

wdlkmpx commented 4 years ago

I merged a revised version of 2 commits, but the GIOCondition stuff requires more thought and some code examples perhaps, I see this warning

gtkui.c:173:33: warning: passing argument 1 of ‘g_io_add_watch’ makes pointer from integer without a cast [-Wint-conversion]
       handler = g_io_add_watch (request->wakeup_main_thread[0],

I guess request->wakeup_main_thread should be a GIOChannel or something, which is created with a function.

gFTP supports 2 windows, FIle->Window 1/2

It's a bit confusing because I think people rarely use the 2nd window, which looks identical to window 1. And the threads stuff has something to do with it.

I see in the TODO file plans for a possible tabbed interface, the window 2 has something to do with it, but it brings more questions than answers.

sedwards commented 4 years ago

Thanks for correcting and merging in the useful parts. I will close the PR.