aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main_statusbar.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/main_statusbar.c')
-rw-r--r--gtk/main_statusbar.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gtk/main_statusbar.c b/gtk/main_statusbar.c
index ffaea3a928..29f184d926 100644
--- a/gtk/main_statusbar.c
+++ b/gtk/main_statusbar.c
@@ -695,6 +695,7 @@ statusbar_get_interface_names(capture_options *capture_opts)
GString *interface_names;
interface_names = g_string_new("");
+
if (capture_opts->ifaces->len == 0) {
g_string_append_printf(interface_names, "%s", get_iface_description(capture_opts));
#ifdef _WIN32
@@ -711,27 +712,26 @@ statusbar_get_interface_names(capture_options *capture_opts)
} else {
g_string_append_printf(interface_names, "%u interfaces", capture_opts->ifaces->len);
}
+ if (strlen (interface_names->str) > 0) {
+ g_string_append(interface_names, ":");
+ }
+ g_string_append(interface_names, " ");
return (interface_names);
}
static void
statusbar_capture_update_started_cb(capture_options *capture_opts)
{
+ GString *interface_names;
+
statusbar_pop_file_msg();
welcome_header_pop_msg();
- if (capture_opts->ifaces->len > 0) {
- GString *interface_names;
-
- interface_names = statusbar_get_interface_names(capture_opts);
- statusbar_push_file_msg(" %s: <live capture in progress> to file: %s",
- interface_names->str,
- (capture_opts->save_file) ? capture_opts->save_file : "");
- g_string_free(interface_names, TRUE);
- } else {
- statusbar_push_file_msg(" <live capture in progress> to file: %s",
- (capture_opts->save_file) ? capture_opts->save_file : "");
- }
+ interface_names = statusbar_get_interface_names(capture_opts);
+ statusbar_push_file_msg("%s<live capture in progress> to file: %s",
+ interface_names->str,
+ (capture_opts->save_file) ? capture_opts->save_file : "");
+ g_string_free(interface_names, TRUE);
}
static void
@@ -746,17 +746,17 @@ statusbar_capture_update_continue_cb(capture_options *capture_opts)
interface_names = statusbar_get_interface_names(capture_opts);
if (cf->f_datalen/1024/1024 > 10) {
- statusbar_push_file_msg(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d MB",
+ statusbar_push_file_msg("%s<live capture in progress> File: %s %" G_GINT64_MODIFIER "d MB",
interface_names->str,
capture_opts->save_file,
cf->f_datalen/1024/1024);
} else if (cf->f_datalen/1024 > 10) {
- statusbar_push_file_msg(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d KB",
+ statusbar_push_file_msg("%s<live capture in progress> File: %s %" G_GINT64_MODIFIER "d KB",
interface_names->str,
capture_opts->save_file,
cf->f_datalen/1024);
} else {
- statusbar_push_file_msg(" %s: <live capture in progress> File: %s %" G_GINT64_MODIFIER "d Bytes",
+ statusbar_push_file_msg("%s<live capture in progress> File: %s %" G_GINT64_MODIFIER "d Bytes",
interface_names->str,
capture_opts->save_file,
cf->f_datalen);
@@ -783,7 +783,7 @@ statusbar_capture_fixed_started_cb(capture_options *capture_opts)
statusbar_pop_file_msg();
interface_names = statusbar_get_interface_names(capture_opts);
- statusbar_push_file_msg(" %s: <live capture in progress> to file: %s",
+ statusbar_push_file_msg("%s<live capture in progress> to file: %s",
interface_names->str,
(capture_opts->save_file) ? capture_opts->save_file : "");