libegg r937 - in trunk: . libegg/toolbareditor



Author: friemann
Date: Tue Apr  7 11:16:53 2009
New Revision: 937
URL: http://svn.gnome.org/viewvc/libegg?rev=937&view=rev

Log:
2009-04-07  Felix Riemann  <friemann svn gnome org>

	* libegg/toolbareditor/egg-editable-toolbar.c: (drag_begin_cb),
	(drag_end_cb), (configure_item_tooltip):
	Fix deprecated GTK+ symbols in the toolbareditor in a
	backwards compatible way. Fixes bug #578219.


Modified:
   trunk/ChangeLog
   trunk/libegg/toolbareditor/egg-editable-toolbar.c

Modified: trunk/libegg/toolbareditor/egg-editable-toolbar.c
==============================================================================
--- trunk/libegg/toolbareditor/egg-editable-toolbar.c	(original)
+++ trunk/libegg/toolbareditor/egg-editable-toolbar.c	Tue Apr  7 11:16:53 2009
@@ -200,7 +200,12 @@
 
   gtk_widget_hide (widget);
 
+#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 @@
     {
       gtk_widget_show (widget);
 
+#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,7 +507,13 @@
 static void
 configure_item_tooltip (GtkToolItem *item)
 {
-  GtkAction *action = gtk_widget_get_action (GTK_WIDGET (item));
+  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)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]