diff options
-rw-r--r-- | mail/ChangeLog | 12 | ||||
-rw-r--r-- | mail/em-folder-selector.c | 2 | ||||
-rw-r--r-- | mail/em-folder-tree.c | 14 |
3 files changed, 21 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 259f4ba0d8..08eca7526f 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,15 @@ +2004-10-05 Not Zed <NotZed@Ximian.com> + + * em-folder-tree.c (emft_popup_copy_folder_selected): remove old + debug which no longer works. + + ** See bug #66991 (related to #64377). + + * em-folder-tree.c (em_folder_tree_set_selected): if we get a NULL + uri or "", just clear the list. + (emft_tree_button_press): select the new path as well as move the + cursor there, otherwise emft_tree_user_event clears the selection. + 2004-09-30 David Malcolm <dmalcolm@redhat.com> * em-migrate.c (upgrade_passwords_1_2): fix uninitialised pointer. diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c index 7df4d50e9f..69f4662d79 100644 --- a/mail/em-folder-selector.c +++ b/mail/em-folder-selector.c @@ -141,7 +141,7 @@ folder_created_cb (EMFolderTreeModel *model, const char *path, const char *uri, camel_exception_init (&ex); if (!(store = (CamelStore *) camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, &ex))) return; - + if (camel_store_folder_uri_equal (store, emfs->created_uri, uri)) { em_folder_tree_set_selected (emfs->emft, uri); g_signal_handler_disconnect (model, emfs->created_id); diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index c516a53735..e8e4ce85d2 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -2165,8 +2165,6 @@ emft_popup_copy_folder_selected (const char *uri, void *data) priv = cfd->emft->priv; - d(printf ("%sing folder '%s' to '%s'\n", cfd->delete ? "move" : "copy", priv->selected_path, uri)); - camel_exception_init (&ex); fromuri = em_folder_tree_get_selected_uri(cfd->emft); @@ -2778,6 +2776,8 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr return FALSE; /* select/focus the row that was right-clicked or double-clicked */ + selection = gtk_tree_view_get_selection (treeview); + gtk_tree_selection_select_path(selection, tree_path); gtk_tree_view_set_cursor (treeview, tree_path, NULL, FALSE); if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { @@ -2789,9 +2789,10 @@ emft_tree_button_press (GtkTreeView *treeview, GdkEventButton *event, EMFolderTr gtk_tree_path_free (tree_path); /* FIXME: we really need the folderinfo to build a proper menu */ - selection = gtk_tree_view_get_selection (treeview); - if (!emft_selection_get_selected (selection, &model, &iter)) + if (!emft_selection_get_selected (selection, &model, &iter)) { + printf("nothing selected!\n"); return FALSE; + } gtk_tree_model_get (model, &iter, COL_POINTER_CAMEL_STORE, &store, COL_STRING_URI, &uri, COL_STRING_FULL_NAME, &full_name, @@ -2883,9 +2884,10 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft) void em_folder_tree_set_selected (EMFolderTree *emft, const char *uri) { - GList *l; + GList *l = NULL; - l = g_list_append(NULL, (void *)uri); + if (uri && uri[0]) + l = g_list_append(l, (void *)uri); em_folder_tree_set_selected_list(emft, l); g_list_free(l); |