set_menu_sensitivity() is used only if MENUS_USE_UIMANAGER is defined,
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Sep 2010 22:36:52 +0000 (22:36 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 12 Sep 2010 22:36:52 +0000 (22:36 +0000)
so define it only if MENUS_USE_UIMANAGER is defined.

Clean up indentation.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34109 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/menus.c

index aba3f8e9471dea2bd2a177fa219838f4ab220ac9..73ddd81f852c7ba8ded207888db25b15ee666d33 100644 (file)
@@ -137,7 +137,9 @@ static void merge_all_tap_menus(GList *node);
 static void clear_menu_recent_capture_file_cmd_cb(GtkWidget *w, gpointer unused _U_);
 
 static void menus_init(void);
+#ifdef MENUS_USE_UIMANAGER
 static void set_menu_sensitivity (GtkUIManager *ui_manager, const gchar *, gint);
+#endif
 static void set_menu_sensitivity_old (GtkItemFactory *, const gchar *, gint);
 static void show_hide_cb(GtkWidget *w, gpointer data, gint action);
 static void timestamp_format_cb(GtkWidget *w, gpointer d, gint action);
@@ -2327,7 +2329,7 @@ void merge_all_tap_menus(GList *node) {
     g_free (sep_entry);
 }
 
-
+#ifdef MENUS_USE_UIMANAGER
 /*
  * Enable/disable menu sensitivity.
  */
@@ -2336,20 +2338,21 @@ set_menu_sensitivity(GtkUIManager *ui_manager, const gchar *path, gint val)
 {
     GtkAction *action;
 
-       action = gtk_ui_manager_get_action(ui_manager, path);
-       if(!action){
+    action = gtk_ui_manager_get_action(ui_manager, path);
+    if(!action){
         fprintf (stderr, "Warning: couldn't find action path= %s\n", 
                 path); 
                return;
-       }
+    }
 #if GLIB_CHECK_VERSION(2,6,0)
-       gtk_action_set_sensitive (action,
+    gtk_action_set_sensitive (action,
                val); /* TRUE to make the action sensitive */
 #else
-       Help, what now! :-)
+    Help, what now! :-)
 #endif
-
 }
+#endif /* MENUS_USE_UIMANAGER */
+
 /*
  * Enable/disable menu sensitivity.
  */