try improve the "Time Display Format" submenu by sorting the items by "display length"
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 10 Feb 2009 21:22:24 +0000 (21:22 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 10 Feb 2009 21:22:24 +0000 (21:22 +0000)
add/change accelerator keys:
"Time Display Format" <control>1 - <control>6
"Resize All Columns" <shift><control>R
"First Packet" Home
"Last Packet" End
"Interfaces" <control>I
"Start" <control>E
"Restart" <control>R
"Enabled Protocols" <shift><control>R -> <shift><control>E

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27411 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/main_menu.c

index ecbab2a097c43e5c960b64812fbb7ab0c0bf51c2..20af498e74a53c59204d6653d8b64f35dc2c4092 100644 (file)
@@ -519,18 +519,18 @@ static GtkItemFactoryEntry menu_items[] =
     {"/View/Packet _Bytes", NULL, GTK_MENU_FUNC(show_hide_cb), SHOW_HIDE_BYTE_VIEW, "<CheckItem>", NULL,},
     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
     {"/View/_Time Display Format", NULL, NULL, 0, "<Branch>", NULL,},
-    {"/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb),
+    {"/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", "<control>1", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_ABSOLUTE_WITH_DATE, "<RadioItem>", NULL,},
-    {"/View/Time Display Format/Time of Day:   01:02:03.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb), 
+    {"/View/Time Display Format/Time of Day:   01:02:03.123456", "<control>2", GTK_MENU_FUNC(timestamp_format_cb), 
                         TS_ABSOLUTE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
-    {"/View/Time Display Format/Seconds Since Beginning of Capture:   123.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb),
+    {"/View/Time Display Format/Seconds Since Epoch (1970-01-01):   1234567890.123456", "<control>3", GTK_MENU_FUNC(timestamp_format_cb),
+                        TS_EPOCH, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
+    {"/View/Time Display Format/Seconds Since Beginning of Capture:   123.123456", "<control>4", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_RELATIVE, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
-    {"/View/Time Display Format/Seconds Since Previous Captured Packet:   1.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb),
+    {"/View/Time Display Format/Seconds Since Previous Captured Packet:   1.123456", "<control>5", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_DELTA, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
-    {"/View/Time Display Format/Seconds Since Previous Displayed Packet:   1.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb),
+    {"/View/Time Display Format/Seconds Since Previous Displayed Packet:   1.123456", "<control>6", GTK_MENU_FUNC(timestamp_format_cb),
                         TS_DELTA_DIS, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
-    {"/View/Time Display Format/Seconds Since Epoch (1970-01-01):   1234567890.123456", NULL, GTK_MENU_FUNC(timestamp_format_cb),
-                        TS_EPOCH, "/View/Time Display Format/Date and Time of Day:   1970-01-01 01:02:03.123456", NULL,},
     {"/View/Time Display Format/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
     {"/View/Time Display Format/Automatic (File Format Precision)", NULL, GTK_MENU_FUNC(timestamp_precision_cb),
                         TS_PREC_AUTO, "<RadioItem>", NULL,},
@@ -563,7 +563,7 @@ static GtkItemFactoryEntry menu_items[] =
                              0, "<StockItem>", GTK_STOCK_ZOOM_OUT,},
     {"/View/_Normal Size", "<control>equal", GTK_MENU_FUNC(view_zoom_100_cb),
                              0, "<StockItem>", GTK_STOCK_ZOOM_100,},
-    {"/View/Resize All Columns", NULL, GTK_MENU_FUNC(packet_list_resize_columns_cb),
+    {"/View/Resize All Columns", "<shift><control>R", GTK_MENU_FUNC(packet_list_resize_columns_cb),
                        0, "<StockItem>", WIRESHARK_STOCK_RESIZE_COLUMNS,},
     {"/View/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
     {"/View/E_xpand Subtrees", "<shift>Right", GTK_MENU_FUNC(expand_tree_cb), 0, NULL, NULL,},
@@ -622,21 +622,21 @@ static GtkItemFactoryEntry menu_items[] =
                              GTK_MENU_FUNC(packet_list_prev), 0, "<StockItem>", GTK_STOCK_GO_UP,},
     {"/Go/Next Packet", "<control>Down",
                              GTK_MENU_FUNC(packet_list_next), 0, "<StockItem>", GTK_STOCK_GO_DOWN,},
-    {"/Go/F_irst Packet", NULL,
+    {"/Go/F_irst Packet", "Home",
                              GTK_MENU_FUNC(goto_top_frame_cb), 0, "<StockItem>", GTK_STOCK_GOTO_TOP,},
-    {"/Go/_Last Packet", NULL,
+    {"/Go/_Last Packet", "End",
                              GTK_MENU_FUNC(goto_bottom_frame_cb), 0, "<StockItem>", GTK_STOCK_GOTO_BOTTOM,},
 #ifdef HAVE_LIBPCAP
     {"/_Capture", NULL, NULL, 0, "<Branch>", NULL,},
-    {"/Capture/_Interfaces...", NULL,
+    {"/Capture/_Interfaces...", "<control>I",
                              GTK_MENU_FUNC(capture_if_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_INTERFACES,},
     {"/Capture/_Options...", "<control>K",
                              GTK_MENU_FUNC(capture_prep_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_OPTIONS,},
-    {"/Capture/_Start", NULL,
+    {"/Capture/_Start", "<control>E",
                              GTK_MENU_FUNC(capture_start_cb), 0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_START,},
     {"/Capture/S_top", "<control>E", GTK_MENU_FUNC(capture_stop_cb),
                              0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_STOP,},
-    {"/Capture/_Restart", NULL, GTK_MENU_FUNC(capture_restart_cb),
+    {"/Capture/_Restart", "<control>R", GTK_MENU_FUNC(capture_restart_cb),
                              0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_RESTART,},
     {"/Capture/Capture _Filters...", NULL, GTK_MENU_FUNC(cfilter_dialog_cb),
                        0, "<StockItem>", WIRESHARK_STOCK_CAPTURE_FILTER,},
@@ -673,7 +673,7 @@ static GtkItemFactoryEntry menu_items[] =
     {"/Analyze/Prepare a Filter/... o_r not Selected", NULL, GTK_MENU_FUNC(match_selected_ptree_cb),
                        MATCH_SELECTED_OR_NOT, NULL, NULL,},
     {"/Analyze/<separator>", NULL, NULL, 0, "<Separator>", NULL,},
-    {"/Analyze/_Enabled Protocols...", "<shift><control>R", GTK_MENU_FUNC(proto_cb), 
+    {"/Analyze/_Enabled Protocols...", "<shift><control>E", GTK_MENU_FUNC(proto_cb), 
                        0, "<StockItem>", WIRESHARK_STOCK_CHECKBOX,},
     {"/Analyze/Decode _As...", NULL, GTK_MENU_FUNC(decode_as_cb),
                        0, "<StockItem>", WIRESHARK_STOCK_DECODE_AS,},