aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-07-14 20:36:00 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-07-14 20:36:00 +0000
commit1785a37ab41163ce63e00cee5979c40ad8684681 (patch)
tree0004c49c24f176ad5aef613598f3c1f6bed73f92
parent43806aff9d112c740a08edb963d7ab1220e1ab5c (diff)
Remove €˜GtkItemFactoryEntry code in MAIN_MENU_USE_UIMANAGER
code path. Don't build and don't use protocol help if MAIN_MENU_USE_UIMANAGER is defined. svn path=/trunk/; revision=38024
-rw-r--r--gtk/menus.c9
-rw-r--r--gtk/proto_help.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/gtk/menus.c b/gtk/menus.c
index 8ea0e0b013..dba471c3dc 100644
--- a/gtk/menus.c
+++ b/gtk/menus.c
@@ -3821,9 +3821,9 @@ menus_init(void) {
#ifndef MAIN_MENU_USE_UIMANAGER
/* Init with an empty recent files list */
clear_menu_recent_capture_file_cmd_cb(NULL, NULL);
-#endif /* MAIN_MENU_USE_UIMANAGER */
/* Protocol help links */
proto_help_menu_init(gtk_ui_manager_get_widget(ui_manager_tree_view_menu, "/TreeViewPopup"));
+#endif /* MAIN_MENU_USE_UIMANAGER */
}
}
@@ -4379,11 +4379,14 @@ static guint merge_tap_menus_layered(GList *node, gint group) {
static void merge_all_tap_menus(GList *node) {
+#ifdef MAIN_MENU_USE_UIMANAGER
+#else
GtkItemFactoryEntry *sep_entry;
sep_entry = g_malloc0(sizeof (GtkItemFactoryEntry));
sep_entry->item_type = "<Separator>";
sep_entry->path = "/Statistics/";
+#endif
#ifdef MAIN_MENU_USE_UIMANAGER
/* build the new menus */
#if 0
@@ -4431,8 +4434,10 @@ static void merge_all_tap_menus(GList *node) {
if (merge_tap_menus_layered(node, REGISTER_TOOLS_GROUP_UNSORTED)) {
/*gtk_item_factory_create_item(main_menu_factory, sep_entry, NULL, 2);*/
}
-
+#ifdef MAIN_MENU_USE_UIMANAGER
+#else
g_free (sep_entry);
+#endif
}
/*
diff --git a/gtk/proto_help.c b/gtk/proto_help.c
index b43ef99c05..e2b9c8e353 100644
--- a/gtk/proto_help.c
+++ b/gtk/proto_help.c
@@ -24,7 +24,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+/* Exlude the whole menu if MAIN_MENU_USE_UIMANAGER */
+#ifndef MAIN_MENU_USE_UIMANAGER
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -662,3 +663,4 @@ static void ph_logging_handler(const gchar *domain _U_, GLogLevelFlags level, co
}
}
#endif /* PH_DEBUG_LOG */
+#endif /* MAIN_MENU_USE_UIMANAGER */