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 575016 - Remove deprecated GTK+ symbols
Remove deprecated GTK+ symbols
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
devel
Other Linux
: Normal enhancement
: ---
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks: 585692
 
 
Reported: 2009-03-12 01:48 UTC by André Klapper
Modified: 2019-03-20 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patches against c0bd0066adc968b29edb8e34cb1f2ddcee93faff to update deprecated API calls. (51.28 KB, patch)
2009-05-04 20:08 UTC, Adam Buchbinder
committed Details | Review
Patches against 52e3847256806f4a8c8d3416e2f0a5bc43035551 to update deprecated API calls. (107.40 KB, patch)
2009-07-28 19:50 UTC, Adam Buchbinder
committed Details | Review

Description André Klapper 2009-03-12 01:48:16 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B

GTK3 (March 2010) will not ship deprecated symbols anymore, and Dia uses a lot of them:

GTK_CHECK_CAST, GTK_CHECK_CLASS_CAST, GTK_CHECK_TYPE, GTK_CLASS_TYPE, GTK_CTREE_NODE_PREV, GTK_CTREE_ROW, GTK_SIGNAL_FUNC, GTK_SIGNAL_OFFSET, GdkDestroyNotify, GtkCListCompareFunc, GtkCListRow, GtkCTreeNode, GtkClassInitFunc, GtkDestroyNotify, GtkItemFactoryEntry, GtkObjectInitFunc, GtkSignalFunc, GtkType, GtkTypeInfo, gdk_bitmap_unref, gdk_color_alloc, gdk_color_black, gdk_color_white, gdk_draw_pixmap, gdk_drawable_unref, gdk_gc_unref, gdk_pixbuf_unref, gdk_pixmap_ref, gdk_pixmap_unref, gdk_rgb_get_cmap, gdk_rgb_init, gdk_window_get_size, gtk_box_pack_start_defaults, gtk_button_box_set_spacing, gtk_clist_append, gtk_clist_get_selection_info, gtk_clist_new, gtk_clist_set_compare_func, gtk_combo_new, gtk_combo_set_case_sensitive, gtk_combo_set_popdown_strings, gtk_container_children, gtk_ctree_expand, gtk_ctree_find_by_row_data, gtk_ctree_insert_node, gtk_ctree_new, gtk_ctree_node_get_row_data, gtk_ctree_node_get_text, gtk_ctree_node_nth, gtk_ctree_node_set_row_data, gtk_ctree_node_set_text, gtk_ctree_remove_node, gtk_ctree_set_node_info, gtk_ctree_sort_node, gtk_entry_set_editable, gtk_file_chooser_dialog_new_with_backend, gtk_file_selection_get_filename, gtk_file_selection_new, gtk_item_factory_create_items, gtk_item_factory_get_widget, gtk_item_factory_new, gtk_item_factory_set_translate_func, gtk_label_get, gtk_label_parse_uline, gtk_label_set, gtk_list_append_items, gtk_list_child_position, gtk_list_clear_items, gtk_list_insert_items, gtk_list_item_new_with_label, gtk_list_new, gtk_list_remove_items, gtk_list_select_child, gtk_list_select_item, gtk_list_set_selection_mode, gtk_list_unselect_all, gtk_list_unselect_child, gtk_menu_append, gtk_object_get_data, gtk_object_get_user_data, gtk_object_ref, gtk_object_set, gtk_object_set_data, gtk_object_set_data_full, gtk_object_set_user_data, gtk_object_sink, gtk_option_menu_get_menu, gtk_option_menu_new, gtk_option_menu_remove_menu, gtk_option_menu_set_history, gtk_option_menu_set_menu, gtk_pixmap_new, gtk_radio_button_group, gtk_radio_menu_item_group, gtk_rc_style_unref, gtk_signal_connect, gtk_signal_connect_object, gtk_signal_disconnect_by_data, gtk_signal_emit, gtk_signal_emit_by_name, gtk_signal_emit_stop_by_name, gtk_signal_new, gtk_spin_button_get_value_as_float, gtk_tooltips_new, gtk_tooltips_set_tip, gtk_type_class, gtk_type_new, gtk_type_unique, gtk_widget_draw, gtk_widget_ref, gtk_widget_set_usize, gtk_widget_unref
Comment 1 Hans Breuer 2009-03-12 19:53:36 UTC
Yes, and there are no plans to go to gkt+ 3.0 yet. 
So this is hardly a bug at all. Of course clean patches to 
remove some of the old widgets are appreciated.
Comment 2 Adam Buchbinder 2009-05-04 20:08:26 UTC
Created attachment 133955 [details] [review]
Patches against c0bd0066adc968b29edb8e34cb1f2ddcee93faff to update deprecated API calls.

The attached patch fixes twenty-one of the most trivial deprecated calls. The commit descriptions contain pointers to the API docs; I just looked up the calls and changed what was obvious.

I didn't reimplement anything that used deprecated object types, like GtkCList or GtkTooltips, and I didn't patch anything in app/sheets_dialog.[ch] because the notes in the file said not to.

You should be able to apply this set of patches with "git am".
Comment 3 André Klapper 2009-05-18 08:20:46 UTC
...so can the patch get a review?
Comment 4 Hans Breuer 2009-05-18 20:42:50 UTC
Patch looks basically ok, I'll commit next time working with the source. 
Just one thing: the change from gdk_draw_pixmap to gdk_draw_drawable
should also change the cast from GDK_PIXMAP to GDK_DRAWABLE
Comment 5 Hans Breuer 2009-05-24 13:12:04 UTC
Patch commited and converted sheets*.c to use GtkBuilder as well as got rid of GtkTooltips. For diagram_tree_* stuff I already have an almost working reimplmentation based on GtkTreeModel. But the rest remains todo:)
Comment 6 Adam Buchbinder 2009-07-28 19:50:23 UTC
Created attachment 139418 [details] [review]
Patches against 52e3847256806f4a8c8d3416e2f0a5bc43035551 to update deprecated API calls.

The attached patch fixes ten more of the simpler deprecated calls. (One commit contains two changes, for gtk_object_get_user_data() and gtk_object_set_user_data(), to avoid having an invalid state in the history.) The commit descriptions contain pointers to the API docs; I just looked up the
calls and changed what was somewhat obvious.

Again, I didn't reimplement anything that used deprecated object types, like GtkOptionMenu or GtkPixmap, and I didn't patch anything in app/sheets_dialog.[ch] because the notes in the file said not to.

I should note that I changed the *_user_data() calls to refer to a field called "user_data"; this is what's described in the GTK+ source. I'm not sure if this is a good or a bad idea, but as it stands now, it does exactly what it did before the change. Also, replacing some GTK+ calls with Glib calls means that some casts are, e.g., G_OBJECT(foo) rather than GTK_OBJECT(foo). I'm not sure if this is a problem; please let me know if it is--I'm referencing other patches used to get rid of deprecated functions.

You should be able to apply this set of patches with "git am".
Comment 7 Hans Breuer 2009-07-31 17:12:40 UTC
The G_OBJECT() cast is fine, I've added in places where it was missing to get rid of the warnings introduced.
Comment 8 GNOME Infrastructure Team 2019-03-20 11:43:38 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/253.