aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/profile_dlg.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2008-01-27 14:45:31 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2008-01-27 14:45:31 +0000
commit45572b611c4a3f704d9f143ea3be4e8f43db1294 (patch)
tree80f8d6970362e176ee2789efc57d4014ca67e66b /gtk/profile_dlg.c
parentc3fa6a267c1fd8a71e05a1c620fb6f62016cc349 (diff)
Do not change profile if directory creation failed, and change to default
profile if existing profile was deleted. svn path=/trunk/; revision=24208
Diffstat (limited to 'gtk/profile_dlg.c')
-rw-r--r--gtk/profile_dlg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/profile_dlg.c b/gtk/profile_dlg.c
index 811343e225..9a102c0709 100644
--- a/gtk/profile_dlg.c
+++ b/gtk/profile_dlg.c
@@ -226,9 +226,12 @@ profile_select(GtkWidget *main_w, GtkTreeView *profile_l, gboolean destroy)
gtk_tree_model_get(model, &iter, 1, &fl_entry, -1);
if (fl_entry) {
profile = (profile_def *) fl_entry->data;
- if (strcmp(profile->name, DEFAULT_PROFILE)!=0) {
+ if (profile_exists (profile->name)) {
+ /* The new profile exists, change */
change_configuration_profile (profile->name);
- } else {
+ } else if (!profile_exists (get_profile_name())) {
+ /* The new profile does not exist, and the previous profile has
+ been deleted. Change to the default profile */
change_configuration_profile (NULL);
}
}