diff options
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r-- | mail/em-folder-selector.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index 855de2f174..843ed018cf 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -243,7 +243,15 @@ em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, co static void emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs) { - g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK); + if (emfs->name_entry->text_length > 0) { + const char *path, *text; + + text = gtk_entry_get_text (emfs->name_entry); + path = em_folder_tree_get_selected_path (emfs->emft); + + if (text && path && !strchr(text, '/')) + g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK); + } } GtkWidget * |