From d88e794ded5fc1ea72af2a3d0ec4c46442a992cf Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Fri, 13 May 2005 21:29:28 +0000 Subject: Add profiler so that it gets disted properly 2005-05-13 Rodney Dawes * plugins/Makefile.am (DIST_SUBDIRS): Add profiler so that it gets disted properly 2005-05-13 Rodney Dawes * Makefile.am: Add new em-folder-utils.[ch] abstraction * em-folder-browser.c: Update for new menu layout Add new methods to handle the actions that were previously only available from the context menu when right-clicking on a folder * em-folder-selector.c (emfs_response): Just call emfu_folder_create if the user wants to create a new folder in the selector dialog (em_folder_selector_get_selected_path): Clean up the code to fix a couple potential crashes * em-folder-tree.[ch]: Add methods to get pointers to a CamelFolder or CamelFolderInfo object for the selected item in the tree Add a method to get a pointer to an EMFolderTreeModelStoreInfo object for the selected store in the tree Move folder operations out into em-folder-utils.[ch] so that they are abstracted from the tree and can be used by methods other than the internal context menu * em-folder-utils.[ch]: Move the folder operations code to here * em-folder-view.c: Update for the new menu layout Fix Mark as Read/Unread in the context menu to only show up in the list * mail-component.c (create_item): Just call emfu_folder_create here when the user requests to create a new folder from the New toolbar item 2005-05-13 Rodney Dawes * org-gnome-mailing-list-actions.xml: Update for the new menu layout 2005-05-13 Rodney Dawes * org-gnome-plugin-manager.xml: Update for new menu layout 2005-05-13 Rodney Dawes * org-gnome-save-attachments.xml: Update for new menu layout 2005-05-13 Rodney Dawes * e-shell-window.c (setup_widgets): Update for the new menu layout by putting the "component" switching items under the "Tools" menu 2005-05-13 Rodney Dawes * *.xml: Update to the new menu layout 2005-05-13 Rodney Dawes * e-filter-bar.[ch]: Update for the new menu layout svn path=/trunk/; revision=29354 --- mail/em-folder-selector.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'mail/em-folder-selector.c') diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index 69f4662d79..4a88e29ad9 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -161,28 +161,7 @@ emfs_response (GtkWidget *dialog, int response, EMFolderSelector *emfs) if (response != EM_FOLDER_SELECTOR_RESPONSE_NEW) return; - model = em_folder_tree_get_model (emfs->emft); - emft = (EMFolderTree *) em_folder_tree_new_with_model (model); - dialog = em_folder_selector_create_new (emft, 0, _("Create New Folder"), _("Specify where to create the folder:")); - gtk_window_set_transient_for ((GtkWindow *) dialog, (GtkWindow *) emfs); - uri = em_folder_selector_get_selected_uri (emfs); - if (uri) - em_folder_tree_set_selected (emft, uri); - - if (gtk_dialog_run ((GtkDialog *) dialog) == GTK_RESPONSE_OK) { - uri = em_folder_selector_get_selected_uri ((EMFolderSelector *) dialog); - path = em_folder_selector_get_selected_path ((EMFolderSelector *) dialog); - - g_free (emfs->created_uri); - emfs->created_uri = g_strdup (uri); - - if (emfs->created_id == 0) - emfs->created_id = g_signal_connect (model, "folder-added", G_CALLBACK (folder_created_cb), emfs); - - em_folder_tree_create_folder (emfs->emft, path, uri); - } - - gtk_widget_destroy (dialog); + emfu_folder_create (NULL); g_signal_stop_emission_by_name (emfs, "response"); } @@ -421,13 +400,10 @@ em_folder_selector_get_selected_path (EMFolderSelector *emfs) char *newpath; name = gtk_entry_get_text (emfs->name_entry); - if (strcmp (path, "") != 0) - newpath = g_strdup_printf ("%s/%s", path?path:"", name); - else - newpath = g_strdup (name); - + newpath = g_strdup_printf ("%s/%s", path?path:"", name); + g_free(path); - emfs->selected_path = newpath; + emfs->selected_path = g_strdup (newpath); } else { g_free(emfs->selected_path); emfs->selected_path = path?path:g_strdup(""); -- cgit v1.2.3