GNOME Bugzilla – Bug 579987
Remove deprecated GTK+ symbols
Last modified: 2009-06-22 16:05:13 UTC
According to http://www.gnome.org/~fpeters/299.html PolicyKit-gnome (0.9.2) uses deprecated GTK+ symbols: GtkTooltipsData, gtk_action_block_activate_from, gtk_action_connect_proxy, gtk_action_unblock_activate_from, gtk_tooltips_data_get, gtk_tooltips_new, gtk_tooltips_set_tip $:andre\> grep -r GtkTooltipsData . ./polkit-gnome/polkit-gnome-toggle-action.c: GtkTooltipsData *ttd; ./polkit-gnome/polkit-gnome-action.c: GtkTooltipsData *ttd; $:andre\> grep -r gtk_action_block_activate_from . ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_action_block_activate_from (GTK_ACTION (toggle_action), proxy); ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_action_block_activate_from (GTK_ACTION (action), proxy); ./polkit-gnome/polkit-gnome-action.c: gtk_action_block_activate_from (GTK_ACTION (action), button); $:andre\> grep -r gtk_action_connect_proxy . ./tools/polkit-gnome-authorization.c: gtk_action_connect_proxy (GTK_ACTION (read_action), read_all_auths); ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_action_connect_proxy (GTK_ACTION (action), button); ./polkit-gnome/polkit-gnome-action.c: gtk_action_connect_proxy (GTK_ACTION (action), button); $:andre\> grep -r gtk_action_unblock_activate_from . ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_action_unblock_activate_from (GTK_ACTION (toggle_action), proxy); ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_action_unblock_activate_from (GTK_ACTION (action), proxy); ./polkit-gnome/polkit-gnome-action.c: gtk_action_unblock_activate_from (GTK_ACTION (action), button); $:andre\> grep -r gtk_tooltips_data_get . ./polkit-gnome/polkit-gnome-toggle-action.c: ttd = gtk_tooltips_data_get (widget); ./polkit-gnome/polkit-gnome-action.c: ttd = gtk_tooltips_data_get (widget); $:andre\> grep -r gtk_tooltips_new . ./polkit-gnome/polkit-gnome-toggle-action.c: tips = gtk_tooltips_new (); ./polkit-gnome/polkit-gnome-action.c: tips = gtk_tooltips_new (); $:andre\> grep -r gtk_tooltips_set_tip . ./polkit-gnome/polkit-gnome-toggle-action.c: gtk_tooltips_set_tip (tips, widget, tip_str, tip_str); ./polkit-gnome/polkit-gnome-action.c: gtk_tooltips_set_tip (tips, widget, tip_str, tip_str);
André, I would like to take care of it, could you give some tips? I found that "GtkTooltip belongs to the new tooltips API that was introduced in GTK+ 2.12 and which deprecates the old GtkTooltips API". But gtk_action_block_activate_from, gtk_action_unblock_activate_from and gtk_action_connect_proxy not prompt deprecated in GTK+ reference.
Hi Bin Li, sure. Sorry for not having added these links directly when filing: General task: http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B Some API documentation: http://library.gnome.org/devel/gtk/stable/GtkTooltips.html#GtkTooltipsData http://library.gnome.org/devel/gtk/stable/GtkAction.html#gtk-action-block-activate-from http://library.gnome.org/devel/gtk/stable/GtkAction.html#gtk-action-connect-proxy http://library.gnome.org/devel/gtk/stable/GtkTooltips.html#gtk-tooltips-data-get
Bin Li, any progress here? Even if a patch only fixes some of the issues it is very welcome!
Created attachment 136641 [details] [review] dismiss the deprecated tooltips usage it's based on 0.9.2, don't use the deprecated GtkTooltips, GtkTooltipsData and gtk_tooltips_set_tip(). Use gtk_widget_set_tooltip_text() directly.
André, I still don't clearly know how to dismiss the gtk-action related function. I know about the GtkActivatable is implemented by GtkButton since 2.16, so below change should be do. gtk-action-connect-proxy (GTK_ACTION (action), button); ----> gtk_activatable_set_related_action (button, GTK_ACTION (action)); And gtk_action_block_activate_from and gtk_action_unblock_activate_from don't need any more. But I think maybe need more change that related to gtk_action_get_proxies, this function isn't deprecated. it returns the proxy widgets for an action. So could I thought the proxy widgets is GtkActivatable widgets, like GtkButton? And any other ideas? Thanks!
The client library is no longer present in the latest version that use polkit 1.0. So closing as OBSOLETE. Thanks for the effort anyway.