diff options
author | Not Zed <NotZed@Ximian.com> | 2004-10-06 11:33:55 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-10-06 11:33:55 +0800 |
commit | 318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e (patch) | |
tree | 939a09608047dcd300331a3b378d46b4ccab9a8b /mail/em-folder-tree.c | |
parent | 7501aec23887fe0d6e68620b00326c6f2fc3c260 (diff) | |
download | gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.gz gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.zst gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.zip |
remove old debug which no longer works.
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.
svn path=/trunk/; revision=27469
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r-- | mail/em-folder-tree.c | 14 |
1 files changed, 8 insertions, 6 deletions
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); |