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"
60 * for elevel in chat error none note warn ; do
61 * gdk-pixbuf-csource --raw --name=expert_${elevel}_pb_data expert_$elevel.png > expert_$elevel.h
64 #include "../image/expert_error.h"
65 #include "../image/expert_warn.h"
66 #include "../image/expert_note.h"
67 #include "../image/expert_chat.h"
68 #include "../image/expert_none.h"
71 * The order below defines the priority of info bar contexts.
83 #define DEF_READY_MESSAGE " Ready to load or capture"
85 #define DEF_READY_MESSAGE " Ready to load file"
89 static GtkWidget *status_pane_left, *status_pane_right;
90 static GtkWidget *info_bar, *info_bar_event, *packets_bar, *profile_bar, *profile_bar_event;
91 static GtkWidget *expert_info_error, *expert_info_warn, *expert_info_note;
92 static GtkWidget *expert_info_chat, *expert_info_none;
94 static guint main_ctx, file_ctx, help_ctx, filter_ctx, packets_ctx, profile_ctx;
95 static guint status_levels[NUM_STATUS_LEVELS];
96 static gchar *packets_str = NULL;
97 static gchar *profile_str = NULL;
100 static void info_bar_new(void);
101 static void packets_bar_new(void);
102 static void profile_bar_new(void);
103 static void status_expert_new(void);
105 /* Temporary message timeouts */
106 #define TEMPORARY_MSG_TIMEOUT (7 * 1000)
107 #define TEMPORARY_FLASH_TIMEOUT (1 * 1000)
108 #define TEMPORARY_FLASH_INTERVAL (TEMPORARY_FLASH_TIMEOUT / 4)
109 static gint flash_time;
110 static gboolean flash_highlight = FALSE;
113 * Push a message referring to file access onto the statusbar.
116 statusbar_push_file_msg(const gchar *msg)
120 /*g_warning("statusbar_push: %s", msg);*/
121 for (i = STATUS_LEVEL_FILE + 1; i < NUM_STATUS_LEVELS; i++) {
122 if (status_levels[i])
125 status_levels[STATUS_LEVEL_FILE]++;
127 gtk_statusbar_push(GTK_STATUSBAR(info_bar), file_ctx, msg);
131 * Pop a message referring to file access off the statusbar.
134 statusbar_pop_file_msg(void)
136 /*g_warning("statusbar_pop");*/
137 if (status_levels[STATUS_LEVEL_FILE] > 0) {
138 status_levels[STATUS_LEVEL_FILE]--;
140 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), file_ctx);
144 * Push a message referring to the currently-selected field onto the statusbar.
147 statusbar_push_field_msg(const gchar *msg)
151 for (i = STATUS_LEVEL_HELP + 1; i < NUM_STATUS_LEVELS; i++) {
152 if (status_levels[i])
155 status_levels[STATUS_LEVEL_HELP]++;
157 gtk_statusbar_push(GTK_STATUSBAR(info_bar), help_ctx, msg);
161 * Pop a message referring to the currently-selected field off the statusbar.
164 statusbar_pop_field_msg(void)
166 if (status_levels[STATUS_LEVEL_HELP] > 0) {
167 status_levels[STATUS_LEVEL_HELP]--;
169 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), help_ctx);
173 * Push a message referring to the current filter onto the statusbar.
176 statusbar_push_filter_msg(const gchar *msg)
180 for (i = STATUS_LEVEL_FILTER + 1; i < NUM_STATUS_LEVELS; i++) {
181 if (status_levels[i])
184 status_levels[STATUS_LEVEL_FILTER]++;
186 gtk_statusbar_push(GTK_STATUSBAR(info_bar), filter_ctx, msg);
190 * Pop a message referring to the current filter off the statusbar.
193 statusbar_pop_filter_msg(void)
195 if (status_levels[STATUS_LEVEL_FILTER] > 0) {
196 status_levels[STATUS_LEVEL_FILTER]--;
198 gtk_statusbar_pop(GTK_STATUSBAR(info_bar), filter_ctx);
202 * Timeout callbacks for statusbar_push_temporary_msg
205 statusbar_remove_temporary_msg(gpointer data)
207 guint msg_id = GPOINTER_TO_UINT(data);
209 gtk_statusbar_remove(GTK_STATUSBAR(info_bar), main_ctx, msg_id);
215 statusbar_flash_temporary_msg(gpointer data _U_)
217 gboolean retval = TRUE;
219 if (flash_time > 0) {
220 flash_highlight = !flash_highlight;
222 flash_highlight = FALSE;
227 * As of 2.18.3 gtk_drag_highlight just draws a border around the widget
228 * so we can abuse it here.
230 if (flash_highlight) {
231 gtk_drag_highlight(info_bar);
233 gtk_drag_unhighlight(info_bar);
236 flash_time -= TEMPORARY_FLASH_INTERVAL;
242 * Push a temporary message onto the statusbar.
245 statusbar_push_temporary_msg(const gchar *msg)
249 msg_id = gtk_statusbar_push(GTK_STATUSBAR(info_bar), main_ctx, msg);
251 flash_time = TEMPORARY_FLASH_TIMEOUT - 1;
252 g_timeout_add(TEMPORARY_FLASH_INTERVAL, statusbar_flash_temporary_msg, NULL);
254 g_timeout_add(TEMPORARY_MSG_TIMEOUT, statusbar_remove_temporary_msg, GUINT_TO_POINTER(msg_id));
261 GtkWidget *status_hbox;
264 status_hbox = gtk_hbox_new(FALSE, 1);
265 gtk_container_set_border_width(GTK_CONTAINER(status_hbox), 0);
267 /* info (main) statusbar */
270 /* packets statusbar */
273 /* profile statusbar */
276 /* expert info indicator */
279 /* Pane for the statusbar */
280 status_pane_left = gtk_hpaned_new();
281 gtk_widget_show(status_pane_left);
282 status_pane_right = gtk_hpaned_new();
283 gtk_widget_show(status_pane_right);
289 statusbar_load_window_geometry(void)
291 if (recent.has_gui_geometry_status_pane && recent.gui_geometry_status_pane_left)
292 gtk_paned_set_position(GTK_PANED(status_pane_left), recent.gui_geometry_status_pane_left);
293 if (recent.has_gui_geometry_status_pane && recent.gui_geometry_status_pane_right)
294 gtk_paned_set_position(GTK_PANED(status_pane_right), recent.gui_geometry_status_pane_right);
298 statusbar_save_window_geometry(void)
300 recent.gui_geometry_status_pane_left = gtk_paned_get_position(GTK_PANED(status_pane_left));
301 recent.gui_geometry_status_pane_right = gtk_paned_get_position(GTK_PANED(status_pane_right));
306 * Helper for statusbar_widgets_emptying()
309 foreach_remove_a_child(GtkWidget *widget, gpointer data) {
310 gtk_container_remove(GTK_CONTAINER(data), widget);
314 statusbar_widgets_emptying(GtkWidget *statusbar)
316 g_object_ref(G_OBJECT(info_bar));
317 g_object_ref(G_OBJECT(info_bar_event));
318 g_object_ref(G_OBJECT(packets_bar));
319 g_object_ref(G_OBJECT(profile_bar));
320 g_object_ref(G_OBJECT(profile_bar_event));
321 g_object_ref(G_OBJECT(status_pane_left));
322 g_object_ref(G_OBJECT(status_pane_right));
323 g_object_ref(G_OBJECT(expert_info_error));
324 g_object_ref(G_OBJECT(expert_info_warn));
325 g_object_ref(G_OBJECT(expert_info_note));
326 g_object_ref(G_OBJECT(expert_info_chat));
327 g_object_ref(G_OBJECT(expert_info_none));
329 /* empty all containers participating */
330 gtk_container_foreach(GTK_CONTAINER(statusbar), foreach_remove_a_child, statusbar);
331 gtk_container_foreach(GTK_CONTAINER(status_pane_left), foreach_remove_a_child, status_pane_left);
332 gtk_container_foreach(GTK_CONTAINER(status_pane_right), foreach_remove_a_child, status_pane_right);
336 statusbar_widgets_pack(GtkWidget *statusbar)
338 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_error, FALSE, FALSE, 2);
339 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_warn, FALSE, FALSE, 2);
340 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_note, FALSE, FALSE, 2);
341 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_chat, FALSE, FALSE, 2);
342 gtk_box_pack_start(GTK_BOX(statusbar), expert_info_none, FALSE, FALSE, 2);
343 gtk_box_pack_start(GTK_BOX(statusbar), status_pane_left, TRUE, TRUE, 0);
344 gtk_paned_pack1(GTK_PANED(status_pane_left), info_bar_event, FALSE, FALSE);
345 gtk_paned_pack2(GTK_PANED(status_pane_left), status_pane_right, TRUE, FALSE);
346 gtk_paned_pack1(GTK_PANED(status_pane_right), packets_bar, TRUE, FALSE);
347 gtk_paned_pack2(GTK_PANED(status_pane_right), profile_bar_event, FALSE, FALSE);
351 statusbar_widgets_show_or_hide(GtkWidget *statusbar)
354 * Show the status hbox if either:
356 * 1) we're showing the filter toolbar and we want it in the status
361 * 2) we're showing the status bar.
363 if ((recent.filter_toolbar_show && prefs.filter_toolbar_show_in_statusbar) ||
364 recent.statusbar_show) {
365 gtk_widget_show(statusbar);
367 gtk_widget_hide(statusbar);
370 if (recent.statusbar_show) {
371 gtk_widget_show(status_pane_left);
373 gtk_widget_hide(status_pane_left);
383 info_bar_event = gtk_event_box_new();
384 info_bar = gtk_statusbar_new();
385 gtk_container_add(GTK_CONTAINER(info_bar_event), info_bar);
386 main_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "main");
387 file_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "file");
388 help_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "help");
389 filter_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(info_bar), "filter");
390 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(info_bar), FALSE);
391 gtk_statusbar_push(GTK_STATUSBAR(info_bar), main_ctx, DEF_READY_MESSAGE);
393 for (i = 0; i < NUM_STATUS_LEVELS; i++) {
394 status_levels[i] = 0;
397 gtk_widget_show(info_bar);
398 gtk_widget_show(info_bar_event);
402 packets_bar_new(void)
404 /* tip: tooltips don't work on statusbars! */
405 packets_bar = gtk_statusbar_new();
406 packets_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(packets_bar), "packets");
407 packets_bar_update();
408 gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(packets_bar), FALSE);
410 gtk_widget_show(packets_bar);
414 profile_bar_new(void)
416 GtkTooltips *tooltips;
418 tooltips = gtk_tooltips_new();
420 profile_bar_event = gtk_event_box_new();
421 profile_bar = gtk_statusbar_new();
422 gtk_container_add(GTK_CONTAINER(profile_bar_event), profile_bar);
423 g_signal_connect(profile_bar_event, "button_press_event", G_CALLBACK(profile_show_popup_cb), NULL);
424 profile_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(profile_bar), "profile");
425 gtk_tooltips_set_tip (tooltips, profile_bar_event,
426 "Click to change configuration profile", NULL);
427 profile_bar_update();
429 gtk_widget_show(profile_bar);
430 gtk_widget_show(profile_bar_event);
435 * update the packets statusbar to the current values
438 packets_bar_update(void)
441 /* remove old status */
444 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
447 /* do we have any packets? */
449 if(cfile.drops_known) {
450 packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Dropped: %u",
451 cfile.count, cfile.displayed_count, cfile.marked_count, cfile.drops);
453 gulong computed_elapsed = cf_get_computed_elapsed();
455 packets_str = g_strdup_printf(" Packets: %u Displayed: %u Marked: %u Time: %02lu:%02lu:%02lu.%03lu",
456 cfile.count, cfile.displayed_count, cfile.marked_count,
457 computed_elapsed/3600000,
458 computed_elapsed%3600000/60000,
459 computed_elapsed%60000/1000,
460 computed_elapsed%1000);
463 packets_str = g_strdup(" No Packets");
465 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, packets_str);
470 * update the packets statusbar to the current values
473 profile_bar_update(void)
476 /* remove old status */
479 gtk_statusbar_pop(GTK_STATUSBAR(profile_bar), profile_ctx);
482 profile_str = g_strdup_printf (" Profile: %s", get_profile_name ());
484 gtk_statusbar_push(GTK_STATUSBAR(profile_bar), profile_ctx, profile_str);
490 status_expert_new(void)
492 GtkWidget *expert_image;
493 GtkTooltips *tooltips;
495 tooltips = gtk_tooltips_new();
497 expert_image = pixbuf_to_widget(expert_error_pb_data);
498 gtk_tooltips_set_tip(tooltips, expert_image, "ERROR is the highest expert info level", NULL);
499 gtk_widget_show(expert_image);
500 expert_info_error = gtk_event_box_new();
501 gtk_container_add(GTK_CONTAINER(expert_info_error), expert_image);
502 g_signal_connect(expert_info_error, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
504 expert_image = pixbuf_to_widget(expert_warn_pb_data);
505 gtk_tooltips_set_tip(tooltips, expert_image, "WARNING is the highest expert info level", NULL);
506 gtk_widget_show(expert_image);
507 expert_info_warn = gtk_event_box_new();
508 gtk_container_add(GTK_CONTAINER(expert_info_warn), expert_image);
509 g_signal_connect(expert_info_warn, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
511 expert_image = pixbuf_to_widget(expert_note_pb_data);
512 gtk_tooltips_set_tip(tooltips, expert_image, "NOTE is the highest expert info level", NULL);
513 gtk_widget_show(expert_image);
514 expert_info_note = gtk_event_box_new();
515 gtk_container_add(GTK_CONTAINER(expert_info_note), expert_image);
516 g_signal_connect(expert_info_note, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
518 expert_image = pixbuf_to_widget(expert_chat_pb_data);
519 gtk_tooltips_set_tip(tooltips, expert_image, "CHAT is the highest expert info level", NULL);
520 gtk_widget_show(expert_image);
521 expert_info_chat = gtk_event_box_new();
522 gtk_container_add(GTK_CONTAINER(expert_info_chat), expert_image);
523 g_signal_connect(expert_info_chat, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
525 expert_image = pixbuf_to_widget(expert_none_pb_data);
526 gtk_tooltips_set_tip(tooltips, expert_image, "No expert info", NULL);
527 gtk_widget_show(expert_image);
528 expert_info_none = gtk_event_box_new();
529 gtk_container_add(GTK_CONTAINER(expert_info_none), expert_image);
530 g_signal_connect(expert_info_none, "button_press_event", G_CALLBACK(expert_comp_dlg_cb), NULL);
531 gtk_widget_show(expert_info_none);
535 status_expert_hide(void)
537 /* reset expert info indicator */
538 gtk_widget_hide(expert_info_error);
539 gtk_widget_hide(expert_info_warn);
540 gtk_widget_hide(expert_info_note);
541 gtk_widget_hide(expert_info_chat);
542 gtk_widget_hide(expert_info_none);
546 status_expert_update(void)
548 status_expert_hide();
550 switch(expert_get_highest_severity()) {
552 gtk_widget_show(expert_info_error);
555 gtk_widget_show(expert_info_warn);
558 gtk_widget_show(expert_info_note);
561 gtk_widget_show(expert_info_chat);
564 gtk_widget_show(expert_info_none);
570 statusbar_set_filename(const char *file_name, gint64 file_length, nstime_t *file_elapsed_time)
575 /* expert info indicator */
576 status_expert_update();
579 /* convert file size */
580 if (file_length/1024/1024 > 10) {
581 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d MB", file_length/1024/1024);
582 } else if (file_length/1024 > 10) {
583 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d KB", file_length/1024);
585 size_str = g_strdup_printf("%" G_GINT64_MODIFIER "d Bytes", file_length);
588 status_msg = g_strdup_printf(" File: \"%s\" %s %02lu:%02lu:%02lu",
589 (file_name) ? file_name : "", size_str,
590 (long)file_elapsed_time->secs/3600,
591 (long)file_elapsed_time->secs%3600/60,
592 (long)file_elapsed_time->secs%60);
594 statusbar_push_file_msg(status_msg);
600 statusbar_cf_file_closing_cb(capture_file *cf _U_)
602 /* Clear any file-related status bar messages.
603 XXX - should be "clear *ALL* file-related status bar messages;
604 will there ever be more than one on the stack? */
605 statusbar_pop_file_msg();
607 /* reset expert info indicator */
608 status_expert_hide();
609 gtk_widget_show(expert_info_none);
614 statusbar_cf_file_closed_cb(capture_file *cf _U_)
616 /* go back to "No packets" */
617 packets_bar_update();
622 statusbar_cf_file_read_start_cb(capture_file *cf)
624 const gchar *name_ptr;
627 /* Ensure we pop any previous loaded filename */
628 statusbar_pop_file_msg();
630 name_ptr = get_basename(cf->filename);
632 load_msg = g_strdup_printf(" Loading: %s", name_ptr);
633 statusbar_push_file_msg(load_msg);
639 statusbar_cf_file_read_finished_cb(capture_file *cf)
641 statusbar_pop_file_msg();
642 statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
648 statusbar_capture_prepared_cb(capture_options *capture_opts _U_)
650 gchar *msg = " Waiting for capture input data ...";
651 statusbar_push_file_msg(msg);
652 welcome_header_push_msg(msg);
656 statusbar_capture_update_started_cb(capture_options *capture_opts)
661 statusbar_pop_file_msg();
662 welcome_header_pop_msg();
664 if(capture_opts->iface) {
665 capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
666 get_iface_description(capture_opts),
667 (capture_opts->save_file) ? capture_opts->save_file : "");
669 capture_msg = g_strdup_printf(" <live capture in progress> to file: %s",
670 (capture_opts->save_file) ? capture_opts->save_file : "");
673 statusbar_push_file_msg(capture_msg);
679 statusbar_capture_update_continue_cb(capture_options *capture_opts)
681 capture_file *cf = capture_opts->cf;
685 status_expert_update();
687 statusbar_pop_file_msg();
689 if (cf->f_datalen/1024/1024 > 10) {
690 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d MB",
691 get_iface_description(capture_opts),
692 capture_opts->save_file,
693 cf->f_datalen/1024/1024);
694 } else if (cf->f_datalen/1024 > 10) {
695 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d KB",
696 get_iface_description(capture_opts),
697 capture_opts->save_file,
700 capture_msg = g_strdup_printf(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d Bytes",
701 get_iface_description(capture_opts),
702 capture_opts->save_file,
706 statusbar_push_file_msg(capture_msg);
710 statusbar_capture_update_finished_cb(capture_options *capture_opts)
712 capture_file *cf = capture_opts->cf;
714 /* Pop the "<live capture in progress>" message off the status bar. */
715 statusbar_pop_file_msg();
716 statusbar_set_filename(cf->filename, cf->f_datalen, &(cf->elapsed_time));
720 statusbar_capture_fixed_started_cb(capture_options *capture_opts)
725 statusbar_pop_file_msg();
727 capture_msg = g_strdup_printf(" %s: <live capture in progress> to file: %s",
728 get_iface_description(capture_opts),
729 (capture_opts->save_file) ? capture_opts->save_file : "");
731 statusbar_push_file_msg(capture_msg);
732 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, " Packets: 0");
738 statusbar_capture_fixed_continue_cb(capture_options *capture_opts)
740 capture_file *cf = capture_opts->cf;
744 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
745 capture_msg = g_strdup_printf(" Packets: %u", cf_get_packet_count(cf));
746 gtk_statusbar_push(GTK_STATUSBAR(packets_bar), packets_ctx, capture_msg);
752 statusbar_capture_fixed_finished_cb(capture_options *capture_opts _U_)
755 capture_file *cf = capture_opts->cf;
758 /* Pop the "<live capture in progress>" message off the status bar. */
759 statusbar_pop_file_msg();
760 welcome_header_pop_msg();
762 /* Pop the "<capturing>" message off the status bar */
763 gtk_statusbar_pop(GTK_STATUSBAR(packets_bar), packets_ctx);
766 #endif /* HAVE_LIBPCAP */
770 statusbar_cf_field_unselected_cb(capture_file *cf _U_)
772 statusbar_pop_field_msg();
776 statusbar_cf_file_safe_started_cb(gchar * filename)
780 save_msg = g_strdup_printf(" Saving: %s...", get_basename(filename));
781 statusbar_push_file_msg(save_msg);
786 statusbar_cf_file_safe_finished_cb(gpointer data _U_)
788 /* Pop the "Saving:" message off the status bar. */
789 statusbar_pop_file_msg();
793 statusbar_cf_file_safe_failed_cb(gpointer data _U_)
795 /* Pop the "Saving:" message off the status bar. */
796 statusbar_pop_file_msg();
802 statusbar_cf_callback(gint event, gpointer data, gpointer user_data _U_)
805 case(cf_cb_file_closing):
806 statusbar_cf_file_closing_cb(data);
808 case(cf_cb_file_closed):
809 statusbar_cf_file_closed_cb(data);
811 case(cf_cb_file_read_start):
812 statusbar_cf_file_read_start_cb(data);
814 case(cf_cb_file_read_finished):
815 statusbar_cf_file_read_finished_cb(data);
817 case(cf_cb_packet_selected):
819 case(cf_cb_packet_unselected):
821 case(cf_cb_field_unselected):
822 statusbar_cf_field_unselected_cb(data);
824 case(cf_cb_file_safe_started):
825 statusbar_cf_file_safe_started_cb(data);
827 case(cf_cb_file_safe_finished):
828 statusbar_cf_file_safe_finished_cb(data);
830 case(cf_cb_file_safe_reload_finished):
832 case(cf_cb_file_safe_failed):
833 statusbar_cf_file_safe_failed_cb(data);
836 g_warning("statusbar_cf_callback: event %u unknown", event);
837 g_assert_not_reached();
843 statusbar_capture_callback(gint event, capture_options *capture_opts,
844 gpointer user_data _U_)
847 case(capture_cb_capture_prepared):
848 statusbar_capture_prepared_cb(capture_opts);
850 case(capture_cb_capture_update_started):
851 statusbar_capture_update_started_cb(capture_opts);
853 case(capture_cb_capture_update_continue):
854 statusbar_capture_update_continue_cb(capture_opts);
856 case(capture_cb_capture_update_finished):
857 statusbar_capture_update_finished_cb(capture_opts);
859 case(capture_cb_capture_fixed_started):
860 statusbar_capture_fixed_started_cb(capture_opts);
862 case(capture_cb_capture_fixed_continue):
863 statusbar_capture_fixed_continue_cb(capture_opts);
865 case(capture_cb_capture_fixed_finished):
866 statusbar_capture_fixed_finished_cb(capture_opts);
868 case(capture_cb_capture_stopping):
869 /* Beware: this state won't be called, if the capture child
870 * closes the capturing on it's own! */
873 g_warning("statusbar_capture_callback: event %u unknown", event);
874 g_assert_not_reached();