diff options
author | Jason Leach <jleach@ximian.com> | 2001-07-31 03:21:01 +0800 |
---|---|---|
committer | Jacob Leach <jleach@src.gnome.org> | 2001-07-31 03:21:01 +0800 |
commit | 116e504828b7383a447579142e06ca0f161864df (patch) | |
tree | 4caf818854a6f5f44e7c9dcca65d0d39c6aa103b /shell | |
parent | 8438ce6564ded2184c30f748043e243adafe4d8d (diff) | |
download | gsoc2013-evolution-116e504828b7383a447579142e06ca0f161864df.tar.gz gsoc2013-evolution-116e504828b7383a447579142e06ca0f161864df.tar.zst gsoc2013-evolution-116e504828b7383a447579142e06ca0f161864df.zip |
If we can't create a folder because it already exists, select that folder
2001-07-30 Jason Leach <jleach@ximian.com>
* e-shell-folder-creation-dialog.c (async_create_cb): If we can't
create a folder because it already exists, select that folder that
exists. Bug #1716.
svn path=/trunk/; revision=11482
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-folder-creation-dialog.c | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 8218f18693..228929239c 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2001-07-30 Jason Leach <jleach@ximian.com> + + * e-shell-folder-creation-dialog.c (async_create_cb): If we can't + create a folder because it already exists, select that folder that + exists. Bug #1716. + 2001-07-30 Frederic Crozat <fcrozat@mandrakesoft.com> * main.c (main): call gconf_init if gtkhtml is compiled with gconf diff --git a/shell/e-shell-folder-creation-dialog.c b/shell/e-shell-folder-creation-dialog.c index ea81bfdc58..84f8fce403 100644 --- a/shell/e-shell-folder-creation-dialog.c +++ b/shell/e-shell-folder-creation-dialog.c @@ -86,6 +86,7 @@ async_create_cb (EStorageSet *storage_set, dialog_data = (DialogData *) data; if (result == E_STORAGE_OK) { + /* Success! Tell the callback of this, then return */ if (dialog_data->result_callback != NULL) (* dialog_data->result_callback) (dialog_data->shell, E_SHELL_FOLDER_CREATION_DIALOG_RESULT_SUCCESS, @@ -93,8 +94,19 @@ async_create_cb (EStorageSet *storage_set, dialog_data->result_callback_data); gtk_widget_destroy (dialog_data->dialog); return; + } else if (result == E_STORAGE_EXISTS) { + e_storage_set_view_set_current_folder (E_STORAGE_SET_VIEW (dialog_data->storage_set_view), + dialog_data->folder_path); } + /* Tell the callback something failed, then popup a dialog + explaining how it failed */ + if (dialog_data->result_callback != NULL) + (* dialog_data->result_callback) (dialog_data->shell, + E_SHELL_FOLDER_CREATION_DIALOG_RESULT_FAIL, + dialog_data->folder_path, + dialog_data->result_callback_data); + e_notice (GTK_WINDOW (dialog_data->dialog), GNOME_MESSAGE_BOX_ERROR, _("Cannot create the specified folder:\n%s"), e_storage_result_to_string (result)); |