5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
35 #include <epan/epan.h>
36 #include <epan/filesystem.h>
37 #include <epan/epan_dissect.h>
38 #include <epan/expert.h>
39 #include <epan/prefs.h>
43 #include "../capture_opts.h"
44 #include "../capture_ui_utils.h"
46 #include "../capture.h"
49 #include "gtk/recent.h"
51 #include "gtk/main_statusbar.h"
52 #include "gtk/main_statusbar_private.h"
53 #include "gtk/gui_utils.h"
54 #include "gtk/gtkglobals.h"
55 #include "gtk/expert_comp_dlg.h"
56 #include "gtk/profile_dlg.h"
57 #include "gtk/main_welcome.h"
58 #include "gtk/expert_indicators.h"
61 * The order below defines the priority of info bar contexts.
73 #define DEF_READY_MESSAGE " Ready to load or capture"
75 #define DEF_READY_MESSAGE " Ready to load file"
79 static GtkWidget *status_pane_left, *status_pane_right;
80 static GtkWidget *info_bar, *info_bar_event, *packets_bar, *profile_bar, *profile_bar_event;
81 static GtkWidget *expert_info_error, *expert_info_warn, *expert_info_note;
82 static GtkWidget *expert_info_chat, *expert_info_none;
84 static guint main_ctx, file_ctx, help_ctx, filter_ctx, packets_ctx, profile_ctx;
85 static guint status_levels[NUM_STATUS_LEVELS];
86 static gchar *packets_str = NULL;
87 static gchar *profile_str = NULL;
90 static void info_bar_new(void);
91 static void packets_bar_new(void);
92 static void profile_bar_new(void);
93 static void status_expert_new(void);
95 /* Temporary message timeouts */
96 #define TEMPORARY_MSG_TIMEOUT (7 * 1000)
97 #define TEMPORARY_FLASH_TIMEOUT (1 * 1000)
98 #define TEMPORARY_FLASH_INTERVAL (TEMPORARY_FLASH_TIMEOUT / 4)
99 static gint flash_time;
100 static gboolean flash_highlight = FALSE;
103 * Push a message referring to file access onto the statusbar.
106 statusbar_push_file_msg(const gchar *msg)
110 /*g_warning("statusbar_push: %s", msg);*/
111 for (i = STATUS_LEVEL_FILE + 1; i < NUM_STATUS_LEVELS; i++) {
112 if (status_levels[i])
115 status_levels[STATUS_LEVEL_FILE]++;
117 gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, msg);
121 * Pop a message referring to file access off the statusbar.
124 statusbar_pop_file_msg(void)
126 /*g_warning("statusbar_pop");*/
127 if (status_levels[STATUS_LEVEL_FILE] > 0) {
128 status_levels[STATUS_LEVEL_FILE]--;
130 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
134 * Push a message referring to the currently-selected field onto the statusbar.
137 statusbar_push_field_msg(const gchar *msg)
141 for (i = STATUS_LEVEL_HELP + 1; i < NUM_STATUS_LEVELS; i++) {
142 if (status_levels[i])
145 status_levels[STATUS_LEVEL_HELP]++;
147 gtk_statusbar_push(GTK_STATUSBAR(info_bar), help_ctx, msg);
151 * Pop a message referring to the currently-selected field off the statusbar.
154 statusbar_pop_field_msg(void)
156 if (status_levels[STATUS_LEVEL_HELP] > 0) {
157 status_levels[STATUS_LEVEL_HELP]--;
159 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), help_ctx);
163 * Push a message referring to the current filter onto the statusbar.
166 statusbar_push_filter_msg(const gchar *msg)
170 for (i = STATUS_LEVEL_FILTER + 1; i < NUM_STATUS_LEVELS; i++) {
171 if (status_levels[i])
174 status_levels[STATUS_LEVEL_FILTER]++;
176 gtk_statusbar_push(GTK_STATUSBAR(info_bar), filter_ctx, msg);
180 * Pop a message referring to the current filter off the statusbar.
183 statusbar_pop_filter_msg(void)
185 if (status_levels[STATUS_LEVEL_FILTER] > 0) {
186 status_levels[STATUS_LEVEL_FILTER]--;
188 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), filter_ctx);
192 * Timeout callbacks for statusbar_push_temporary_msg
195 statusbar_remove_temporary_msg(gpointer data)
197 guint msg_id = GPOINTER_TO_UINT(data);
199 gtk_statusbar_remove(GTK_STATUSBAR(info_bar), main_ctx, msg_id);
205 statusbar_flash_temporary_msg(gpointer data _U_)
207 gboolean retval = TRUE;
209 if (flash_time > 0) {
210 flash_highlight = !flash_highlight;
212 flash_highlight = FALSE;
217 * As of 2.18.3 gtk_drag_highlight just draws a border around the widget
218 * so we can abuse it here.
220 if (flash_highlight) {
221 gtk_drag_highlight(info_bar);
223 gtk_drag_unhighlight(info_bar);
226 flash_time -= TEMPORARY_FLASH_INTERVAL;
232 * Push a temporary message onto the statusbar.
235 statusbar_push_temporary_msg(const gchar *msg)
239 msg_id = gtk_statusbar_push(GTK_STATUSBAR(info_bar), main_ctx, msg);
241 flash_time = TEMPORARY_FLASH_TIMEOUT - 1;
242 g_timeout_add(TEMPORARY_FLASH_INTERVAL, statusbar_flash_temporary_msg, NULL);
244 g_timeout_add(TEMPORARY_MSG_TIMEOUT, statusbar_remove_temporary_msg, GUINT_TO_POINTER(msg_id));
251 GtkWidget *status_hbox;
254 status_hbox = gtk_hbox_new(FALSE, 1);
255 gtk_container_set_border_width(GTK_CONTAINER(status_hbox), 0);
257 /* info (main) statusbar */
260 /* packets statusbar */
263 /* profile statusbar */
266 /* expert info indicator */
269 /* Pane for the statusbar */
270 status_pane_left = gtk_hpaned_new();
271 gtk_widget_show(status_pane_left);
272 status_pane_right = gtk_hpaned_new();
273 gtk_widget_show(status_pane_right);
279 statusbar_load_window_geometry(void)
281 if (recent.has_gui_geometry_status_pane && recent.gui_geometry_status_pane_left)
282 gtk_paned_set_position(GTK_PANED(status_pane_left), recent.gui_geometry_status_pane_left);
283 if (recent.has_gui_geometry_status_pane && recent.gui_geometry_status_pane_right)
284 gtk_paned_set_position(GTK_PANED(status_pane_right), recent.gui_geometry_status_pane_right);
288 statusbar_save_window_geometry(void)
290 recent.gui_geometry_status_pane_left = gtk_paned_get_position(GTK_PANED(status_pane_left));
291 recent.gui_geometry_status_pane_right = gtk_paned_get_position(GTK_PANED(status_pane_right));
296 * Helper for statusbar_widgets_emptying()
299 foreach_remove_a_child(GtkWidget *widget, gpointer data) {
300 gtk_container_remove(GTK_CONTAINER(data), widget);
304 statusbar_widgets_emptying(GtkWidget *statusbar)
306 g_object_ref(G_OBJECT(info_bar));
307 g_object_ref(G_OBJECT(info_bar_event));
308 g_object_ref(G_OBJECT(packets_bar));
309 g_object_ref(G_OBJECT(profile_bar));
310 g_object_ref(G_OBJECT(profile_bar_event));
311 g_object_ref(G_OBJECT(status_pane_left));
312 g_object_ref(G_OBJECT(status_pane_right));
313 g_object_ref(G_OBJECT(expert_info_error));
314 g_object_ref(G_OBJECT(expert_info_warn));
315 g_object_ref(G_OBJECT(expert_info_note));
316 g_object_ref(G_OBJECT(expert_info_chat));
317 g_object_ref(G_OBJECT(expert_info_none));
319 /* empty all containers participating */
320 gtk_container_foreach(GTK_CONTAINER(statusbar), foreach_remove_a_child, statusbar);
321 gtk_container_foreach(GTK_CONTAINER(status_pane_left), foreach_remove_a_child, status_pane_left);
322 gtk_container_foreach(GTK_CONTAINER(status_pane_right), foreach_remove_a_child, status_pane_right);
326 statusbar_widgets_pack(GtkWidget *statusbar)
328 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_error, FALSE, FALSE, 2);
329 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_warn, FALSE, FALSE, 2);
330 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_note, FALSE, FALSE, 2);
331 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_chat, FALSE, FALSE, 2);
332 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_none, FALSE, FALSE, 2);
333 gtk_box_pack_start(GTK_BOX(statusbar), status_pane_left, TRUE, TRUE, 0);
334 gtk_paned_pack1(GTK_PANED(status_pane_left), info_bar_event, FALSE, FALSE);
335 gtk_paned_pack2(GTK_PANED(status_pane_left), status_pane_right, TRUE, FALSE);
336 gtk_paned_pack1(GTK_PANED(status_pane_right), packets_bar, TRUE, FALSE);
337 gtk_paned_pack2(GTK_PANED(status_pane_right), profile_bar_event, FALSE, FALSE);
341 statusbar_widgets_show_or_hide(GtkWidget *statusbar)
344 * Show the status hbox if either:
346 * 1) we're showing the filter toolbar and we want it in the status
351 * 2) we're showing the status bar.
353 if ((recent.filter_toolbar_show && prefs.filter_toolbar_show_in_statusbar) ||
354 recent.statusbar_show) {
355 gtk_widget_show(statusbar);
357 gtk_widget_hide(statusbar);
360 if (recent.statusbar_show) {
361 gtk_widget_show(status_pane_left);
363 gtk_widget_hide(status_pane_left);
373 info_bar_event = gtk_event_box_new();
374 info_bar = gtk_statusbar_new();
375 gtk_container_add(GTK_CONTAINER(info_bar_event), info_bar);
376 main_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "main");
377 file_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "file");
378 help_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "help");
379 filter_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "filter");
380 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), FALSE);
381 gtk_statusbar_push(GTK_STATUSBAR(info_bar), main_ctx, DEF_READY_MESSAGE);
383 for (i = 0; i < NUM_STATUS_LEVELS; i++) {
384 status_levels[i] = 0;
387 gtk_widget_show(info_bar);
388 gtk_widget_show(info_bar_event);
392 packets_bar_new(void)
394 /* tip: tooltips don't work on statusbars! */
395 packets_bar = gtk_statusbar_new();
396 packets_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(packets_bar), "packets");
397 packets_bar_update();
398 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(packets_bar), FALSE);
400 gtk_widget_show(packets_bar);
404 profile_bar_new(void)
406 GtkTooltips *tooltips;
408 tooltips = gtk_tooltips_new();
410 profile_bar_event = gtk_event_box_new();
411 profile_bar = gtk_statusbar_new();
412 gtk_container_add(GTK_CONTAINER(profile_bar_event), profile_bar);
413 g_signal_connect(profile_bar_event, "button_press_event", G_CALLBACK(profile_show_popup_cb), NULL);
414 profile_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(profile_bar), "profile");
415 gtk_tooltips_set_tip (tooltips, profile_bar_event,
416 "Click to change configuration profile", NULL);
417 profile_bar_update();
419 gtk_widget_show(profile_bar);
420 gtk_widget_show(profile_bar_event);
425 * update the packets statusbar to the current values
428 packets_bar_update(void)
431 /* remove old status */
434 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
437 /* do we have any packets? */
439 if(cfile.drops_known) {
440 packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Dropped: %u",
441 cfile.count, cfile.displayed_count, cfile.marked_count, cfile.drops);
442 } else if (cfile.ignored_count > 0) {
443 packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Ignored: %u",
444 cfile.count, cfile.displayed_count, cfile.marked_count, cfile.ignored_count);
446 gulong computed_elapsed = cf_get_computed_elapsed();
448 packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Load time: %lu:%02lu.%03lu",
449 cfile.count, cfile.displayed_count, cfile.marked_count,
450 computed_elapsed/60000,
451 computed_elapsed%60000/1000,
452 computed_elapsed%1000);
455 packets_str = g_strdup(" No Packets");
457 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, packets_str);
462 * update the packets statusbar to the current values
465 profile_bar_update(void)
468 /* remove old status */
471 gtk_statusbar_pop(GTK_STATUSBAR(profile_bar), profile_ctx);
474 profile_str = g_strdup_printf (" Profile: %s", get_profile_name ());
476 gtk_statusbar_push(GTK_STATUSBAR(profile_bar), profile_ctx, profile_str);
482 status_expert_new(void)
484 GtkWidget *expert_image;
485 GtkTooltips *tooltips;
487 tooltips = gtk_tooltips_new();
489 expert_image = pixbuf_to_widget(expert_error_pb_data);
490 gtk_tooltips_set_tip(tooltips, expert_image, "ERROR is the highest expert info level", NULL);
491 gtk_widget_show(expert_image);
492 expert_info_error = gtk_event_box_new();
493 gtk_container_add(GTK_CONTAINER(expert_info_error), expert_image);
494 g_signal_connect(expert_info_error, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
496 expert_image = pixbuf_to_widget(expert_warn_pb_data);
497 gtk_tooltips_set_tip(tooltips, expert_image, "WARNING is the highest expert info level", NULL);
498 gtk_widget_show(expert_image);
499 expert_info_warn = gtk_event_box_new();
500 gtk_container_add(GTK_CONTAINER(expert_info_warn), expert_image);
501 g_signal_connect(expert_info_warn, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
503 expert_image = pixbuf_to_widget(expert_note_pb_data);
504 gtk_tooltips_set_tip(tooltips, expert_image, "NOTE is the highest expert info level", NULL);
505 gtk_widget_show(expert_image);
506 expert_info_note = gtk_event_box_new();
507 gtk_container_add(GTK_CONTAINER(expert_info_note), expert_image);
508 g_signal_connect(expert_info_note, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
510 expert_image = pixbuf_to_widget(expert_chat_pb_data);
511 gtk_tooltips_set_tip(tooltips, expert_image, "CHAT is the highest expert info level", NULL);
512 gtk_widget_show(expert_image);
513 expert_info_chat = gtk_event_box_new();
514 gtk_container_add(GTK_CONTAINER(expert_info_chat), expert_image);
515 g_signal_connect(expert_info_chat, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
517 expert_image = pixbuf_to_widget(expert_none_pb_data);
518 gtk_tooltips_set_tip(tooltips, expert_image, "No expert info", NULL);
519 gtk_widget_show(expert_image);
520 expert_info_none = gtk_event_box_new();
521 gtk_container_add(GTK_CONTAINER(expert_info_none), expert_image);
522 g_signal_connect(expert_info_none, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
523 gtk_widget_show(expert_info_none);
527 status_expert_hide(void)
529 /* reset expert info indicator */
530 gtk_widget_hide(expert_info_error);
531 gtk_widget_hide(expert_info_warn);
532 gtk_widget_hide(expert_info_note);
533 gtk_widget_hide(expert_info_chat);
534 gtk_widget_hide(expert_info_none);
538 status_expert_update(void)
540 status_expert_hide();
542 switch(expert_get_highest_severity()) {
544 gtk_widget_show(expert_info_error);
547 gtk_widget_show(expert_info_warn);
550 gtk_widget_show(expert_info_note);
553 gtk_widget_show(expert_info_chat);
556 gtk_widget_show(expert_info_none);
562 statusbar_set_filename(const char *file_name, gint64 file_length, nstime_t *file_elapsed_time)
567 /* expert info indicator */
568 status_expert_update();
571 /* convert file size */
572 if (file_length/1024/1024 > 10) {
573 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d MB", file_length/1024/1024);
574 } else if (file_length/1024 > 10) {
575 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d KB", file_length/1024);
577 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d Bytes", file_length);
580 status_msg = g_strdup_printf(" File: \"%s\" %s %02lu:%02lu:%02lu",
581 (file_name) ? file_name : "", size_str,
582 (long)file_elapsed_time->secs/3600,
583 (long)file_elapsed_time->secs%3600/60,
584 (long)file_elapsed_time->secs%60);
586 statusbar_push_file_msg(status_msg);
592 statusbar_cf_file_closing_cb(capture_file *cf _U_)
594 /* Clear any file-related status bar messages.
595 XXX - should be "clear *ALL* file-related status bar messages;
596 will there ever be more than one on the stack? */
597 statusbar_pop_file_msg();
599 /* reset expert info indicator */
600 status_expert_hide();
601 gtk_widget_show(expert_info_none);
606 statusbar_cf_file_closed_cb(capture_file *cf _U_)
608 /* go back to "No packets" */
609 packets_bar_update();
614 statusbar_cf_file_read_started_cb(capture_file *cf)
616 const gchar *name_ptr;
619 /* Ensure we pop any previous loaded filename */
620 statusbar_pop_file_msg();
622 name_ptr = get_basename(cf->filename);
624 load_msg = g_strdup_printf(" Loading: %s", name_ptr);
625 statusbar_push_file_msg(load_msg);
631 statusbar_cf_file_read_finished_cb(capture_file *cf)
633 statusbar_pop_file_msg();
634 statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
640 statusbar_capture_prepared_cb(capture_options *capture_opts _U_)
642 gchar *msg = " Waiting for capture input data ...";
643 statusbar_push_file_msg(msg);
644 welcome_header_push_msg(msg);
648 statusbar_capture_update_started_cb(capture_options *capture_opts)
653 statusbar_pop_file_msg();
654 welcome_header_pop_msg();
656 if(capture_opts->iface) {
657 capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
658 get_iface_description(capture_opts),
659 (capture_opts->save_file) ? capture_opts->save_file : "");
661 capture_msg = g_strdup_printf(" <live capture in progress> to file: %s",
662 (capture_opts->save_file) ? capture_opts->save_file : "");
665 statusbar_push_file_msg(capture_msg);
671 statusbar_capture_update_continue_cb(capture_options *capture_opts)
673 capture_file *cf = capture_opts->cf;
677 status_expert_update();
679 statusbar_pop_file_msg();
681 if (cf->f_datalen/1024/1024 > 10) {
682 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d MB",
683 get_iface_description(capture_opts),
684 capture_opts->save_file,
685 cf->f_datalen/1024/1024);
686 } else if (cf->f_datalen/1024 > 10) {
687 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d KB",
688 get_iface_description(capture_opts),
689 capture_opts->save_file,
692 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d Bytes",
693 get_iface_description(capture_opts),
694 capture_opts->save_file,
698 statusbar_push_file_msg(capture_msg);
702 statusbar_capture_update_finished_cb(capture_options *capture_opts)
704 capture_file *cf = capture_opts->cf;
706 /* Pop the "<live capture in progress>" message off the status bar. */
707 statusbar_pop_file_msg();
708 statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
712 statusbar_capture_fixed_started_cb(capture_options *capture_opts)
717 statusbar_pop_file_msg();
719 capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
720 get_iface_description(capture_opts),
721 (capture_opts->save_file) ? capture_opts->save_file : "");
723 statusbar_push_file_msg(capture_msg);
724 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, " Packets: 0");
730 statusbar_capture_fixed_continue_cb(capture_options *capture_opts)
732 capture_file *cf = capture_opts->cf;
736 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
737 capture_msg = g_strdup_printf(" Packets: %u", cf_get_packet_count(cf));
738 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, capture_msg);
744 statusbar_capture_fixed_finished_cb(capture_options *capture_opts _U_)
747 capture_file *cf = capture_opts->cf;
750 /* Pop the "<live capture in progress>" message off the status bar. */
751 statusbar_pop_file_msg();
752 welcome_header_pop_msg();
754 /* Pop the "<capturing>" message off the status bar */
755 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
758 #endif /* HAVE_LIBPCAP */
762 statusbar_cf_field_unselected_cb(capture_file *cf _U_)
764 statusbar_pop_field_msg();
768 statusbar_cf_file_save_started_cb(gchar *filename)
772 statusbar_pop_file_msg();
773 save_msg = g_strdup_printf(" Saving: %s...", get_basename(filename));
774 statusbar_push_file_msg(save_msg);
779 statusbar_cf_file_save_finished_cb(gpointer data _U_)
781 /* Pop the "Saving:" message off the status bar. */
782 statusbar_pop_file_msg();
786 statusbar_cf_file_reload_finished_cb(capture_file *cf)
788 statusbar_pop_file_msg();
789 statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
794 statusbar_cf_file_save_failed_cb(gpointer data _U_)
796 /* Pop the "Saving:" message off the status bar. */
797 statusbar_pop_file_msg();
803 statusbar_cf_callback(gint event, gpointer data, gpointer user_data _U_)
806 case(cf_cb_file_closing):
807 statusbar_cf_file_closing_cb(data);
809 case(cf_cb_file_closed):
810 statusbar_cf_file_closed_cb(data);
812 case(cf_cb_file_read_started):
813 statusbar_cf_file_read_started_cb(data);
815 case(cf_cb_file_read_finished):
816 statusbar_cf_file_read_finished_cb(data);
818 case(cf_cb_packet_selected):
820 case(cf_cb_packet_unselected):
822 case(cf_cb_field_unselected):
823 statusbar_cf_field_unselected_cb(data);
825 case(cf_cb_file_save_started):
826 statusbar_cf_file_save_started_cb(data);
828 case(cf_cb_file_save_finished):
829 statusbar_cf_file_save_finished_cb(data);
831 case(cf_cb_file_save_reload_finished):
832 statusbar_cf_file_reload_finished_cb(data);
834 case(cf_cb_file_save_failed):
835 statusbar_cf_file_save_failed_cb(data);
838 g_warning("statusbar_cf_callback: event %u unknown", event);
839 g_assert_not_reached();
845 statusbar_capture_callback(gint event, capture_options *capture_opts,
846 gpointer user_data _U_)
849 case(capture_cb_capture_prepared):
850 statusbar_capture_prepared_cb(capture_opts);
852 case(capture_cb_capture_update_started):
853 statusbar_capture_update_started_cb(capture_opts);
855 case(capture_cb_capture_update_continue):
856 statusbar_capture_update_continue_cb(capture_opts);
858 case(capture_cb_capture_update_finished):
859 statusbar_capture_update_finished_cb(capture_opts);
861 case(capture_cb_capture_fixed_started):
862 statusbar_capture_fixed_started_cb(capture_opts);
864 case(capture_cb_capture_fixed_continue):
865 statusbar_capture_fixed_continue_cb(capture_opts);
867 case(capture_cb_capture_fixed_finished):
868 statusbar_capture_fixed_finished_cb(capture_opts);
870 case(capture_cb_capture_stopping):
871 /* Beware: this state won't be called, if the capture child
872 * closes the capturing on it's own! */
875 g_warning("statusbar_capture_callback: event %u unknown", event);
876 g_assert_not_reached();