aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-selector.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-11 17:18:55 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-11 17:18:55 +0800
commite74576a4377a8daa0e8fcc233c6c530943aeeba4 (patch)
treea98631de04bdb5fb4d4f9c7008628c9787bd4e3e /mail/em-folder-selector.c
parent295bf2894052c2c34639b109166355de5c854fc8 (diff)
downloadgsoc2013-evolution-e74576a4377a8daa0e8fcc233c6c530943aeeba4.tar.gz
gsoc2013-evolution-e74576a4377a8daa0e8fcc233c6c530943aeeba4.tar.zst
gsoc2013-evolution-e74576a4377a8daa0e8fcc233c6c530943aeeba4.zip
rearrange the setting up of the target flags, stores can have a null path.
2004-06-11 Not Zed <NotZed@Ximian.com> * em-folder-tree.c (emft_tree_button_press): rearrange the setting up of the target flags, stores can have a null path. * em-folder-selector.c (emfs_create_name_changed): use get_selected_uri rather than path. a valid uri may have a null path now. (emfs_create_name_activate): and here too. (em_folder_selector_get_selected_path): check the uri is null for a selected path, and then handle a null path. svn path=/trunk/; revision=26307
Diffstat (limited to 'mail/em-folder-selector.c')
-rw-r--r--mail/em-folder-selector.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index f31e06c78c..9f75db119d 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -195,7 +195,7 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
if (emfs->name_entry->text_length > 0)
text = gtk_entry_get_text (emfs->name_entry);
- path = em_folder_tree_get_selected_path (emfs->emft);
+ path = em_folder_tree_get_selected_uri(emfs->emft);
active = text && path && !strchr (text, '/');
@@ -279,7 +279,7 @@ emfs_create_name_activate (GtkEntry *entry, EMFolderSelector *emfs)
const char *path, *text;
text = gtk_entry_get_text (emfs->name_entry);
- path = em_folder_tree_get_selected_path (emfs->emft);
+ path = em_folder_tree_get_selected_uri(emfs->emft);
if (text && path && !strchr (text, '/'))
g_signal_emit_by_name (emfs, "response", GTK_RESPONSE_OK);
@@ -403,13 +403,15 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs)
/* already did the work in a previous call */
return emfs->selected_path;
}
-
- if (!(path = em_folder_tree_get_selected_path (emfs->emft))) {
+
+ if (!em_folder_tree_get_selected_uri(emfs->emft)) {
d(printf ("no selected folder?\n"));
return NULL;
}
-
- if (path && emfs->name_entry) {
+
+ path = em_folder_tree_get_selected_path(emfs->emft);
+ path = path?path:"";
+ if (emfs->name_entry) {
const char *name;
char *newpath;