diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-15 20:48:39 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2007-02-15 20:48:39 +0000 |
commit | ccc1aa01a4fbe4841ed7227227d3af109ff3a702 (patch) | |
tree | 377d8b7f3e3d7927ebf45bb5d3d4e4bcff0fafab /gtk/proto_dlg.c | |
parent | e33e9189e42b3a5e3b8d3df1f4bc5f32357d9b7e (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 ...
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20818 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/proto_dlg.c')
-rw-r--r-- | gtk/proto_dlg.c | 11 |
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); } |