X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=cut-n-paste%2Ftoolbar-editor%2Fegg-editable-toolbar.c;h=5cf6c31ec619ea5a3c227b1f1da5c78a8ac9c7bf;hb=761de5f5ba44cc94c98adf2b68809ea453d6bdfa;hp=95b0adddf915cdee85495d8998a40a845ddbb5f5;hpb=09d18721e3015b9e4cc448f1f3620da54784ebba;p=evince.git diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index 95b0addd..5cf6c31e 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -200,7 +200,12 @@ drag_begin_cb (GtkWidget *widget, gtk_widget_hide (widget); - action = g_object_get_data (G_OBJECT (widget), "gtk-action"); +#if GTK_CHECK_VERSION (2, 16, 0) + action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget)); +#else +action = gtk_widget_get_action (widget); +#endif + if (action == NULL) return; flags = egg_toolbars_model_get_name_flags (etoolbar->priv->model, @@ -226,7 +231,12 @@ drag_end_cb (GtkWidget *widget, { gtk_widget_show (widget); - action = g_object_get_data (G_OBJECT (widget), "gtk-action"); +#if GTK_CHECK_VERSION (2, 16, 0) + action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (widget)); +#else + action = gtk_widget_get_action (widget); +#endif + if (action == NULL) return; flags = egg_toolbars_model_get_name_flags (etoolbar->priv->model, @@ -497,9 +507,14 @@ configure_item_cursor (GtkToolItem *item, static void configure_item_tooltip (GtkToolItem *item) { - GtkAction *action = g_object_get_data (G_OBJECT (item), - "gtk-action"); - + GtkAction *action; + +#if GTK_CHECK_VERSION (2, 16, 0) + action = gtk_activatable_get_related_action (GTK_ACTIVATABLE (item)); +#else + action = gtk_widget_get_action (GTK_WIDGET (item)); +#endif + if (action != NULL) { g_object_notify (G_OBJECT (action), "tooltip"); @@ -1808,7 +1823,7 @@ new_pixbuf_from_widget (GtkWidget *widget) } static GdkPixbuf * -new_separator_pixbuf () +new_separator_pixbuf (void) { GtkWidget *separator; GdkPixbuf *pixbuf;