aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-subscribe-editor.c
diff options
context:
space:
mode:
authorMeilof Veeningen <meilof@wanadoo.nl>2004-01-13 06:22:50 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-13 06:22:50 +0800
commit2505d230498c0f35822e7d10502bb3f899fdf876 (patch)
tree3f187bc063daa0f0a99b248c6a2c4b613a184c95 /mail/em-subscribe-editor.c
parent39a61d9ccdf9d19a30d07a49c8d4919689845465 (diff)
downloadgsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar.gz
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar.bz2
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar.lz
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar.xz
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.tar.zst
gsoc2013-evolution-2505d230498c0f35822e7d10502bb3f899fdf876.zip
support for posting both to mail and to (multiple) folders
2004-01-12 Meilof Veeningen <meilof@wanadoo.nl> * em-composer-utils.c: support for posting both to mail and to (multiple) folders * em-folder-browser.c: use em_utils_post_to_folder (works with NNTP) * em-folder-selection-button.[ch]: added multiple selection mode * em-folder-selector.[ch]: idem * em-folder-tree.[ch]: added multiple selection mode, no longer show disabled accounts * em-utils.c: various changes to allow posting to (multiple) folders * em-subscribe-editor.c: double-clicking a node in the editor updates it directly * mail-ops.c: for appending messages, set the "X-Mailer" header svn path=/trunk/; revision=24182
Diffstat (limited to 'mail/em-subscribe-editor.c')
-rw-r--r--mail/em-subscribe-editor.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 1fb9066362..a23af0a333 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -127,7 +127,6 @@ struct _EMSubscribeNode {
static void sub_editor_busy(EMSubscribeEditor *se, int dir);
static int sub_queue_fill_level(EMSubscribe *sub, EMSubscribeNode *node);
-static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub);
static void
sub_node_free(char *key, EMSubscribeNode *node, EMSubscribe *sub)
@@ -195,7 +194,7 @@ sub_folder_subscribe (struct _mail_msg *mm)
camel_store_unsubscribe_folder (m->sub->store, m->node->info->full_name, &mm->ex);
}
-static void
+static void
sub_folder_subscribed (struct _mail_msg *mm)
{
struct _zsubscribe_msg *m = (struct _zsubscribe_msg *)mm, *next;
@@ -503,6 +502,29 @@ sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub)
gtk_widget_set_sensitive(sub->editor->unsubscribe_button, dounsub);
}
+/* double-clicking causes a node item to be evaluated directly */
+static void sub_row_activated(GtkTreeView *tree, GtkTreePath *path, GtkTreeViewColumn *col, EMSubscribe *sub) {
+ EMSubscribeNode *node;
+ GtkTreeIter iter;
+ GtkTreeModel *model = gtk_tree_view_get_model(tree);
+
+ if (gtk_tree_model_get_iter(model, &iter, path) != TRUE) return;
+
+ gtk_tree_model_get(model, &iter, 2, &node, -1);
+
+ /* check whether the item is already processed */
+ if (node->path == NULL)
+ return;
+
+ /* remove it from wherever in the list it is, and place it in front instead */
+ e_dlist_remove((EDListNode *)node);
+ e_dlist_addhead(&sub->pending, (EDListNode *)node);
+
+ if (sub->pending_id == -1
+ && (node = (EMSubscribeNode *)e_dlist_remtail(&sub->pending)))
+ sub_queue_fill_level(sub, node);
+}
+
static void
sub_row_expanded(GtkTreeView *tree, GtkTreeIter *iter, GtkTreePath *path, EMSubscribe *sub)
{
@@ -621,6 +643,7 @@ subscribe_set_store(EMSubscribe *sub, CamelStore *store)
gtk_tree_view_set_headers_visible (sub->tree, FALSE);
g_signal_connect(sub->tree, "row-expanded", G_CALLBACK(sub_row_expanded), sub);
+ g_signal_connect(sub->tree, "row-activated", G_CALLBACK(sub_row_activated), sub);
g_signal_connect(sub->tree, "destroy", G_CALLBACK(sub_destroy), sub);
sub_selection_changed(selection, sub);