aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/profile_dlg.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-14 21:58:45 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-14 21:58:45 +0000
commitc6ab78409fe149e1e6e4486063a2afcc9bda0bc5 (patch)
tree82d9eddf10f63712a34326a38fd504a8b1747967 /gtk/profile_dlg.c
parentba3f5057b1d8ba1bdc102905b101b8b5ecb68f9b (diff)
downloadwireshark-c6ab78409fe149e1e6e4486063a2afcc9bda0bc5.tar.gz
wireshark-c6ab78409fe149e1e6e4486063a2afcc9bda0bc5.tar.bz2
wireshark-c6ab78409fe149e1e6e4486063a2afcc9bda0bc5.zip
Save the changes also when selecting a profile from the list.
svn path=/trunk/; revision=24092
Diffstat (limited to 'gtk/profile_dlg.c')
-rw-r--r--gtk/profile_dlg.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/gtk/profile_dlg.c b/gtk/profile_dlg.c
index 5556dc2f26..f0d303c309 100644
--- a/gtk/profile_dlg.c
+++ b/gtk/profile_dlg.c
@@ -246,23 +246,7 @@ profile_select(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
}
static void
-profile_dlg_select(GtkTreeView *profile_l, gpointer main_w_arg)
-{
- GtkWidget *main_w = GTK_WIDGET(main_w_arg);
-
- profile_select(main_w, profile_l, TRUE);
-}
-
-static void
-profile_apply(GtkWidget *main_w, gboolean destroy)
-{
- GtkTreeView *profile_l = GTK_TREE_VIEW(OBJECT_GET_DATA(main_w, E_PROF_PROFILE_L_KEY));
-
- profile_select(main_w, profile_l, destroy);
-}
-
-static void
-profile_dlg_save(void)
+profile_save(void)
{
char *pf_dir_path, *pf_dir_path2;
GList *fl1, *fl2;
@@ -335,12 +319,28 @@ profile_dlg_save(void)
}
static void
-profile_dlg_ok_cb(GtkWidget *ok_bt, gpointer data _U_)
+profile_dlg_select(GtkTreeView *profile_l, gpointer main_w_arg)
{
- profile_dlg_save();
+ GtkWidget *main_w = GTK_WIDGET(main_w_arg);
+
+ profile_save();
+ profile_select(main_w, profile_l, TRUE);
+}
+static void
+profile_apply(GtkWidget *main_w, gboolean destroy)
+{
+ GtkTreeView *profile_l = GTK_TREE_VIEW(OBJECT_GET_DATA(main_w, E_PROF_PROFILE_L_KEY));
+
+ profile_save();
+ profile_select(main_w, profile_l, destroy);
+}
+
+static void
+profile_dlg_ok_cb(GtkWidget *ok_bt, gpointer data _U_)
+{
/*
- * Destroy the dialog box and apply the profile.
+ * Apply the profile and destroy the dialog box.
*/
profile_apply(gtk_widget_get_toplevel(ok_bt), TRUE);
}
@@ -348,8 +348,6 @@ profile_dlg_ok_cb(GtkWidget *ok_bt, gpointer data _U_)
static void
profile_dlg_apply_cb(GtkWidget *apply_bt, gpointer data _U_)
{
- profile_dlg_save();
-
/*
* Apply the profile, but don't destroy the dialog box.
*/