aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/proto_dlg.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2007-02-15 20:48:39 +0000
committerUlf Lamping <ulf.lamping@web.de>2007-02-15 20:48:39 +0000
commit3a77db6b263b5c381baa1c90062e0f401935fdd2 (patch)
tree377d8b7f3e3d7927ebf45bb5d3d4e4bcff0fafab /gtk/proto_dlg.c
parentc4a52b199589b524140724cb838816ff5a3eb5f2 (diff)
bugfix: call set_proto_selection() before actually writing the selections to disk. Otherwise the changes won't be written to disk correctly (when pressing the OK button).
Interestingly, no complains were heard about this before ... svn path=/trunk/; revision=20818
Diffstat (limited to 'gtk/proto_dlg.c')
-rw-r--r--gtk/proto_dlg.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/proto_dlg.c b/gtk/proto_dlg.c
index 3f959d40a9..3dab099971 100644
--- a/gtk/proto_dlg.c
+++ b/gtk/proto_dlg.c
@@ -443,12 +443,14 @@ proto_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
{
gboolean redissect;
+ /* update the selection now, so we'll save the right things */
+ redissect = set_proto_selection(GTK_WIDGET(parent_w));
+
/* if we don't have a Save button, just save the settings now */
if (!prefs.gui_use_pref_save) {
proto_write(parent_w);
}
- redissect = set_proto_selection(GTK_WIDGET(parent_w));
window_destroy(GTK_WIDGET(parent_w));
if (redissect)
cf_redissect_packets(&cfile);
@@ -457,12 +459,17 @@ proto_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
static void
proto_apply_cb(GtkWidget *apply_bt _U_, gpointer parent_w)
{
+ gboolean redissect;
+
+ /* update the selection now, so we'll save the right things */
+ redissect = set_proto_selection(GTK_WIDGET(parent_w));
+
/* if we don't have a Save button, just save the settings now */
if (!prefs.gui_use_pref_save) {
proto_write(parent_w);
}
- if (set_proto_selection(GTK_WIDGET(parent_w)))
+ if (redissect)
cf_redissect_packets(&cfile);
}