aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/afp_stat.c3
-rw-r--r--gtk/airpcap_dlg.c6
-rw-r--r--gtk/ansi_a_stat.c4
-rw-r--r--gtk/ansi_map_stat.c6
-rw-r--r--gtk/bootp_stat.c5
-rw-r--r--gtk/camel_counter.c7
-rw-r--r--gtk/camel_srt.c4
-rw-r--r--gtk/capture_if_details_dlg_win32.c3
-rw-r--r--gtk/capture_if_dlg.c3
-rw-r--r--gtk/compare_stat.c4
-rw-r--r--gtk/conversations_table.c7
-rw-r--r--gtk/dcerpc_stat.c4
-rw-r--r--gtk/diameter_stat.c3
-rw-r--r--gtk/fc_stat.c4
-rw-r--r--gtk/fileset_dlg.c3
-rw-r--r--gtk/flow_graph.c3
-rw-r--r--gtk/funnel_stat.c4
-rw-r--r--gtk/gsm_a_stat.c3
-rw-r--r--gtk/gsm_map_stat.c3
-rw-r--r--gtk/gsm_map_summary.c3
-rw-r--r--gtk/gtp_stat.c4
-rw-r--r--gtk/h225_counter.c4
-rw-r--r--gtk/h225_ras_srt.c3
-rw-r--r--gtk/hostlist_table.c3
-rw-r--r--gtk/io_stat.c5
-rw-r--r--gtk/ldap_stat.c3
-rw-r--r--gtk/mcast_stream_dlg.c3
-rw-r--r--gtk/megaco_stat.c4
28 files changed, 77 insertions, 34 deletions
diff --git a/gtk/afp_stat.c b/gtk/afp_stat.c
index 35d8bb34d1..63b0360965 100644
--- a/gtk/afp_stat.c
+++ b/gtk/afp_stat.c
@@ -144,7 +144,8 @@ gtk_afpstat_init(const char *optarg, void *userdata _U_)
ss=g_malloc(sizeof(afpstat_t));
- ss->win=window_new(GTK_WINDOW_TOPLEVEL, "afp-stat");
+ ss->win=dlg_window_new("afp-stat"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(ss->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(ss->win), 550, 600);
afpstat_set_title(ss);
diff --git a/gtk/airpcap_dlg.c b/gtk/airpcap_dlg.c
index b0552d0995..5dba22f467 100644
--- a/gtk/airpcap_dlg.c
+++ b/gtk/airpcap_dlg.c
@@ -1769,7 +1769,8 @@ display_airpcap_advanced_cb(GtkWidget *w _U_, gpointer data)
airpcap_if_selected = airpcap_if_active;
/* Create the new window */
- airpcap_advanced_w = window_new(GTK_WINDOW_TOPLEVEL, "Advanced Wireless Settings");
+ airpcap_advanced_w = dlg_window_new("Advanced Wireless Settings"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(airpcap_advanced_w), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (airpcap_advanced_w), 5);
gtk_window_set_position (GTK_WINDOW (airpcap_advanced_w),
@@ -2277,7 +2278,8 @@ display_airpcap_key_management_cb(GtkWidget *w _U_, gpointer data)
airpcap_if_selected = airpcap_if_active;
/* Create the new window */
- key_management_w = window_new(GTK_WINDOW_TOPLEVEL, "Decryption Key Management");
+ key_management_w = dlg_window_new("Decryption Key Management"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(key_management_w), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (key_management_w), 5);
gtk_window_set_position (GTK_WINDOW (key_management_w),
diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c
index d3fb09bc53..19e202fe0b 100644
--- a/gtk/ansi_a_stat.c
+++ b/gtk/ansi_a_stat.c
@@ -295,7 +295,9 @@ ansi_a_stat_gtk_win_create(
GtkWidget *bbox;
- dlg_p->win = window_new(GTK_WINDOW_TOPLEVEL, title);
+ dlg_p->win= dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(dlg_p->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(dlg_p->win), 480, 450);
vbox=gtk_vbox_new(FALSE, 3);
diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c
index 7cc52ae712..de1ec96e62 100644
--- a/gtk/ansi_map_stat.c
+++ b/gtk/ansi_map_stat.c
@@ -301,8 +301,10 @@ ansi_map_stat_gtk_win_create(
GtkWidget *bbox;
- dlg_p->win = window_new(GTK_WINDOW_TOPLEVEL, title);
- gtk_window_set_default_size(GTK_WINDOW(dlg_p->win), 500, 450);
+ dlg_p->win= dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(dlg_p->win), TRUE);
+
+ gtk_window_set_default_size(GTK_WINDOW(dlg_p->win), 500, 450);
vbox = gtk_vbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(dlg_p->win), vbox);
diff --git a/gtk/bootp_stat.c b/gtk/bootp_stat.c
index 24799dd85f..a7cfead7a7 100644
--- a/gtk/bootp_stat.c
+++ b/gtk/bootp_stat.c
@@ -217,8 +217,9 @@ dhcpstat_init(const char *optarg, void *userdata _U_)
title=g_strdup("DHCP statistics");
}
- /* top level window */
- sp->win = window_new(GTK_WINDOW_TOPLEVEL, title);
+ /* transient_for top_level */
+ sp->win= dlg_window_new(title);
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(sp->win), TRUE);
g_free(title);
vbox = gtk_vbox_new(FALSE, 3);
diff --git a/gtk/camel_counter.c b/gtk/camel_counter.c
index 9f52d75e5b..84ad2e6a33 100644
--- a/gtk/camel_counter.c
+++ b/gtk/camel_counter.c
@@ -168,8 +168,11 @@ static void gtk_camelcounter_init(const char *optarg, void *userdata _U_)
gtk_camelcounter_reset(p_camelcounter);
- p_camelcounter->win=window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: CAMEL counters");
- gtk_window_set_default_size(GTK_WINDOW(p_camelcounter->win), 500, 300);
+ /* transient_for top_level */
+ p_camelcounter->win=dlg_window_new("Wireshark: CAMEL counters");
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(p_camelcounter->win), TRUE);
+
+ gtk_window_set_default_size(GTK_WINDOW(p_camelcounter->win), 500, 300);
p_camelcounter->vbox=gtk_vbox_new(FALSE, 3);
gtk_container_set_border_width(GTK_CONTAINER(p_camelcounter->vbox), 12);
diff --git a/gtk/camel_srt.c b/gtk/camel_srt.c
index 5d81dd7c4a..b3b174c026 100644
--- a/gtk/camel_srt.c
+++ b/gtk/camel_srt.c
@@ -166,7 +166,9 @@ static void gtk_camelsrt_init(const char *optarg, void *userdata _U_)
p_camelsrt=g_malloc(sizeof(struct camelsrt_t));
- p_camelsrt->win=window_new(GTK_WINDOW_TOPLEVEL, "camel-srt");
+ p_camelsrt->win= dlg_window_new("camel-srt"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(p_camelsrt->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(p_camelsrt->win), 550, 400);
camelsrt_set_title(p_camelsrt);
diff --git a/gtk/capture_if_details_dlg_win32.c b/gtk/capture_if_details_dlg_win32.c
index 64f7e91a31..d4da3dd403 100644
--- a/gtk/capture_if_details_dlg_win32.c
+++ b/gtk/capture_if_details_dlg_win32.c
@@ -2344,7 +2344,8 @@ capture_if_details_open_win(char *iface)
}
/* open a new window */
- details_open_w = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Interface Details");
+ details_open_w = dlg_window_new("Wireshark: Interface Details"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(details_open_w), TRUE);
/* Container for the window contents */
main_vb = gtk_vbox_new(FALSE, 12);
diff --git a/gtk/capture_if_dlg.c b/gtk/capture_if_dlg.c
index 3cb7c16215..b0da567662 100644
--- a/gtk/capture_if_dlg.c
+++ b/gtk/capture_if_dlg.c
@@ -603,7 +603,8 @@ capture_if_cb(GtkWidget *w _U_, gpointer d _U_)
airpcap_set_toolbar_start_capture(airpcap_if_active);
#endif
- cap_if_w = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Capture Interfaces");
+ cap_if_w = dlg_window_new("Wireshark: Capture Interfaces"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(cap_if_w), TRUE);
tooltips = gtk_tooltips_new();
diff --git a/gtk/compare_stat.c b/gtk/compare_stat.c
index 785e1d743c..e7240c32e4 100644
--- a/gtk/compare_stat.c
+++ b/gtk/compare_stat.c
@@ -747,7 +747,9 @@ gtk_comparestat_init(const char *optarg, void* userdata _U_)
/* microsecond precision */
timestamp_set_precision(TS_PREC_AUTO_NSEC);
- cs->win=window_new(GTK_WINDOW_TOPLEVEL, "compare-stat");
+ /* transient_for top_level */
+ cs->win=dlg_window_new("compare-stat");
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(cs->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(cs->win), 550, 400);
comparestat_set_title(cs);
diff --git a/gtk/conversations_table.c b/gtk/conversations_table.c
index 7a3e73f9c6..32e1c9f657 100644
--- a/gtk/conversations_table.c
+++ b/gtk/conversations_table.c
@@ -1318,7 +1318,8 @@ init_conversation_table(gboolean hide_ports, const char *table_name, const char
conversations->filter=filter;
conversations->use_dfilter=FALSE;
g_snprintf(title, sizeof(title), "%s Conversations: %s", table_name, cf_get_display_name(&cfile));
- conversations->win=window_new(GTK_WINDOW_TOPLEVEL, title);
+ conversations->win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(conversations->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(conversations->win), 750, 400);
@@ -1526,7 +1527,9 @@ init_conversation_notebook_cb(GtkWidget *w _U_, gpointer d _U_)
pages = g_malloc(sizeof(void *) * (g_slist_length(registered_ct_tables) + 1));
g_snprintf(title, sizeof(title), "Conversations: %s", cf_get_display_name(&cfile));
- win=window_new(GTK_WINDOW_TOPLEVEL, title);
+ win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(win), 750, 400);
vbox=gtk_vbox_new(FALSE, 6);
diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c
index da745f296a..c75af2a32e 100644
--- a/gtk/dcerpc_stat.c
+++ b/gtk/dcerpc_stat.c
@@ -263,7 +263,9 @@ gtk_dcerpcstat_init(const char *optarg, void* userdata _U_)
rs->uuid=uuid;
rs->ver=ver;
- rs->win=window_new(GTK_WINDOW_TOPLEVEL, "dcerpc-stat");
+ rs->win = dlg_window_new("dcerpc-stat"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(rs->win), TRUE);
+
dcerpcstat_set_title(rs);
gtk_window_set_default_size(GTK_WINDOW(rs->win), 550, 400);
diff --git a/gtk/diameter_stat.c b/gtk/diameter_stat.c
index 1f37b04eee..97297a7acd 100644
--- a/gtk/diameter_stat.c
+++ b/gtk/diameter_stat.c
@@ -158,7 +158,8 @@ gtk_diameterstat_init(const char *optarg, void *userdata _U_)
cmd_str_hash = g_hash_table_new(g_str_hash,g_str_equal);
g_hash_table_insert(cmd_str_hash, (gchar *)"Unknown", index);
- diameter->win=window_new(GTK_WINDOW_TOPLEVEL, "diameter-stat");
+ diameter->win = dlg_window_new("diameter-stat"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(diameter->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(diameter->win), 550, 400);
diameterstat_set_title(diameter);
diff --git a/gtk/fc_stat.c b/gtk/fc_stat.c
index bad8b78712..e326608ec9 100644
--- a/gtk/fc_stat.c
+++ b/gtk/fc_stat.c
@@ -150,7 +150,9 @@ gtk_fcstat_init(const char *optarg, void *userdata _U_)
fc=g_malloc(sizeof(fcstat_t));
- fc->win=window_new(GTK_WINDOW_TOPLEVEL, "fc-stat");
+ fc->win = dlg_window_new("fc-stat"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(fc->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(fc->win), 550, 400);
fcstat_set_title(fc);
diff --git a/gtk/fileset_dlg.c b/gtk/fileset_dlg.c
index 07ba5e9611..72167c9821 100644
--- a/gtk/fileset_dlg.c
+++ b/gtk/fileset_dlg.c
@@ -289,7 +289,8 @@ fileset_cb(GtkWidget *w _U_, gpointer d _U_)
return;
}
- fs_w = window_new(GTK_WINDOW_TOPLEVEL, "");
+ fs_w = dlg_window_new(""); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(fs_w), TRUE);
tooltips = gtk_tooltips_new();
diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c
index 4465d530c1..1300ae3518 100644
--- a/gtk/flow_graph.c
+++ b/gtk/flow_graph.c
@@ -478,7 +478,8 @@ static void flow_graph_dlg_create (void)
GtkTooltips *tooltips = gtk_tooltips_new();
- flow_graph_dlg_w=window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Flow Graph");
+ flow_graph_dlg_w = dlg_window_new("Wireshark: Flow Graph"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(flow_graph_dlg_w), TRUE);
gtk_window_set_default_size(GTK_WINDOW(flow_graph_dlg_w), 250, 150);
diff --git a/gtk/funnel_stat.c b/gtk/funnel_stat.c
index f632c67bb2..56c04256a4 100644
--- a/gtk/funnel_stat.c
+++ b/gtk/funnel_stat.c
@@ -158,7 +158,9 @@ static funnel_text_window_t* new_text_window(const gchar* title) {
tw->close_data = NULL;
tw->buttons = g_ptr_array_new();
- tw->win = window_new(GTK_WINDOW_TOPLEVEL,title);
+ tw->win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(tw->win), TRUE);
+
g_signal_connect(tw->win, "delete-event", G_CALLBACK(text_window_delete_event_cb), tw);
txt_scrollw = scrolled_window_new(NULL, NULL);
diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c
index 5b9b04b1e5..c57606e3ac 100644
--- a/gtk/gsm_a_stat.c
+++ b/gtk/gsm_a_stat.c
@@ -409,7 +409,8 @@ gsm_a_stat_gtk_win_create(
GtkWidget *bbox;
- dlg_p->win = window_new(GTK_WINDOW_TOPLEVEL, title);
+ dlg_p->win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(dlg_p->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(dlg_p->win), 490, 500);
vbox = gtk_vbox_new(FALSE, 3);
diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c
index af13c20fe6..df1eef05fd 100644
--- a/gtk/gsm_map_stat.c
+++ b/gtk/gsm_map_stat.c
@@ -404,7 +404,8 @@ gsm_map_stat_gtk_win_create(
GtkWidget *bbox;
- dlg_p->win = window_new(GTK_WINDOW_TOPLEVEL, title);
+ dlg_p->win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(dlg_p->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(dlg_p->win), 560, 390);
vbox = gtk_vbox_new(FALSE, 3);
diff --git a/gtk/gsm_map_summary.c b/gtk/gsm_map_summary.c
index 25e7690069..e01b279f03 100644
--- a/gtk/gsm_map_summary.c
+++ b/gtk/gsm_map_summary.c
@@ -95,7 +95,8 @@ gsm_map_stat_gtk_sum_cb(GtkWidget *w _U_, gpointer d _U_)
/* initial compututations */
seconds = summary.stop_time - summary.start_time;
- sum_open_w = window_new(GTK_WINDOW_TOPLEVEL, "GSM MAP Statistics: Summary");
+ sum_open_w = dlg_window_new("GSM MAP Statistics: Summary"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(sum_open_w), TRUE);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 3);
diff --git a/gtk/gtp_stat.c b/gtk/gtp_stat.c
index 768f7bd533..8aea0f07d6 100644
--- a/gtk/gtp_stat.c
+++ b/gtk/gtp_stat.c
@@ -167,7 +167,9 @@ gtk_gtpstat_init(const char *optarg, void *userdata _U_)
gtp=g_malloc(sizeof(gtpstat_t));
- gtp->win=window_new(GTK_WINDOW_TOPLEVEL, "gtp-stat");
+ gtp->win = dlg_window_new("gtp-stat"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(gtp->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(gtp->win), 550, 400);
gtpstat_set_title(gtp);
diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c
index eef76c0f24..14b3d6b8f8 100644
--- a/gtk/h225_counter.c
+++ b/gtk/h225_counter.c
@@ -517,7 +517,9 @@ gtk_h225counter_init(const char *optarg, void *userdata _U_)
h225counter_reset(hs);
- hs->win=window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: H.225 counters");
+ hs->win = dlg_window_new("Wireshark: H.225 counters"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(hs->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(hs->win), 400, 200);
hs->vbox=gtk_vbox_new(FALSE, 3);
diff --git a/gtk/h225_ras_srt.c b/gtk/h225_ras_srt.c
index e28cc6d727..3b8d4fffcd 100644
--- a/gtk/h225_ras_srt.c
+++ b/gtk/h225_ras_srt.c
@@ -297,7 +297,8 @@ gtk_h225rassrt_init(const char *optarg, void *userdata _U_)
h225rassrt_reset(hs);
- hs->win=window_new(GTK_WINDOW_TOPLEVEL, "h225-ras-srt");
+ hs->win = dlg_window_new("h225-ras-srt"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(hs->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(hs->win), 600, 300);
hs->vbox=gtk_vbox_new(FALSE, 3);
diff --git a/gtk/hostlist_table.c b/gtk/hostlist_table.c
index 1e732d8c49..17de231ef1 100644
--- a/gtk/hostlist_table.c
+++ b/gtk/hostlist_table.c
@@ -893,7 +893,8 @@ init_hostlist_table(gboolean hide_ports, const char *table_name, const char *tap
hosttable->filter=filter;
hosttable->use_dfilter=FALSE;
g_snprintf(title, sizeof(title), "%s Endpoints: %s", table_name, cf_get_display_name(&cfile));
- hosttable->win=window_new(GTK_WINDOW_TOPLEVEL, title);
+ hosttable->win = dlg_window_new(title); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(hosttable->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(hosttable->win), 750, 400);
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index 59e844dda1..72f08d1ea7 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -2168,8 +2168,9 @@ init_io_stat_window(io_stat_t *io)
GtkWidget *save_bt;
#endif
- /* create the main window */
- io->window=window_new(GTK_WINDOW_TOPLEVEL, "I/O Graphs");
+ /* create the main window, transient_for top_level */
+ io->window = dlg_window_new("I/O Graphs");
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(io->window), TRUE);
vbox=gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(io->window), vbox);
diff --git a/gtk/ldap_stat.c b/gtk/ldap_stat.c
index 3c107aec31..50e71745d6 100644
--- a/gtk/ldap_stat.c
+++ b/gtk/ldap_stat.c
@@ -162,7 +162,8 @@ gtk_ldapstat_init(const char *optarg, void *userdata _U_)
ldap=g_malloc(sizeof(ldapstat_t));
- ldap->win=window_new(GTK_WINDOW_TOPLEVEL, "ldap-stat");
+ ldap->win = dlg_window_new("ldap-stat");
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(ldap->win), TRUE);
gtk_window_set_default_size(GTK_WINDOW(ldap->win), 550, 400);
ldapstat_set_title(ldap);
diff --git a/gtk/mcast_stream_dlg.c b/gtk/mcast_stream_dlg.c
index b0d026f283..d41dd0883d 100644
--- a/gtk/mcast_stream_dlg.c
+++ b/gtk/mcast_stream_dlg.c
@@ -407,7 +407,8 @@ mcast_on_params (GtkButton *button _U_,
return;
}
- mcast_params_dlg = window_new(GTK_WINDOW_TOPLEVEL, "Wireshark: Set parameters for Multicast Stream Analysis");
+ mcast_params_dlg = dlg_window_new("Wireshark: Set parameters for Multicast Stream Analysis");
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(mcast_params_dlg), TRUE);
gtk_window_set_default_size(GTK_WINDOW(mcast_params_dlg), 210, 210);
gtk_widget_show(mcast_params_dlg);
diff --git a/gtk/megaco_stat.c b/gtk/megaco_stat.c
index 622ca08b76..468fb715dd 100644
--- a/gtk/megaco_stat.c
+++ b/gtk/megaco_stat.c
@@ -173,7 +173,9 @@ gtk_megacostat_init(const char *optarg, void *userdata _U_)
megacostat_reset(ms);
- ms->win=window_new(GTK_WINDOW_TOPLEVEL, "MEGACO SRT");
+ ms->win = dlg_window_new("MEGACO SRT"); /* transient_for top_level */
+ gtk_window_set_destroy_with_parent (GTK_WINDOW(ms->win), TRUE);
+
gtk_window_set_default_size(GTK_WINDOW(ms->win), 550, 150);
ms->vbox=gtk_vbox_new(FALSE, 3);