From Jaap Keuter, fix for 871: split interface details statistics into it's own tab...
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 12 Apr 2006 20:58:20 +0000 (20:58 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 12 Apr 2006 20:58:20 +0000 (20:58 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@17850 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/capture_if_details_dlg.c

index 02e9b06f3d612e0da5b0378e0864dd7378e9bc61..1bc6664dbbae10a68f8236e8468b3a578ac66bf2 100644 (file)
@@ -1015,10 +1015,15 @@ capture_if_details_general(GtkWidget *table, GtkWidget *main_vb, guint *row, LPA
         g_snprintf(string_buff, DETAILS_STR_MAX, "-");
     }
     add_string_to_table(table, row, "Maximum Packet Size", string_buff);
+}
+
+
+static void
+capture_if_details_stats(GtkWidget *table, GtkWidget *main_vb, guint *row, LPADAPTER adapter) {
+    gchar           string_buff[DETAILS_STR_MAX];
+    unsigned int    uint_value;
 
 
-    /* Statistics */
-    add_string_to_table(table, row, "", "");
     add_string_to_table(table, row, "Statistics", "");
 
     if (wpcap_packet_request_uint(adapter, OID_GEN_XMIT_OK, &uint_value)) {
@@ -1181,7 +1186,7 @@ capture_if_details_open_win(char *iface)
 {
     GtkWidget   *details_open_w,
                 *main_vb, *bbox, *close_bt, *help_bt;
-    GtkWidget   *page_general, *page_802_3, *page_802_11;
+    GtkWidget   *page_general, *page_stats, *page_802_3, *page_802_11;
     GtkWidget   *page_lb;
     GtkWidget   *table, *notebook, *label;
     guint       row;
@@ -1211,6 +1216,13 @@ capture_if_details_open_win(char *iface)
     row = 0;
     capture_if_details_general(table, page_general, &row, adapter, iface);
 
+    /* Statistics page */
+    page_stats = capture_if_details_page_new(&table);
+    page_lb = gtk_label_new("Statistics");
+    gtk_notebook_append_page(GTK_NOTEBOOK(notebook), page_stats, page_lb);
+    row = 0;
+    capture_if_details_stats(table, page_stats, &row, adapter);
+
     /* 802.3 (Ethernet) page */
     page_802_3 = capture_if_details_page_new(&table);
     page_lb = gtk_label_new("802.3 (Ethernet)");