forked from osmocom/wireshark
set_menu_sensitivity() is used only if MENUS_USE_UIMANAGER is defined,
so define it only if MENUS_USE_UIMANAGER is defined. Clean up indentation. svn path=/trunk/; revision=34109
This commit is contained in:
parent
9583a67e2d
commit
82ed2ba728
1 changed files with 10 additions and 7 deletions
17
gtk/menus.c
17
gtk/menus.c
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue