aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-10-06 11:33:55 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-10-06 11:33:55 +0800
commit318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e (patch)
tree939a09608047dcd300331a3b378d46b4ccab9a8b
parent7501aec23887fe0d6e68620b00326c6f2fc3c260 (diff)
downloadgsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar
gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.gz
gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.bz2
gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.lz
gsoc2013-evolution-318dc1564b1c8fca154ecd281b2b1a82dfe8ae4e.tar.xz
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
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-folder-selector.c2
-rw-r--r--mail/em-folder-tree.c14
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);