diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-06-19 14:49:12 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-06-19 14:49:12 +0000 |
commit | 5b64a10d18cd148a06214a981b60bd156843b3f7 (patch) | |
tree | 8910406299dd8a6a1797818247c81f8b2117eeae | |
parent | 260237201056812a5e83b03baf44170b64ddf9bc (diff) |
Get rid of the remnats of NEW_MENU_CODE.
It's probably not a good idea to read the menu bar code from file as it causes problems with permissions when Wireshark is run fom build dir.
svn path=/trunk/; revision=43367
-rw-r--r-- | ui/gtk/CMakeLists.txt | 2 | ||||
-rw-r--r-- | ui/gtk/main_menubar.c | 24 |
2 files changed, 1 insertions, 25 deletions
diff --git a/ui/gtk/CMakeLists.txt b/ui/gtk/CMakeLists.txt index 284c99adcd..6262bd6bf3 100644 --- a/ui/gtk/CMakeLists.txt +++ b/ui/gtk/CMakeLists.txt @@ -250,8 +250,6 @@ if (WANT_PACKET_EDITOR) ) endif() -# add_definitions(-DNEW_MENU_CODE) - if(WIN32) set(PLATFORM_UI_SRC capture_if_details_dlg_win32.c diff --git a/ui/gtk/main_menubar.c b/ui/gtk/main_menubar.c index b0b6e3471c..93e56a11f5 100644 --- a/ui/gtk/main_menubar.c +++ b/ui/gtk/main_menubar.c @@ -168,18 +168,6 @@ File/Close: the Gnome HIG suggests putting this item just above the Quit currently opened/captured file only. */ -#ifdef NEW_MENU_CODE -static gchar * -get_ui_file_path(const char *filename) -{ - gchar *gui_desc_file_name; - - gui_desc_file_name = g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s" G_DIR_SEPARATOR_S "%s", get_datafile_dir(), - running_in_build_directory() ? "ui/gtk/ui" : "ui", filename); - return gui_desc_file_name; -} -#endif - typedef enum { CONV_ETHER = 1, CONV_IP, @@ -984,7 +972,6 @@ help_menu_SampleCaptures_cb(GtkAction *action _U_, gpointer user_data _U_) topic_menu_cb( NULL/* widget_U_ */, NULL /*GdkEventButton *event _U_*/, GINT_TO_POINTER(ONLINEPAGE_SAMPLE_FILES)); } -#ifndef NEW_MENU_CODE static const char *ui_desc_menubar = "<ui>\n" " <menubar name ='Menubar'>\n" @@ -1367,7 +1354,7 @@ static const char *ui_desc_menubar = " </menu>\n" " </menubar>\n" "</ui>\n"; -#endif + /* @@ -3259,9 +3246,6 @@ menus_init(void) { GError *error = NULL; guint merge_id; -#ifdef NEW_MENU_CODE - gchar* gui_desc_file_name_and_path; -#endif if (initialize) { initialize = FALSE; @@ -3432,14 +3416,8 @@ menus_init(void) { ui_manager_main_menubar = gtk_ui_manager_new (); gtk_ui_manager_insert_action_group (ui_manager_main_menubar, main_menu_bar_action_group, 0); -#ifndef NEW_MENU_CODE gtk_ui_manager_add_ui_from_string (ui_manager_main_menubar,ui_desc_menubar, -1, &error); -#else - gui_desc_file_name_and_path = get_ui_file_path("main-menubar-ui.xml"); - gtk_ui_manager_add_ui_from_file ( ui_manager_main_menubar, gui_desc_file_name_and_path, &error); - g_free (gui_desc_file_name_and_path); -#endif if (error != NULL) { fprintf (stderr, "Warning: building main menubar failed: %s\n", |