aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/smb_stat.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-25 11:06:32 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2003-08-25 11:06:32 +0000
commitcd016e69a9cc2378bf57f2435d38a4686fbb9cc2 (patch)
treef8347dba3892eae464ebd0a37e6097a5d6dcc499 /gtk/smb_stat.c
parent764114e914199bc8ee251b71e78f09f6ec7326cf (diff)
Update to IO-Stat to put the capture filename on the titlebar
to make it easier to navigate when having multiple instances of ethereal and io-stat open at the same time. Updates to all endpoint talkers and service response time windows to do this as well. Bonus, when the user opens a new capture file when having these windows open, the title bar will be updated to reflect the name of the new capture file. svn path=/trunk/; revision=8251
Diffstat (limited to 'gtk/smb_stat.c')
-rw-r--r--gtk/smb_stat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c
index 8f17ecc6f0..54a1a9d3d4 100644
--- a/gtk/smb_stat.c
+++ b/gtk/smb_stat.c
@@ -1,7 +1,7 @@
/* smb_stat.c
* smb_stat 2003 Ronnie Sahlberg
*
- * $Id: smb_stat.c,v 1.10 2003/08/19 10:09:20 sahlberg Exp $
+ * $Id: smb_stat.c,v 1.11 2003/08/25 11:06:32 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -63,10 +63,13 @@ static void
smbstat_reset(void *pss)
{
smbstat_t *ss=(smbstat_t *)pss;
+ char title[256];
reset_srt_table_data(&ss->smb_srt_table);
reset_srt_table_data(&ss->trans2_srt_table);
reset_srt_table_data(&ss->nt_trans_srt_table);
+ snprintf(title, 255, "SMB Service Response Time statistics: %s", cfile.filename);
+ gtk_window_set_title(GTK_WINDOW(ss->win), title);
}
static int
@@ -140,6 +143,7 @@ gtk_smbstat_init(char *optarg)
GString *error_string;
int i;
GtkWidget *vbox;
+ char title[256];
if(!strncmp(optarg,"smb,srt,",8)){
filter=optarg+8;
@@ -151,7 +155,8 @@ gtk_smbstat_init(char *optarg)
ss->win=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(ss->win), 550, 600);
- gtk_window_set_title(GTK_WINDOW(ss->win), "SMB Service Response Time statistics");
+ snprintf(title, 255, "SMB Service Response Time statistics: %s", cfile.filename);
+ gtk_window_set_title(GTK_WINDOW(ss->win), title);
SIGNAL_CONNECT(ss->win, "destroy", win_destroy_cb, ss);
vbox=gtk_vbox_new(FALSE, 0);