aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-folder-selector.c2
-rw-r--r--mail/em-folder-tree.c25
-rw-r--r--mail/em-folder-tree.h2
-rw-r--r--mail/em-marshal.list1
-rw-r--r--mail/mail-component.c4
6 files changed, 31 insertions, 15 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index fef7ff35d8..ee8338050d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2004-05-06 Radek Doulik <rodo@ximian.com>
* em-composer-prefs.c (sig_selection_changed): reset the preview
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 80f2ca2a0c..88f14705bf 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -203,7 +203,7 @@ emfs_create_name_changed (GtkEntry *entry, EMFolderSelector *emfs)
}
static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderSelector *emfs)
+folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderSelector *emfs)
{
if (emfs->name_entry)
emfs_create_name_changed (emfs->name_entry, emfs);
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);
}
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index 915e73c02e..b8f5ea2c59 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -62,7 +62,7 @@ struct _EMFolderTreeClass {
/* signals */
void (* folder_activated) (EMFolderTree *emft, const char *path, const char *uri);
- void (* folder_selected) (EMFolderTree *emft, const char *path, const char *uri);
+ void (* folder_selected) (EMFolderTree *emft, const char *path, const char *uri, guint32 flags);
};
GType em_folder_tree_get_type (void);
diff --git a/mail/em-marshal.list b/mail/em-marshal.list
index aed944ea0f..6138abbf69 100644
--- a/mail/em-marshal.list
+++ b/mail/em-marshal.list
@@ -1,4 +1,5 @@
BOOLEAN:BOXED,POINTER,POINTER
+VOID:STRING,STRING,UINT
VOID:STRING,STRING
BOOLEAN:POINTER
VOID:POINTER,POINTER
diff --git a/mail/mail-component.c b/mail/mail-component.c
index c40095ed3d..227fa3df34 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -323,9 +323,9 @@ mc_startup(MailComponent *mc)
}
static void
-folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, EMFolderView *view)
+folder_selected_cb (EMFolderTree *emft, const char *path, const char *uri, guint32 flags, EMFolderView *view)
{
- if (!path || !strcmp (path, "/"))
+ if ((flags & CAMEL_FOLDER_NOSELECT) || !path || !strcmp (path, "/"))
em_folder_view_set_folder (view, NULL, NULL);
else
em_folder_view_set_folder_uri (view, uri);