More GUIManager stuff.
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 3 May 2011 22:09:18 +0000 (22:09 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 3 May 2011 22:09:18 +0000 (22:09 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36982 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/conversations_ncp.c
gtk/conversations_rsvp.c
gtk/conversations_sctp.c
gtk/conversations_tcpip.c
gtk/conversations_tr.c
gtk/conversations_udpip.c
gtk/conversations_usb.c
gtk/conversations_wlan.c

index 8cbe3f85fb949902860ae24fb8e17682038521c3..f41039e6ded32eeec9d341aadf92cb7e55409d91 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -85,8 +85,25 @@ register_tap_listener_ncp_conversation(void)
 {
        register_stat_cmd_arg("conv,ncp", ncp_conversation_init,NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "NCP",                              /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "NCP",                              /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(ncp_endpoints_cb),       /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else    
        register_stat_menu_item("NCP", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            ncp_endpoints_cb, NULL, NULL, NULL);
+#endif
 
        register_conversation_table(FALSE, "NCP", "ncp_hdr", NULL /*filter*/, ncp_conversation_packet);
 }
index 12d233d192fe1923a0ca185c6d6fdbf856523162..0d1772a71d107535b166915bb5d96800504312de 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -85,9 +85,25 @@ register_tap_listener_rsvp_conversation(void)
 {
        register_stat_cmd_arg("conv,rsvp", rsvp_conversation_init,NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "RSVP",                             /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "RSVP",                             /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(rsvp_endpoints_cb),      /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else    
        register_stat_menu_item("RSVP", REGISTER_STAT_GROUP_CONVERSATION_LIST,
                               rsvp_endpoints_cb, NULL, NULL, NULL);
-
+#endif
        register_conversation_table(TRUE, "RSVP", "rsvp", NULL /*filter*/,
                                    rsvp_conversation_packet);
 }
index 44a7171330b582d747b0eb274c10d7596d28d35e..d51148a7c9f746c116dc47d3fe2b3098a0bf873b 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -94,8 +94,24 @@ register_tap_listener_sctp_conversation(void)
 {
        register_stat_cmd_arg("conv,sctp", sctp_conversation_init,NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "SCTP",                             /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "SCTP",                             /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(sctp_conversation_cb),   /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else  
        register_stat_menu_item("SCTP", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            sctp_conversation_cb, NULL, NULL, NULL);
-
+#endif
     register_conversation_table(FALSE, "SCTP", "sctp", NULL /*filter*/, sctp_conversation_packet);
 }
index 9f30b85aa6bc39408edd26a88ed762527bc09af9..dc40825741bd98f7369b76bcf4b5cc029e78ea48 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -84,8 +84,25 @@ register_tap_listener_tcpip_conversation(void)
 {
        register_stat_cmd_arg("conv,tcp", tcpip_conversation_init,NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "TCP (IPv4 & IPv6)",                /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "TCP (IPv4 & IPv6)",                /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(tcpip_conversation_cb),  /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else  
        register_stat_menu_item("TCP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            tcpip_conversation_cb, NULL, NULL, NULL);
+#endif
 
        register_conversation_table(FALSE, "TCP", "tcp", NULL /*filter*/, tcpip_conversation_packet);
 }
index 208d67255f02b86c4d4d95c50f22c54b5ee193f8..ceb6e729f0129fa46c586792c4e3250c6eed10b5 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -84,8 +84,24 @@ register_tap_listener_tr_conversation(void)
 {
        register_stat_cmd_arg("conv,tr", tr_conversation_init, NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "Token Ring",                       /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "Token Ring",                       /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(tr_conversation_cb),     /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else  
        register_stat_menu_item("Token Ring", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            tr_conversation_cb, NULL, NULL, NULL);
-
+#endif
     register_conversation_table(TRUE, "Token Ring", "tr", NULL /*filter*/, tr_conversation_packet);
 }
index d7d494073237f51767982017c63c227a329d3040..cb0568c49126dc008b0b412c1e5a6fe65041bd61 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -84,8 +84,24 @@ register_tap_listener_udpip_conversation(void)
 {
        register_stat_cmd_arg("conv,udp", udpip_conversation_init, NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "UDP (IPv4 & IPv6)",                /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "UDP (IPv4 & IPv6)",                /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(udpip_conversation_cb),  /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else  
        register_stat_menu_item("UDP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            udpip_conversation_cb, NULL, NULL, NULL);
-
+#endif
     register_conversation_table(FALSE, "UDP", "udp", NULL /*filter*/, udpip_conversation_packet);
 }
index ed440d1eaad578aa9049100732f68885e641c9c4..f37952e292fa61d94682e28ebf243750a1ccaa8c 100644 (file)
@@ -41,7 +41,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 usb_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip _U_)
@@ -81,8 +81,24 @@ register_tap_listener_usb_conversation(void)
 {
        register_stat_cmd_arg("conv,usb", usb_conversation_init, NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "USB",                              /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "USB",                              /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(usb_endpoints_cb),       /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else    
        register_stat_menu_item("USB", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            usb_endpoints_cb, NULL, NULL, NULL);
-
+#endif
        register_conversation_table(TRUE, "USB", "usb", NULL /*filter*/, usb_conversation_packet);
 }
index 3c5b2662fc11eff0aa307daa79298a17e7af394d..0affa99fabd416e1d246f7c7eee161304bc2b4c4 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "gtk/gui_stat_menu.h"
 #include "gtk/conversations_table.h"
-
+#include "gtk/stock_icons.h"
 
 static int
 wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
@@ -84,8 +84,24 @@ register_tap_listener_wlan_conversation(void)
 {
        register_stat_cmd_arg("conv,wlan", wlan_conversation_init,NULL);
 
+#ifdef MAIN_MENU_USE_UIMANAGER
+       register_stat_menu_item_stock(
+               REGISTER_STAT_GROUP_CONVERSATION_LIST,          /* Group */
+               "/Menubar/StatisticsMenu/ConversationListMenu/List-item", /* GUI path */
+               "WLAN",                             /* Name */
+               WIRESHARK_STOCK_CONVERSATIONS,      /* stock_id */
+               "WLAN",                             /* label */
+               NULL,                               /* accelerator */
+               NULL,                               /* tooltip */
+               G_CALLBACK(wlan_endpoints_cb),      /* callback */
+               TRUE,                               /* enabled */
+               NULL,                               /* selected_packet_enabled */
+               NULL,                               /* selected_tree_row_enabled */
+               NULL);                              /* callback_data */
+
+#else  
        register_stat_menu_item("WLAN", REGISTER_STAT_GROUP_CONVERSATION_LIST,
            wlan_endpoints_cb, NULL, NULL, NULL);
-
+#endif
        register_conversation_table(TRUE, "WLAN", "wlan", NULL /*filter*/, wlan_conversation_packet);
 }