aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-08-31 08:59:09 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-08-31 08:59:09 +0000
commit48221f4dfda01b750f5d00548d8c37a578d3a53b (patch)
tree2d1843332ebb5ff72edd6b01b89fe448e29e1856
parent9deb73237081609b18fea6faee52314a0c1c2266 (diff)
Only load the menubar UI description from file.
Perhaps the treeview popup UI description should be loaded from file as well but currently I don't see the benefit. Feel free to ad back that code :-) The byte view UI description is so small so that's no use to load from file in my opinion. svn path=/trunk/; revision=38809
-rw-r--r--gtk/main_menubar.c14
-rw-r--r--gtk/ui/bytes-view-ui.xml12
-rw-r--r--gtk/ui/tree-view-ui.xml74
3 files changed, 4 insertions, 96 deletions
diff --git a/gtk/main_menubar.c b/gtk/main_menubar.c
index 99af9b09cc..6a9312afea 100644
--- a/gtk/main_menubar.c
+++ b/gtk/main_menubar.c
@@ -26,7 +26,6 @@
#endif
#ifdef MAIN_MENU_USE_UIMANAGER
-
#include <gtk/gtk.h>
#include <stdio.h>
@@ -2880,7 +2879,6 @@ static const GtkActionEntry packet_list_menu_popup_action_entries[] = {
};
-#ifndef NEW_MENU_CODE
static const char *ui_desc_tree_view_menu_popup =
"<ui>\n"
" <popup name='TreeViewPopup' action='PopupAction'>\n"
@@ -2952,7 +2950,6 @@ static const char *ui_desc_tree_view_menu_popup =
" <menuitem name='GotoCorrespondingPacket' action='/GotoCorrespondingPacket'/>\n"
" </popup>\n"
"</ui>\n";
-#endif
static const GtkActionEntry tree_view_menu_popup_action_entries[] = {
{ "/ExpandSubtrees", NULL, "Expand Subtrees", NULL, NULL, G_CALLBACK(expand_tree_cb) },
@@ -3020,7 +3017,6 @@ static const GtkActionEntry tree_view_menu_popup_action_entries[] = {
{ "/GotoCorrespondingPacket", NULL, "_Go to Corresponding Packet", NULL, NULL, G_CALLBACK(goto_framenum_cb) },
};
-#ifndef NEW_MENU_CODE
static const char *ui_desc_bytes_menu_popup =
"<ui>\n"
" <popup name='BytesMenuPopup' action='PopupAction'>\n"
@@ -3028,7 +3024,6 @@ static const char *ui_desc_bytes_menu_popup =
" <menuitem name='BitsView' action='/BitsView'/>\n"
" </popup>\n"
"</ui>\n";
-#endif
static const GtkRadioActionEntry bytes_menu_radio_action_entries [] =
{
@@ -3353,9 +3348,9 @@ menus_init(void) {
gtk_ui_manager_insert_action_group (ui_manager_tree_view_menu,
packet_list_details_action_group,
0); /* the position at which the group will be inserted. */
-#ifndef NEW_MENU_CODE
gtk_ui_manager_add_ui_from_string (ui_manager_tree_view_menu, ui_desc_tree_view_menu_popup, -1, &error);
-#else
+#if 0
+ /* If we want to load the treewiew popup UI description from file */
gui_desc_file_name_and_path = get_ui_file_path("tree-view-ui.xml");
gtk_ui_manager_add_ui_from_file ( ui_manager_tree_view_menu, gui_desc_file_name_and_path, &error);
g_free (gui_desc_file_name_and_path);
@@ -3393,9 +3388,9 @@ menus_init(void) {
gtk_ui_manager_insert_action_group (ui_manager_bytes_menu,
packet_list_byte_menu_action_group,
0); /* the position at which the group will be inserted. */
-#ifndef NEW_MENU_CODE
gtk_ui_manager_add_ui_from_string (ui_manager_bytes_menu, ui_desc_bytes_menu_popup, -1, &error);
-#else
+#if 0
+ /* If we want to load the bytesview poupup UI description from file */
gui_desc_file_name_and_path = get_ui_file_path("bytes-view-ui.xml");
gtk_ui_manager_add_ui_from_file ( ui_manager_bytes_menu, gui_desc_file_name_and_path, &error);
g_free (gui_desc_file_name_and_path);
@@ -3450,7 +3445,6 @@ menus_init(void) {
#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_warning("gui_desc_file_name_and_path %s",gui_desc_file_name_and_path);
g_free (gui_desc_file_name_and_path);
#endif
if (error != NULL)
diff --git a/gtk/ui/bytes-view-ui.xml b/gtk/ui/bytes-view-ui.xml
deleted file mode 100644
index cc3b011117..0000000000
--- a/gtk/ui/bytes-view-ui.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-$Id$
-xml description of Wireshark's byte view popup menu, loaded from main_menubar.c in the gtk directory.
--->
-<ui>
-
-<popup name="BytesMenuPopup" action="PopupAction">
- <menuitem name='HexView' action="/HexView"/>
- <menuitem name='BitsView' action="/BitsView"/>
-</popup>
-
-</ui>
diff --git a/gtk/ui/tree-view-ui.xml b/gtk/ui/tree-view-ui.xml
deleted file mode 100644
index 7489f68ef2..0000000000
--- a/gtk/ui/tree-view-ui.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--
-$Id$
-xml description of Wireshark's tree view popup menu, loaded from main_menubar.c in the gtk directory.
--->
-<ui>
- <popup name='TreeViewPopup' action='PopupAction'>
- <menuitem name='ExpandSubtrees' action='/ExpandSubtrees'/>
- <menuitem name='ExpandAll' action='/ExpandAll'/>
- <menuitem name='CollapseAll' action='/CollapseAll'/>
- <separator/>
- <menuitem name='ApplyasColumn' action='/Apply as Column'/>
- <separator/>
- <menu name= 'ApplyAsFilter' action='/Apply as Filter'>
- <menuitem name='Selected' action='/Apply as Filter/Selected'/>
- <menuitem name='NotSelected' action='/Apply as Filter/Not Selected'/>
- <menuitem name='AndSelected' action='/Apply as Filter/AndSelected'/>
- <menuitem name='OrSelected' action='/Apply as Filter/OrSelected'/>
- <menuitem name='AndNotSelected' action='/Apply as Filter/AndNotSelected'/>
- <menuitem name='OrNotSelected' action='/Apply as Filter/OrNotSelected'/>
- </menu>
- <menu name= 'PrepareaFilter' action='/Prepare a Filter'>
- <menuitem name='Selected' action='/Prepare a Filter/Selected'/>
- <menuitem name='NotSelected' action='/Prepare a Filter/Not Selected'/>
- <menuitem name='AndSelected' action='/Prepare a Filter/AndSelected'/>
- <menuitem name='OrSelected' action='/Prepare a Filter/OrSelected'/>
- <menuitem name='AndNotSelected' action='/Prepare a Filter/AndNotSelected'/>
- <menuitem name='OrNotSelected' action='/Prepare a Filter/OrNotSelected'/>
- </menu>
- <menu name= 'ColorizewithFilter' action='/Colorize with Filter'>
- <menuitem name='Color1' action='/Colorize with Filter/Color 1'/>
- <menuitem name='Color2' action='/Colorize with Filter/Color 2'/>
- <menuitem name='Color3' action='/Colorize with Filter/Color 3'/>
- <menuitem name='Color4' action='/Colorize with Filter/Color 4'/>
- <menuitem name='Color5' action='/Colorize with Filter/Color 5'/>
- <menuitem name='Color6' action='/Colorize with Filter/Color 6'/>
- <menuitem name='Color7' action='/Colorize with Filter/Color 7'/>
- <menuitem name='Color8' action='/Colorize with Filter/Color 8'/>
- <menuitem name='Color9' action='/Colorize with Filter/Color 9'/>
- <menuitem name='Color10' action='/Colorize with Filter/Color 10'/>
- <menuitem name='NewColoringRule' action='/Colorize with Filter/New Coloring Rule'/>
- </menu>
- <menuitem name='FollowTCPStream' action='/Follow TCP Stream'/>
- <menuitem name='FollowUDPStream' action='/Follow UDP Stream'/>
- <menuitem name='FollowSSLStream' action='/Follow SSL Stream'/>
- <separator/>
- <menu name= 'Copy' action='/Copy'>
- <menuitem name='Description' action='/Copy/Description'/>
- <menuitem name='Fieldname' action='/Copy/Fieldname'/>
- <menuitem name='Value' action='/Copy/Value'/>
- <separator/>
- <menuitem name='AsFilter' action='/Copy/AsFilter'/>
- <separator/>
- <menu name= 'Bytes' action='/Copy/Bytes'>
- <menuitem name='OffsetHexText' action='/Copy/Bytes/OffsetHexText'/>
- <menuitem name='OffsetHex' action='/Copy/Bytes/OffsetHex'/>
- <menuitem name='PrintableTextOnly' action='/Copy/Bytes/PrintableTextOnly'/>
- <separator/>
- <menuitem name='HexStream' action='/Copy/Bytes/HexStream'/>
- <menuitem name='BinaryStream' action='/Copy/Bytes/BinaryStream'/>
- </menu>
- </menu>
- <menuitem name='ExportSelectedPacketBytes' action='/ExportSelectedPacketBytes'/>
- <separator/>
- <menuitem name='WikiProtocolPage' action='/WikiProtocolPage'/>
- <menuitem name='FilterFieldReference' action='/FilterFieldReference'/>
- <menuitem name='ProtocolHelp' action='/ProtocolHelp'/>
- <menuitem name='ProtocolPreferences' action='/ProtocolPreferences'/>
- <separator/>
- <menuitem name='DecodeAs' action='/DecodeAs'/>
- <menuitem name='DisableProtocol' action='/DisableProtocol'/>
- <menuitem name='ResolveName' action='/ResolveName'/>
- <menuitem name='GotoCorrespondingPacket' action='/GotoCorrespondingPacket'/>
- </popup>
-</ui>