aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-05-07 04:24:33 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-05-07 04:24:33 +0800
commit1edcbb4aa658d9eb298b0d2347cf7fd85970b64a (patch)
treeca3dfa286901d0e9c410526a4856ed8d0ca8c643 /mail/em-folder-tree.c
parent55b11cd1608e14064222c83f35a85fe56b72038d (diff)
downloadgsoc2013-evolution-1edcbb4aa658d9eb298b0d2347cf7fd85970b64a.tar.gz
gsoc2013-evolution-1edcbb4aa658d9eb298b0d2347cf7fd85970b64a.tar.zst
gsoc2013-evolution-1edcbb4aa658d9eb298b0d2347cf7fd85970b64a.zip
Check that the folder is selectable using the new flags argument.
2004-05-06 Jeffrey Stedfast <fejj@ximian.com> * mail-component.c (folder_selected_cb): Check that the folder is selectable using the new flags argument. * em-folder-selector.c (folder_selected_cb): Updated for below changes. * em-folder-tree.c (emft_tree_selection_changed): Updated to pass a flags argument to the folder_selected signal. (emft_tree_row_activated): Same. svn path=/trunk/; revision=25816
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index de15e93555..68bf9eceb2 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -200,10 +200,11 @@ em_folder_tree_class_init (EMFolderTreeClass *klass)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EMFolderTreeClass, folder_selected),
NULL, NULL,
- em_marshal_VOID__STRING_STRING,
- G_TYPE_NONE, 2,
+ em_marshal_VOID__STRING_STRING_UINT,
+ G_TYPE_NONE, 3,
G_TYPE_STRING,
- G_TYPE_STRING);
+ G_TYPE_STRING,
+ G_TYPE_UINT);
signals[FOLDER_ACTIVATED] =
g_signal_new ("folder-activated",
@@ -1827,23 +1828,24 @@ emft_tree_row_activated (GtkTreeView *treeview, GtkTreePath *tree_path, GtkTreeV
GtkTreeModel *model = (GtkTreeModel *) priv->model;
GtkTreeIter iter;
char *path, *uri;
-
+ guint32 flags;
+
if (!emft_select_func(NULL, model, tree_path, FALSE, emft))
return;
-
+
if (!gtk_tree_model_get_iter (model, &iter, tree_path))
return;
-
+
gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &path,
- COL_STRING_URI, &uri, -1);
-
+ COL_STRING_URI, &uri, COL_UINT_FLAGS, &flags, -1);
+
g_free (priv->selected_uri);
priv->selected_uri = g_strdup (uri);
g_free (priv->selected_path);
priv->selected_path = g_strdup (path);
- g_signal_emit (emft, signals[FOLDER_SELECTED], 0, path, uri);
+ g_signal_emit (emft, signals[FOLDER_SELECTED], 0, path, uri, flags);
g_signal_emit (emft, signals[FOLDER_ACTIVATED], 0, path, uri);
}
@@ -2716,12 +2718,13 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
GtkTreeModel *model;
GtkTreeIter iter;
char *path, *uri;
+ guint32 flags;
if (!emft_selection_get_selected (selection, &model, &iter))
return;
gtk_tree_model_get (model, &iter, COL_STRING_FOLDER_PATH, &path,
- COL_STRING_URI, &uri, -1);
+ COL_STRING_URI, &uri, COL_UINT_FLAGS, &flags, -1);
g_free (priv->selected_uri);
priv->selected_uri = g_strdup (uri);
@@ -2729,7 +2732,7 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
g_free (priv->selected_path);
priv->selected_path = g_strdup (path);
- g_signal_emit (emft, signals[FOLDER_SELECTED], 0, path, uri);
+ g_signal_emit (emft, signals[FOLDER_SELECTED], 0, path, uri, flags);
}