2 * Routines for capture file summary window
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
34 #include <epan/strutil.h>
36 #include <wiretap/wtap.h>
38 #include "../globals.h"
40 #include "../summary.h"
41 #include "../capture-pcap-util.h"
43 #include "../capture.h"
44 #include "ui/gtk/main.h"
45 #include "ui/gtk/capture_globals.h"
48 #include "ui/gtk/summary_dlg.h"
49 #include "ui/gtk/dlg_utils.h"
50 #include "ui/gtk/gui_utils.h"
51 #include "ui/gtk/help_dlg.h"
52 #include "ui/gtk/menus.h"
54 #define SUM_STR_MAX 1024
55 #define FILTER_SNIP_LEN 50
56 #define SHB_STR_SNIP_LEN 50
60 add_string_to_table_sensitive(GtkWidget *list, guint *row, const gchar *title, const gchar *value, gboolean sensitive)
65 if(strlen(value) != 0) {
66 indent = g_strdup_printf(" %s", title);
68 indent = g_strdup(title);
70 label = gtk_label_new(indent);
71 if (strlen(value) == 0) {
72 gchar *message = g_strdup_printf("<span weight=\"bold\">%s</span>", title);
73 gtk_label_set_markup(GTK_LABEL(label), message);
77 gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
78 gtk_widget_set_sensitive(label, sensitive);
79 gtk_table_attach_defaults(GTK_TABLE(list), label, 0, 1, *row, *row+1);
81 label = gtk_label_new(value);
82 gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
83 gtk_widget_set_sensitive(label, sensitive);
84 gtk_table_attach_defaults(GTK_TABLE(list), label, 1, 2, *row, *row+1);
90 add_string_to_table(GtkWidget *list, guint *row, const gchar *title, const gchar *value)
92 add_string_to_table_sensitive(list, row, title, value, TRUE);
97 add_string_to_list(GtkWidget *list, const gchar *title, gchar *captured, gchar *displayed, gchar *marked)
99 simple_list_append(list, 0, title, 1, captured, 2, displayed, 3, marked, -1);
103 time_to_string(char *string_buff, gulong string_buff_size, time_t ti_time)
108 /* calling localtime() on MSVC 2005 with huge values causes it to crash */
109 /* XXX - find the exact value that still does work */
110 /* XXX - using _USE_32BIT_TIME_T might be another way to circumvent this problem */
111 if (ti_time > 2000000000) {
115 ti_tm = localtime(&ti_time);
117 g_snprintf(string_buff, string_buff_size, "Not representable");
120 g_snprintf(string_buff, string_buff_size,
121 "%04d-%02d-%02d %02d:%02d:%02d",
122 ti_tm->tm_year + 1900,
131 summary_comment_text_buff_save_cb(GtkWidget *w _U_, GtkWidget *view)
133 GtkTextBuffer *buffer;
134 GtkTextIter start_iter;
135 GtkTextIter end_iter;
136 gchar *new_comment = NULL;
138 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
139 gtk_text_buffer_get_start_iter (buffer, &start_iter);
140 gtk_text_buffer_get_end_iter (buffer, &end_iter);
142 new_comment = gtk_text_buffer_get_text (buffer, &start_iter, &end_iter, FALSE /* whether to include invisible text */);
144 /*g_warning("The new comment is '%s'",new_packet_comment);*/
146 summary_update_comment(&cfile, new_comment);
147 /* Mark the file as having unsaved changes; this causes a popup asking to save the file if we quit the file */
148 cfile.unsaved_changes = TRUE;
149 set_menus_for_capture_file(&cfile);
154 summary_comment_text_buff_clear_cb(GtkWidget *w _U_, GtkWidget *view)
156 GtkTextBuffer *buffer;
158 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
159 gtk_text_buffer_set_text (buffer, "", -1);
164 summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
166 summary_tally summary;
167 GtkWidget *sum_open_w,
168 *main_vb, *bbox, *close_bt, *help_bt;
169 GtkWidget *table, *scrolled_window;
170 GtkWidget *list, *treeview;
173 GtkCellRenderer *renderer;
174 GtkTreeViewColumn *column;
175 const char *dl_description;
176 static const char *titles[] = { "Traffic", "Captured", "Displayed", "Marked" };
178 gchar string_buff[SUM_STR_MAX];
179 gchar string_buff2[SUM_STR_MAX];
180 gchar string_buff3[SUM_STR_MAX];
181 gchar string_buff4[SUM_STR_MAX];
182 gchar string_buff5[SUM_STR_MAX];
186 double marked_seconds;
193 unsigned int elapsed_time;
197 /* initial computations */
198 summary_fill_in(&cfile, &summary);
200 summary_fill_in_capture(&cfile, &global_capture_opts, &summary);
203 * Note: the start and stop times are initialized to 0, so if we
204 * have zero or one packets of the type in question that have
205 * time stamps, the elapsed times will be zero, just as if we
206 * have both start and stop time stamps but they're the same.
207 * That means we can avoid some checks for whether we have more
208 * than one packet of the type in question with time stamps.
210 seconds = summary.stop_time - summary.start_time;
211 disp_seconds = summary.filtered_stop - summary.filtered_start;
212 marked_seconds = summary.marked_stop - summary.marked_start;
214 sum_open_w = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Summary");
216 /* Container for each row of widgets */
217 main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 12, FALSE);
218 gtk_container_set_border_width(GTK_CONTAINER(main_vb), 12);
219 gtk_container_add(GTK_CONTAINER(sum_open_w), main_vb);
222 table = gtk_table_new(1, 2, FALSE);
223 gtk_table_set_col_spacings(GTK_TABLE(table), 6);
224 gtk_table_set_row_spacings(GTK_TABLE(table), 3);
225 gtk_container_add(GTK_CONTAINER(main_vb), table);
230 add_string_to_table(table, &row, "File", "");
233 g_snprintf(string_buff, SUM_STR_MAX, "%s", summary.filename);
234 add_string_to_table(table, &row, "Name:", string_buff);
237 g_snprintf(string_buff, SUM_STR_MAX, "%" G_GINT64_MODIFIER "d bytes", summary.file_length);
238 add_string_to_table(table, &row, "Length:", string_buff);
241 g_snprintf(string_buff, SUM_STR_MAX, "%s%s",
242 wtap_file_type_string(summary.file_type),
243 summary.iscompressed? " (gzip compressed)" : "");
244 add_string_to_table(table, &row, "Format:", string_buff);
247 g_snprintf(string_buff, SUM_STR_MAX, "%s", wtap_encap_string(summary.encap_type));
248 add_string_to_table(table, &row, "Encapsulation:", string_buff);
250 if (summary.has_snap) {
251 /* snapshot length */
252 g_snprintf(string_buff, SUM_STR_MAX, "%u bytes", summary.snap);
253 add_string_to_table(table, &row, "Packet size limit:", string_buff);
256 /* Only allow editing of comment if filetype is PCAPNG */
257 if(summary.file_type == WTAP_FILE_PCAPNG){
259 GtkWidget *comment_vbox;
261 GtkTextBuffer *buffer = NULL;
262 const gchar *buf_str;
263 GtkWidget *ok_bt, *clear_bt;
265 frame = gtk_frame_new ("Capture comments");
266 gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
267 gtk_container_add (GTK_CONTAINER (main_vb), frame);
268 gtk_widget_show (frame);
270 comment_vbox = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 0, FALSE);
271 gtk_container_add (GTK_CONTAINER (frame), comment_vbox);
272 gtk_widget_show (comment_vbox);
274 view = gtk_text_view_new ();
275 buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
276 if(summary.opt_comment == NULL){
277 buf_str = g_strdup_printf("[None]");
279 buf_str = g_strdup_printf("%s", summary.opt_comment);
281 gtk_text_buffer_set_text (buffer, buf_str, -1);
282 gtk_container_add(GTK_CONTAINER(comment_vbox), view);
283 gtk_widget_show (view);
286 bbox = dlg_button_row_new (GTK_STOCK_OK, GTK_STOCK_CLEAR, NULL);
287 gtk_box_pack_end (GTK_BOX(comment_vbox), bbox, FALSE, FALSE, 0);
289 ok_bt = g_object_get_data (G_OBJECT(bbox), GTK_STOCK_OK);
290 g_signal_connect (ok_bt, "clicked", G_CALLBACK(summary_comment_text_buff_save_cb), view);
291 gtk_widget_set_sensitive (ok_bt, TRUE);
292 gtk_widget_set_tooltip_text(ok_bt,
293 "Updates the comment, you need to save the the capture file as well to save the updated comment");
296 clear_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLEAR);
297 g_signal_connect(clear_bt, "clicked", G_CALLBACK(summary_comment_text_buff_clear_cb), view);
298 gtk_widget_set_tooltip_text(clear_bt,
299 "Clears the text from the box, not the capture");
301 gtk_widget_grab_default (ok_bt);
304 if (summary.opt_comment != NULL) {
306 add_string_to_table(table, &row, "Comment:", summary.opt_comment);
311 * We must have no un-time-stamped packets (i.e., the number of
312 * time-stamped packets must be the same as the number of packets),
313 * and at least one time-stamped packet, in order for the start
314 * and stop times to be valid.
316 if (summary.packet_count_ts == summary.packet_count &&
317 summary.packet_count >= 1) {
319 add_string_to_table(table, &row, "", "");
320 add_string_to_table(table, &row, "Time", "");
323 time_to_string(string_buff, SUM_STR_MAX, (time_t)summary.start_time);
324 add_string_to_table(table, &row, "First packet:", string_buff);
327 time_to_string(string_buff, SUM_STR_MAX, (time_t)summary.stop_time);
328 add_string_to_table(table, &row, "Last packet:", string_buff);
331 * We must have at least two time-stamped packets for the elapsed time
334 if (summary.packet_count_ts >= 2) {
335 /* elapsed seconds */
336 elapsed_time = (unsigned int)summary.elapsed_time;
337 if(elapsed_time/86400) {
338 g_snprintf(string_buff, SUM_STR_MAX, "%02u days %02u:%02u:%02u",
339 elapsed_time/86400, elapsed_time%86400/3600, elapsed_time%3600/60, elapsed_time%60);
341 g_snprintf(string_buff, SUM_STR_MAX, "%02u:%02u:%02u",
342 elapsed_time%86400/3600, elapsed_time%3600/60, elapsed_time%60);
344 add_string_to_table(table, &row, "Elapsed:", string_buff);
349 add_string_to_table(table, &row, "", "");
350 add_string_to_table_sensitive(table, &row, "Capture", "", (summary.ifaces->len > 0));
351 if(summary.shb_hardware){
352 /* trucate the string to a reasonable length */
353 g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_hardware);
354 add_string_to_table(table, &row, "Capture HW:",string_buff);
357 /* trucate the strings to a reasonable length */
358 g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_os);
359 add_string_to_table(table, &row, "OS:", string_buff);
361 if(summary.shb_user_appl){
362 /* trucate the string to a reasonable length */
363 g_snprintf(string_buff, SHB_STR_SNIP_LEN, "%s",summary.shb_user_appl);
364 add_string_to_table(table, &row, "Capture application:", string_buff);
366 scrolled_window = gtk_scrolled_window_new (NULL, NULL);
367 gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);
368 gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
369 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
370 gtk_widget_set_size_request(scrolled_window, -1, 120);
372 treeview = gtk_tree_view_new();
373 renderer = gtk_cell_renderer_text_new();
374 column = gtk_tree_view_column_new_with_attributes("Interface", renderer, "text", 0, NULL);
375 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
376 renderer = gtk_cell_renderer_text_new();
377 column = gtk_tree_view_column_new_with_attributes("Dropped Packets", renderer, "text", 1, NULL);
378 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
379 renderer = gtk_cell_renderer_text_new();
380 column = gtk_tree_view_column_new_with_attributes("Capture Filter", renderer, "text", 2, NULL);
381 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
382 renderer = gtk_cell_renderer_text_new();
383 column = gtk_tree_view_column_new_with_attributes("Link type", renderer, "text", 3, NULL);
384 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
385 renderer = gtk_cell_renderer_text_new();
386 column = gtk_tree_view_column_new_with_attributes("Packet size limit", renderer, "text", 4, NULL);
387 gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column);
389 store = gtk_list_store_new(5, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
390 for (i = 0; i < summary.ifaces->len; i++) {
391 iface = g_array_index(summary.ifaces, iface_options, i);
394 g_snprintf(string_buff, SUM_STR_MAX, "%s", iface.descr);
395 } else if (iface.name) {
396 g_snprintf(string_buff, SUM_STR_MAX, "%s", iface.name);
398 g_snprintf(string_buff, SUM_STR_MAX, "unknown");
401 if (iface.drops_known) {
402 g_snprintf(string_buff2, SUM_STR_MAX, "%" G_GINT64_MODIFIER "u", iface.drops);
404 g_snprintf(string_buff2, SUM_STR_MAX, "unknown");
407 if (iface.cfilter && iface.cfilter[0] != '\0') {
408 g_snprintf(string_buff3, SUM_STR_MAX, "%s", iface.cfilter);
411 g_snprintf(string_buff3, SUM_STR_MAX, "none");
413 g_snprintf(string_buff3, SUM_STR_MAX, "unknown");
416 dl_description = wtap_encap_string(iface.linktype);
417 if (dl_description != NULL)
418 g_snprintf(string_buff4, SUM_STR_MAX, "%s", dl_description);
420 g_snprintf(string_buff4, SUM_STR_MAX, "DLT %d", iface.linktype);
422 g_snprintf(string_buff5, SUM_STR_MAX, "%u bytes", iface.snap);
423 gtk_list_store_append(store, &iter);
424 gtk_list_store_set(store, &iter, 0, string_buff, 1, string_buff2, 2, string_buff3, 3, string_buff4, 4, string_buff5,-1);
426 gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(store));
427 g_object_unref (store);
428 gtk_container_add(GTK_CONTAINER(scrolled_window), treeview);
429 gtk_container_add(GTK_CONTAINER(main_vb),scrolled_window);
430 gtk_widget_show_all (scrolled_window);
431 table = gtk_table_new(1, 2, FALSE);
432 gtk_table_set_col_spacings(GTK_TABLE(table), 6);
433 gtk_table_set_row_spacings(GTK_TABLE(table), 3);
434 gtk_container_add(GTK_CONTAINER(main_vb), table);
439 add_string_to_table(table, &row, "", "");
440 add_string_to_table(table, &row, "Display", "");
442 if (summary.dfilter) {
444 /* limit each row to some reasonable length */
445 str_dup = g_strdup_printf("%s", summary.dfilter);
446 str_work = g_strdup(str_dup);
449 while(strlen(str_work) > FILTER_SNIP_LEN) {
450 str_work[FILTER_SNIP_LEN] = '\0';
451 add_string_to_table(table, &row, (snip == 0) ? "Display filter:" : "", str_work);
453 offset+=FILTER_SNIP_LEN;
454 str_work = g_strdup(&str_dup[offset]);
458 add_string_to_table(table, &row, (snip == 0) ? "Display filter:" : "", str_work);
463 add_string_to_table(table, &row, "Display filter:", "none");
466 /* Ignored packet count */
467 g_snprintf(string_buff, SUM_STR_MAX, "%i", summary.ignored_count);
468 add_string_to_table(table, &row, "Ignored packets:", string_buff);
471 list = simple_list_new(4, titles);
472 gtk_container_add(GTK_CONTAINER(main_vb), list);
475 g_snprintf(string_buff, SUM_STR_MAX, "%i", summary.packet_count);
476 if (summary.dfilter) {
477 g_snprintf(string_buff2, SUM_STR_MAX, "%i", summary.filtered_count);
479 g_strlcpy(string_buff2, string_buff, SUM_STR_MAX);
481 g_snprintf(string_buff3, SUM_STR_MAX, "%i", summary.marked_count);
482 add_string_to_list(list, "Packets", string_buff, string_buff2, string_buff3);
484 /* Time between first and last */
486 g_snprintf(string_buff, SUM_STR_MAX, "%.3f sec", seconds);
488 string_buff[0] = '\0';
490 if (summary.dfilter && disp_seconds > 0) {
491 g_snprintf(string_buff2, SUM_STR_MAX, "%.3f sec", disp_seconds);
493 string_buff2[0] = '\0';
495 if (summary.marked_count && marked_seconds > 0) {
496 g_snprintf(string_buff3, SUM_STR_MAX, "%.3f sec", marked_seconds);
498 string_buff3[0] = '\0';
500 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
501 add_string_to_list(list, "Between first and last packet", string_buff, string_buff2, string_buff3);
503 /* Packets per second */
505 g_snprintf(string_buff, SUM_STR_MAX, "%.3f", summary.packet_count/seconds);
507 string_buff[0] = '\0';
509 if(summary.dfilter && disp_seconds > 0) {
510 g_snprintf(string_buff2, SUM_STR_MAX, "%.3f", summary.filtered_count/disp_seconds);
512 string_buff2[0] = '\0';
514 if(summary.marked_count && marked_seconds > 0) {
515 g_snprintf(string_buff3, SUM_STR_MAX, "%.3f", summary.marked_count/marked_seconds);
517 string_buff3[0] = '\0';
519 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
520 add_string_to_list(list, "Avg. packets/sec", string_buff, string_buff2, string_buff3);
523 if (summary.packet_count > 1) {
524 g_snprintf(string_buff, SUM_STR_MAX, "%.3f bytes",
525 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
526 (float) ((gint64) summary.bytes)/summary.packet_count);
528 string_buff[0] = '\0';
530 if (summary.dfilter && summary.filtered_count > 1) {
531 g_snprintf(string_buff2, SUM_STR_MAX, "%.3f bytes",
532 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
533 (float) ((gint64) summary.filtered_bytes)/summary.filtered_count);
535 string_buff2[0] = '\0';
537 if (summary.marked_count > 1) {
538 g_snprintf(string_buff3, SUM_STR_MAX, "%.3f bytes",
539 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
540 (float) ((gint64) summary.marked_bytes)/summary.marked_count);
542 string_buff3[0] = '\0';
544 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
545 add_string_to_list(list, "Avg. packet size", string_buff, string_buff2, string_buff3);
548 g_snprintf(string_buff, SUM_STR_MAX, "%" G_GINT64_MODIFIER "u", summary.bytes);
549 if (summary.dfilter && summary.filtered_count > 0) {
550 g_snprintf(string_buff2, SUM_STR_MAX, "%" G_GINT64_MODIFIER "u", summary.filtered_bytes);
552 string_buff2[0] = '\0';
554 if (summary.marked_count) {
555 g_snprintf(string_buff3, SUM_STR_MAX, "%" G_GINT64_MODIFIER "u", summary.marked_bytes);
557 string_buff3[0] = '\0';
559 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
560 add_string_to_list(list, "Bytes", string_buff, string_buff2, string_buff3);
562 /* Bytes per second */
564 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
565 g_snprintf(string_buff, SUM_STR_MAX, "%.3f", ((gint64) summary.bytes)/seconds);
567 string_buff[0] = '\0';
569 if (summary.dfilter && disp_seconds > 0) {
570 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
571 g_snprintf(string_buff2, SUM_STR_MAX, "%.3f", ((gint64) summary.filtered_bytes)/disp_seconds);
573 string_buff2[0] = '\0';
575 if (summary.marked_count && marked_seconds > 0) {
576 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
577 g_snprintf(string_buff3, SUM_STR_MAX, "%.3f", ((gint64) summary.marked_bytes)/marked_seconds);
579 string_buff3[0] = '\0';
581 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
582 add_string_to_list(list, "Avg. bytes/sec", string_buff, string_buff2, string_buff3);
584 /* MBit per second */
586 g_snprintf(string_buff, SUM_STR_MAX, "%.3f",
587 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
588 ((gint64) summary.bytes) * 8.0 / (seconds * 1000.0 * 1000.0));
590 string_buff[0] = '\0';
592 if (summary.dfilter && disp_seconds > 0) {
593 g_snprintf(string_buff2, SUM_STR_MAX, "%.3f",
594 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
595 ((gint64) summary.filtered_bytes) * 8.0 / (disp_seconds * 1000.0 * 1000.0));
597 string_buff2[0] = '\0';
599 if (summary.marked_count && marked_seconds > 0) {
600 g_snprintf(string_buff3, SUM_STR_MAX, "%.3f",
601 /* MSVC cannot convert from unsigned __int64 to float, so first convert to signed __int64 */
602 ((gint64) summary.marked_bytes) * 8.0 / (marked_seconds * 1000.0 * 1000.0));
604 string_buff3[0] = '\0';
606 if (string_buff[0] != '\0' || string_buff2[0] != '\0' || string_buff3[0] != '\0')
607 add_string_to_list(list, "Avg. MBit/sec", string_buff, string_buff2, string_buff3);
611 bbox = dlg_button_row_new(GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL);
612 gtk_container_add(GTK_CONTAINER(main_vb), bbox);
614 close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE);
615 window_set_cancel_button(sum_open_w, close_bt, window_cancel_button_cb);
617 help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP);
618 g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_SUMMARY_DIALOG);
620 gtk_widget_grab_focus(close_bt);
622 g_signal_connect(sum_open_w, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
624 gtk_widget_show_all(sum_open_w);
625 window_present(sum_open_w);