Don't use gtk_action_get_tooltip since it is GTK+ 2.16 only

This commit is contained in:
Christian Dywan 2009-10-01 23:19:01 +02:00
parent 2d1481699a
commit e4b09739fa

View file

@ -2524,15 +2524,16 @@ midori_browser_menu_item_select_cb (GtkWidget* menuitem,
MidoriBrowser* browser) MidoriBrowser* browser)
{ {
GtkAction* action = gtk_widget_get_action (menuitem); GtkAction* action = gtk_widget_get_action (menuitem);
const gchar* tooltip = action ? gtk_action_get_tooltip (action) : NULL; gchar* tooltip = action ? katze_object_get_string (action, "tooltip") : NULL;
if (!tooltip) if (!tooltip)
{ {
/* This is undocumented object data, used by KatzeArrayAction. */ /* This is undocumented object data, used by KatzeArrayAction. */
KatzeItem* item = g_object_get_data (G_OBJECT (menuitem), "KatzeItem"); KatzeItem* item = g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
if (item) if (item)
tooltip = katze_item_get_uri (item); tooltip = g_strdup (katze_item_get_uri (item));
} }
_midori_browser_set_statusbar_text (browser, tooltip); _midori_browser_set_statusbar_text (browser, tooltip);
g_free (tooltip);
} }
static void static void