On 2015-01-16 4:03 PM, Philippe Michel wrote: > On Fri, 16 Jan 2015, Michael Petch wrote: > >> If one looks closely at the the GTK code you'll also find it littered >> with #if (USE_GTKUIMANAGER) . This was to start migrating to GTK3 (was >> never finished). Those ifdefs are quite significant. For the menus and >> toolbars we were using deprecated GTK APIs. > > Could you summarize the issues with GTK3 ? I thought there remained > something related to list widgets and the lack of GL integration. >
I should point out that I didn't mean to imply that the GTKUIMANAGER was a hurdle to have things working on GTK3. I was referring to (at the time) that it was one of two major items that needed to be resolved just to eliminate the deprecated API calls we use. Where I left off in 2011 was (from memory): Building with -DGTK_DISABLE_DEPRECATED and -DGSEAL_ENABLE built clean except: 1) Gtk UIManager is all english (the translations have to be modified in such away that they are properly associated with the UIMANAGER). But it compiled clean. 2) GtkCList needs to be converted to use something like GtkTreeView. See https://developer.gnome.org/gtk2/2.24/GtkCList.html#GtkCList.description .I believe we only have one of these left and that is in the Game List (the pane that displays all the moves made in a game) I actually got a clean build with -DGTK_DISABLE_DEPRECATED and -DGSEAL_ENABLE at one point. One a virtual machine I have a version of the Game List pane where I removed GtkCList in favor of a number of GTKTreeView objects bundled into a pain. For the most part it worked with one glaring bug. The main window would resize itself when you clicked on an individual move and pulled up the analysis. Besides that it did work well (even better than the original). I seem to recall allowing keyboard navigation functioning as a side effect (There may have been a minor bug with the arrows as I recall but nothing substantial). I will dig up that code if someone is interested in looking at it. I remember working on it over the course of a weekend so the code itself may be rough around the edges. Likely by now there are more deprecated fetaures we need to work around as you may have encountered in what you mentioned later in your email. This isn't surprising since I haven't built with -DGTK_DISABLE_DEPRECATED and -DGSEAL_ENABLE in some time. Assuming that you can build cleanly with -DGTK_DISABLE_DEPRECATED and -DGSEAL_ENABLE the problems become more complex. 1) Worst one is that we require GtkGlExt to support 3D boards. GtkGlExt as far as I know is still not supported under Gtk3. So we may have to find some alternative to GtkGlExt. The work on this will definitely nt be trivial. It will be pretty involved. 2) I seem to recall we have some issues with Gdk and Cairo. Drawing on a cairo object is different. The amount of code we would be looking at changing isn't all that much. This issue is far less involved than #1. 3) Other more minor things across the code to get Gtk3 to work, including modifying our configure.ac accordingly. Somewhere along the line I commented out the code that had Gdk/Cairo issues and made some modifications across the code base and was able to build a 2D GTK3 release (using my updated Game List code). just to see if it would load. I do believe it did. If we exclude Board 3D I believe we are most of the way to getting support for Gtk3. > > gnubgstock.c:48:14: warning: 'gdk_pixbuf_new_from_inline' is deprecated > [-Wdeprecated-declarations] > pixbuf = gdk_pixbuf_new_from_inline(-1, inline_data, FALSE, NULL); > It looks as if we need to amend this code to use GResource instead. I'll have to investigate what it will take to convert this code. It is curious because I don't recall this being something I identified as being deprecated previously, although it is clear from 2.32.0 that is the case. What version of Gtk are you using (and what environment - OS/Distro and version)? -- Michael Petch GNU Backgammon Maintainer / Developer OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304 _______________________________________________ Bug-gnubg mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-gnubg
