[nautilus-actions] gtk_action_get_tooltip(): use GTK_CHECK_VERSION macro



commit 14712696b8ae27e39475fddf733059bbedd5bdf8
Author: Pierre Wieser <pwieser trychlos org>
Date:   Sun Jan 2 15:02:07 2011 +0100

    gtk_action_get_tooltip(): use GTK_CHECK_VERSION macro

 ChangeLog                    |    3 ++-
 src/nact/nact-main-menubar.c |   16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 3802ed9..e04ca15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,7 +13,8 @@
 	* src/nact/nact-tree-model-dnd.c:
 	* src/nact/nact-gtk-utils.c:
 	* src/nact/nact-iaction-tab.c:
-	* src/nact/nact-main-statusbar.c: Use GTK_CHECK_VERSION macro.
+	* src/nact/nact-main-statusbar.c:
+	* src/nact/nact-main-menubar.c: Use GTK_CHECK_VERSION macro.
 
 	* configure.ac:
 	* m4/na-check-for-gtk.m4:
diff --git a/src/nact/nact-main-menubar.c b/src/nact/nact-main-menubar.c
index 26541cf..6b7053c 100644
--- a/src/nact/nact-main-menubar.c
+++ b/src/nact/nact-main-menubar.c
@@ -73,16 +73,16 @@ enum {
 };
 
 /* GtkActivatable
- * gtk_action_get_tooltip are only available starting with Gtk 2.16
+ * gtk_action_get_tooltip() is only available starting with Gtk 2.16
  * until this is a required level, we must have some code to do the
  * same thing
  */
-#undef GTK_HAS_ACTIVATABLE
-#if(( GTK_MAJOR_VERSION > 2 ) || ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 16 ))
-	#define GTK_HAS_ACTIVATABLE
+#undef NA_HAS_GTK_ACTIVATABLE
+#if GTK_CHECK_VERSION( 2,16,0 )
+	#define NA_HAS_GTK_ACTIVATABLE
 #endif
 
-#ifndef GTK_HAS_ACTIVATABLE
+#ifndef NA_HAS_GTK_ACTIVATABLE
 #define MENUBAR_PROP_ITEM_ACTION			"nact-menubar-item-action"
 #endif
 
@@ -627,7 +627,7 @@ on_menu_item_selected( GtkMenuItem *proxy, NactMainWindow *window )
 
 	tooltip = NULL;
 
-#ifdef GTK_HAS_ACTIVATABLE
+#ifdef NA_HAS_GTK_ACTIVATABLE
 	action = gtk_activatable_get_related_action( GTK_ACTIVATABLE( proxy ));
 	if( action ){
 		tooltip = ( gchar * ) gtk_action_get_tooltip( action );
@@ -643,7 +643,7 @@ on_menu_item_selected( GtkMenuItem *proxy, NactMainWindow *window )
 		nact_main_statusbar_display_status( window, MENUBAR_PROP_STATUS_CONTEXT, tooltip );
 	}
 
-#ifndef GTK_HAS_ACTIVATABLE
+#ifndef NA_HAS_GTK_ACTIVATABLE
 	g_free( tooltip );
 #endif
 }
@@ -693,7 +693,7 @@ on_proxy_connect( GtkActionGroup *action_group, GtkAction *action, GtkWidget *pr
 				"deselect",
 				G_CALLBACK( on_menu_item_deselected ));
 
-#ifndef GTK_HAS_ACTIVATABLE
+#ifndef NA_HAS_GTK_ACTIVATABLE
 		g_object_set_data( G_OBJECT( proxy ), MENUBAR_PROP_ITEM_ACTION, action );
 #endif
 	}



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