GNOME Bugzilla – Bug 637268
port gthumb to GTK+3
Last modified: 2012-06-13 12:44:44 UTC
In the near future (e.g. in Fedora beginning with F15 in May 2011), GTK+3 will be available and lots of GNOME's base libraries (e.g. clutter-gtk, brasero etc.) will be linked against GTK+3. Since mixed linkage is highly discouraged ( http://library.gnome.org/devel/gtk/unstable/ch25s02.html#id1288469 ) gthumb can't use these libraries then (and will loose e.g. some features) or must be compiled against GTK+3 itself. I would assume that porting gthumb to GTK+3 seems to best way to go...
Hello there, I've just started working on this bug. I have published a git tree [0] with the working progress, I guess it's better than sending a lot of patches against this bug report. If you think I'm wrong, please let me know :) I don't have an extimative about how many work still needed, but I've made a lot of progress in a few hours of work. [0] http://git.comum.org/gitweb.cgi?p=lincoln/gthumb.git;a=shortlog;h=refs/heads/gtk3 ps.: The clone url is http://git.comum.org/lincoln/gthumb.git -- in the gtk3 branch
Lincoln, thanks for your work, but keep in mind that the next stable version (2.14) will still use gtk2, the porting you are doing will be merged in the next development cycle, anyway the remaining features to add to version 2.13 will not affect the current code but will be added as extensions, so your work will not be lost.
(In reply to comment #2) > Lincoln, > > thanks for your work, but keep in mind that the next stable version (2.14) will > still use gtk2, the porting you are doing will be merged in the next > development cycle, anyway the remaining features to add to version 2.13 will > not affect the current code but will be added as extensions, so your work will > not be lost. Thank you for pointing it up. With this tip, I'll rebase my working branch most fequently to make it easy to merge these changes in the next version.
gthumb 2.13 could be ported to gtk+ 2.24, which is the version that current distributions already use, and would make the porting to gtk+ 3.0 easier. Lincoln, if you are interested in a porting to gtk+ 2.24 please let me know, or I'll try make it when I'll have the time.
I've now pushed to master many of the commits of Lincoln's gtk3 branch, gthumb now compiles with gtk+ 2.24 with all the deprecations enabled, this will make the port to gtk+ 3 easier in the future.
git master will no longer compile on Fedora 14 (gtk2-2.22.0-1.fc14.1.x86_64). Is that intentional?
(In reply to comment #4) > gthumb 2.13 could be ported to gtk+ 2.24, which is the version that current > distributions already use, and would make the porting to gtk+ 3.0 easier. > > Lincoln, if you are interested in a porting to gtk+ 2.24 please let me know, or > I'll try make it when I'll have the time. I agree with that. So, I'll focus on getting gthumb compiling with the --enable-geseal and --disable-deprecated flags. Anyway, I have started to work on two specific things that can be applied in next releases: * using cairo for drawing instead of gdk_draw_* * replacing size_request by get_preferred_{width,height} ps.: I have also created another bug that would be good to be fixed to continue the work on this issue: #650117
(In reply to comment #6) > git master will no longer compile on Fedora 14 (gtk2-2.22.0-1.fc14.1.x86_64). > > Is that intentional? gtk+ 2.24 is now explicitly required in configure.ac, however I didn't try to compile it with gtk+ 2.22, you can try to change the minimum required version of gtk+ to 2.22 and see if it works.
(In reply to comment #7) > (In reply to comment #4) > > gthumb 2.13 could be ported to gtk+ 2.24, which is the version that current > > distributions already use, and would make the porting to gtk+ 3.0 easier. > > > > Lincoln, if you are interested in a porting to gtk+ 2.24 please let me know, or > > I'll try make it when I'll have the time. > > I agree with that. So, I'll focus on getting gthumb compiling with the > --enable-geseal and --disable-deprecated flags. > > Anyway, I have started to work on two specific things that can be applied in > next releases: > > * using cairo for drawing instead of gdk_draw_* gdk_draw_* functions are already gone, I did the work some time ago > * replacing size_request by get_preferred_{width,height} great, thank you.
No, it won't compile with gtk 2.22.x. You would need lots of #ifs like this: +#if GTK_CHECK_VERSION (2, 24, 0) gdk_x11_set_sm_client_id (xsmp->client_id); +#else + gdk_set_sm_client_id (xsmp->client_id); +#endif Also, the gtk_combo_box_text stuff would all have to be #if'd. Anyway, git master won't build on the major current distros... I don't know if that's a problem for you, but I won't be testing gThumb until after Fedora 15 in that case. - Mike
(In reply to comment #9) > (In reply to comment #7) > > (In reply to comment #4) > > > gthumb 2.13 could be ported to gtk+ 2.24, which is the version that current > > > distributions already use, and would make the porting to gtk+ 3.0 easier. > > > > > > Lincoln, if you are interested in a porting to gtk+ 2.24 please let me know, or > > > I'll try make it when I'll have the time. > > > > I agree with that. So, I'll focus on getting gthumb compiling with the > > --enable-geseal and --disable-deprecated flags. > > > > Anyway, I have started to work on two specific things that can be applied in > > next releases: > > > > * using cairo for drawing instead of gdk_draw_* Perfect :) > gdk_draw_* functions are already gone, I did the work some time ago > > > * replacing size_request by get_preferred_{width,height} > > great, thank you. There's other line in the todo list: Migrating the _expose_event methods by _draw ones
with this commit[0] gthumb compiles linking against gtk 2.24 with --enable-gseal and --disable-deprecated. I recommend a cherry pick :) [0] ec5f2f8b7d3293df673e1117e5eb28df3d26a0c7 http://git.comum.org/lincoln/gthumb.git (gtk3 branch)
(In reply to comment #10) > No, it won't compile with gtk 2.22.x. You would need lots of #ifs like this: > > +#if GTK_CHECK_VERSION (2, 24, 0) > gdk_x11_set_sm_client_id (xsmp->client_id); > +#else > + gdk_set_sm_client_id (xsmp->client_id); > +#endif > > > Also, the gtk_combo_box_text stuff would all have to be #if'd. > > Anyway, git master won't build on the major current distros... I don't know if > that's a problem for you, but I won't be testing gThumb until after Fedora 15 > in that case. > > - Mike that's not a big problem, you have to wait 11 days according to the fedora project site.
(In reply to comment #12) > with this commit[0] gthumb compiles linking against gtk 2.24 with > --enable-gseal and --disable-deprecated. I recommend a cherry pick :) > > [0] ec5f2f8b7d3293df673e1117e5eb28df3d26a0c7 > > http://git.comum.org/lincoln/gthumb.git (gtk3 branch) pushed to master now, thank you.
version 3.0 uses gtk+ 3