From cd016e69a9cc2378bf57f2435d38a4686fbb9cc2 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 25 Aug 2003 11:06:32 +0000 Subject: 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 --- gtk/endpoint_talkers_eth.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gtk/endpoint_talkers_eth.c') diff --git a/gtk/endpoint_talkers_eth.c b/gtk/endpoint_talkers_eth.c index fb277f6a19..54e49a7ca6 100644 --- a/gtk/endpoint_talkers_eth.c +++ b/gtk/endpoint_talkers_eth.c @@ -1,7 +1,7 @@ /* endpoint_talkers_eth.c * endpoint_talkers_eth 2003 Ronnie Sahlberg * - * $Id: endpoint_talkers_eth.c,v 1.3 2003/08/24 22:34:31 guy Exp $ + * $Id: endpoint_talkers_eth.c,v 1.4 2003/08/25 11:06:31 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -70,9 +70,13 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void eth_talkers_reset(void *pit) { + char title[256]; eth_talkers_t *eth_talkers=(eth_talkers_t *)pit; reset_ett_table_data(ð_talkers->talkers); + + snprintf(title, 255, "Ethernet Talkers: %s", cfile.filename); + gtk_window_set_title(GTK_WINDOW(eth_talkers->win), title); } @@ -106,7 +110,7 @@ gtk_eth_talkers_init(char *optarg) GtkWidget *vbox; GtkWidget *label; GString *error_string; - + char title[256]; if(!strncmp(optarg,"talkers,eth,",12)){ filter=optarg+12; @@ -118,7 +122,8 @@ gtk_eth_talkers_init(char *optarg) eth_talkers->win=gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_default_size(GTK_WINDOW(eth_talkers->win), 750, 400); - gtk_window_set_title(GTK_WINDOW(eth_talkers->win), "Ethernet Talkers"); + snprintf(title, 255, "Ethernet Talkers: %s", cfile.filename); + gtk_window_set_title(GTK_WINDOW(eth_talkers->win), title); SIGNAL_CONNECT(eth_talkers->win, "destroy", win_destroy_cb, eth_talkers); -- cgit v1.2.3