After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 571384 - Deprecated GTK symbols usage
Deprecated GTK symbols usage
Status: RESOLVED FIXED
Product: dasher
Classification: Applications
Component: gtk
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Patrick Welche
Patrick Welche
Depends on:
Blocks: 585692
 
 
Reported: 2009-02-12 03:16 UTC by Thomas Andersen
Modified: 2009-08-07 21:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Replace GTK_CHECK_* with G_TYPE_* equivalents (3.85 KB, patch)
2009-02-24 22:50 UTC, Thomas Andersen
committed Details | Review
Replace deprected gtk stuff (2.78 KB, patch)
2009-03-04 01:22 UTC, Thomas Andersen
committed Details | Review

Description Thomas Andersen 2009-02-12 03:16:34 UTC
Greping for deprecated GTK/GDK/gdk-pixbuf symbols show the following use:

dasher/Src/Gtk2/CanvasExperimental.cpp:185:  gdk_pixbuf_render_to_drawable(display_pixbuf,m_pCanvas->window, graphics_context,0, 0,0,0, m_iWidth,m_iHeight,  GDK_RGB_DITHER_NORMAL,0,0);

dasher/Src/Gtk2/module_settings_window.h:33:#define MODULE_SETTINGS_WINDOW(obj)         (GTK_CHECK_CAST((obj), TYPE_MODULE_SETTINGS_WINDOW, ModuleSettingsWindow ))
dasher/Src/Gtk2/module_settings_window.h:34:#define MODULE_SETTINGS_WINDOW_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), TYPE_MODULE_SETTINGS_WINDOW, ModuleSettingsWindow ))
dasher/Src/Gtk2/module_settings_window.h:35:#define IS_MODULE_SETTINGS_WINDOW(obj)		(GTK_CHECK_TYPE ((obj), TYPE_MODULE_SETTINGS_WINDOW))
dasher/Src/Gtk2/module_settings_window.h:36:#define IS_MODULE_SETTINGS_WINDOW_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((klass), TYPE_MODULE_SETTINGS_WINDOW))
dasher/Src/Gtk2/dasher_main.cpp:537:  gtk_menu_item_remove_submenu(GTK_MENU_ITEM(glade_xml_get_widget(pPrivate->pGladeXML, "menuitem4")));
dasher/Src/Gtk2/dasher_main.cpp:538:  gtk_menu_item_remove_submenu(GTK_MENU_ITEM(glade_xml_get_widget(pPrivate->pGladeXML, "options1")));
dasher/Src/Gtk2/dasher_main.cpp:539:  gtk_menu_item_remove_submenu(GTK_MENU_ITEM(glade_xml_get_widget(pPrivate->pGladeXML, "menuitem7")));
dasher/Src/Gtk2/dasher_main.cpp:544:  gtk_menu_append(main_menu, file_menu_item);
dasher/Src/Gtk2/dasher_main.cpp:545:  gtk_menu_append(main_menu, options_menu_item);
dasher/Src/Gtk2/dasher_main.cpp:546:  gtk_menu_append(main_menu, help_menu_item);
dasher/Src/Gtk2/dasher_main.cpp:1259:  int iNewValue( static_cast<int>(round(gtk_spin_button_get_value_as_float(GTK_SPIN_BUTTON(pPrivate->pSpeedBox)) * 100)));
dasher/Src/Gtk2/GtkDasherControl.h:28:#define GTK_DASHER_CONTROL(obj)         (GTK_CHECK_CAST((obj), TYPE_GTK_DASHER_CONTROL, GtkDasherControl ))
dasher/Src/Gtk2/GtkDasherControl.h:29:#define GTK_DASHER_CONTROL_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), TYPE_GTK_DASHER_CONTROL, GtkDasherControlClass ))
dasher/Src/Gtk2/GtkDasherControl.h:30:#define IS_GTK_DASHER_CONTROL(obj)		(GTK_CHECK_TYPE ((obj), TYPE_GTK_DASHER_CONTROL))
dasher/Src/Gtk2/GtkDasherControl.h:31:#define IS_GTK_DASHER_CONTROL_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((klass), TYPE_GTK_DASHER_CONTROL))
dasher/Src/Gtk2/game_mode_helper.h:14:#define GAME_MODE_HELPER(obj)         (GTK_CHECK_CAST((obj), TYPE_GAME_MODE_HELPER, GameModeHelper ))
dasher/Src/Gtk2/game_mode_helper.h:15:#define GAME_MODE_HELPER_CLASS(klass)	(GTK_CHECK_CLASS_CAST ((klass), TYPE_GAME_MODE_HELPER, GameModeHelper ))
dasher/Src/Gtk2/game_mode_helper.h:16:#define IS_GAME_MODE_HELPER(obj)		(GTK_CHECK_TYPE ((obj), TYPE_GAME_MODE_HELPER))
dasher/Src/Gtk2/game_mode_helper.h:17:#define IS_GAME_MODE_HELPER_CLASS(klass)	(GTK_CHECK_CLASS_TYPE ((klass), TYPE_GAME_MODE_HELPER))
dasher/Data/glade/dasher.fullscreen.glade:291:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dasher.fullscreen.glade:470:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dasher.fullscreen.glade:509:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dasher.fullscreen.glade:548:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dasher.fullscreen.glade:587:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dasher.gameWIP.glade:882:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dasher.gameWIP.glade:919:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dasher.gameWIP.glade:956:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dasher.gameWIP.glade:993:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dasher.gameWIP.glade:1030:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dashermaemofullscreen.glade:318:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dashermaemofullscreen.glade:497:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dashermaemofullscreen.glade:536:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dashermaemofullscreen.glade:575:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dashermaemofullscreen.glade:614:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dasher.direct.glade:195:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dasher.direct.glade:234:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dasher.direct.glade:273:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dasher.direct.glade:312:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dasher.direct.glade:351:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dasher.compose.glade:764:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dasher.compose.glade:943:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dasher.compose.glade:982:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dasher.compose.glade:1021:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dasher.compose.glade:1060:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dasher.traditional.glade:649:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dasher.traditional.glade:688:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dasher.traditional.glade:727:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dasher.traditional.glade:766:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dasher.traditional.glade:805:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
dasher/Data/glade/dashermaemo.glade:288:<widget class="GtkFileSelection" id="open_fileselector">
dasher/Data/glade/dashermaemo.glade:467:<widget class="GtkFileSelection" id="save_fileselector">
dasher/Data/glade/dashermaemo.glade:506:<widget class="GtkFileSelection" id="append_fileselector">
dasher/Data/glade/dashermaemo.glade:545:<widget class="GtkFileSelection" id="import_fileselector">
dasher/Data/glade/dashermaemo.glade:584:<widget class="GtkFileSelection" id="save_and_quit_fileselector">
Comment 1 Thomas Andersen 2009-02-24 22:50:30 UTC
Created attachment 129435 [details] [review]
Replace GTK_CHECK_* with G_TYPE_* equivalents

Trivial replacements of GTK_CHECK_* with G_TYPE_* equivalents

Only fixes a part of this bug
Comment 2 André Klapper 2009-02-27 15:30:48 UTC
After pinging and writing emails without answers I simply started to commit several patches to dasher without waiting for maintainer feedback (see bug 572850 comment 4).
I'd say: Feel free to do the same and tell maintainers to blame me if anybody wants to have a battle.
Comment 3 Thomas Andersen 2009-03-02 00:31:45 UTC
Adding Patrick to CC as he was active in bug 572850. Okay to commit this (and future fixes) without notice? Is dasher unmaintained?
Comment 4 André Klapper 2009-03-02 01:30:58 UTC
Patrick sent me an email today - he will most probably take a look in the next days.
Comment 5 Patrick Welche 2009-03-03 15:41:07 UTC
Patch applied thanks. (and MAINTAINERS file changed ;-) )
Comment 6 Thomas Andersen 2009-03-03 16:05:57 UTC
Thanks Patrick.

Wrt the remaining deprecated stuff. How would you prefer patches? Smaller patches that cover a single topic (like the GTK_CHECK_* stuff) or bigger patches that cover many things?

(if I find the time to work more on this. No promises)
Comment 7 Patrick Welche 2009-03-03 16:24:20 UTC
Smaller patches are easier for me to review, then again given your Comment #3, I won't complain if you commit those changes directly.
Comment 8 Thomas Andersen 2009-03-04 01:22:42 UTC
Created attachment 129987 [details] [review]
Replace deprected gtk stuff

Fixes for more of the deprecated gtk symbols:
- gtk_menu_item_remove_submenu
- gtk_menu_append
- gtk_spin_button_get_value
- gdk_pixbuf_render_to_drawable
Comment 9 Thomas Andersen 2009-03-04 17:53:22 UTC
Patrick: okay to commit the patch? Asking since we are pretty close to 2.26.0 and this can wait if you plan to do a release for that.
Comment 10 Patrick Welche 2009-03-04 18:16:54 UTC
Now I'm confused: I looked at your patch and was about to apply it when I was called out to fix some breakage. I do plan to do a release for 2.26.0 - shouldn't this go in for it? (eg the gdk function above went out of fashion in 2.2? and computers around here seem to have 2.13?)

If can be applied for 2.26.0, then please apply it!
Comment 11 Thomas Andersen 2009-03-04 18:23:35 UTC
I was only considering that every change involves some risk of breaking something. I just wanted your okay before I made changes in your module this close to release time. These fixes are mostly just stuff that is #define'd to the new stuff anyway so should be pretty safe.

I will commit it tonight. Thanks :)
Comment 12 Patrick Welche 2009-03-04 18:27:50 UTC
Yes, and I had already read it ;-) Thanks!
Comment 13 Thomas Andersen 2009-03-04 19:18:47 UTC
Committed:
http://svn.gnome.org/viewvc/dasher?view=revision&revision=3651
Comment 14 André Klapper 2009-03-05 11:13:01 UTC
Well, that's all. Thanks. :)
Comment 15 Patrick Welche 2009-03-05 15:29:19 UTC
Sadly not yet! At least GtkFileSelection still to go :-/
Comment 16 Patrick Welche 2009-08-07 21:09:36 UTC
GtkFileSelection was mentioned but not used in the glade file which is now gone since #583517.