[Commits] [SCM] claws branch, master, updated. 3.13.0-25-g5ec3745
ticho at claws-mail.org
ticho at claws-mail.org
Wed Oct 21 20:49:55 CEST 2015
The branch, master has been updated
via 5ec374526d3d77f9671c9e7b0b25a01e12ca7710 (commit)
from c974a4585f1d06bbf6981637a4fa9ff62eb60ccd (commit)
Summary of changes:
src/folderview.c | 19 +++++++------------
src/imap_gtk.c | 12 +++++-------
src/mh_gtk.c | 3 +--
src/news_gtk.c | 8 +++-----
src/plugins/mailmbox/plugin_gtk.c | 3 +--
src/plugins/rssyl/rssyl_cb_menu.c | 9 +++------
src/plugins/vcalendar/vcal_folder.c | 4 ++--
7 files changed, 22 insertions(+), 36 deletions(-)
- Log -----------------------------------------------------------------
commit 5ec374526d3d77f9671c9e7b0b25a01e12ca7710
Author: Andrej Kacian <andrej at kacian.sk>
Date: Wed Oct 21 20:49:03 2015 +0200
Use folderview_get_selected_item() more.
diff --git a/src/folderview.c b/src/folderview.c
index a9a1fd1..1db8aa4 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -552,7 +552,7 @@ void folderview_set_column_order(FolderView *folderview)
}
if (folderview->selected)
- sel_item = gtk_cmctree_node_get_row_data(GTK_CMCTREE(ctree), folderview->selected);
+ sel_item = folderview_get_selected_item(folderview);
if (folderview->opened)
op_item = gtk_cmctree_node_get_row_data(GTK_CMCTREE(ctree), folderview->opened);
@@ -769,7 +769,7 @@ void folderview_set(FolderView *folderview)
main_window_cursor_wait(mainwin);
if (folderview->selected)
- sel_item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ sel_item = folderview_get_selected_item(folderview);
if (folderview->opened)
op_item = gtk_cmctree_node_get_row_data(ctree, folderview->opened);
@@ -2350,7 +2350,6 @@ static void folderview_create_folder_node(FolderView *folderview, FolderItem *it
static void folderview_empty_trash_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
GSList *mlist = NULL;
GSList *cur = NULL;
@@ -2358,7 +2357,7 @@ static void folderview_empty_trash_cb(GtkAction *action, gpointer data)
PrefsAccount *ac;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -2394,14 +2393,13 @@ static void folderview_empty_trash_cb(GtkAction *action, gpointer data)
static void folderview_send_queue_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *special_queue = NULL;
PrefsAccount *ac;
gchar *errstr = NULL;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -2456,12 +2454,11 @@ static void folderview_search_cb(GtkAction *action, gpointer data)
static void folderview_run_processing_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -2473,12 +2470,11 @@ static void folderview_run_processing_cb(GtkAction *action, gpointer data)
static void folderview_property_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -2615,13 +2611,12 @@ static gint folderview_clist_compare(GtkCMCList *clist,
static void folderview_processing_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
gchar *id, *title;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
diff --git a/src/imap_gtk.c b/src/imap_gtk.c
index abbb805..0b0a2b9 100644
--- a/src/imap_gtk.c
+++ b/src/imap_gtk.c
@@ -176,7 +176,6 @@ static void set_sensitivity(GtkUIManager *ui_manager, FolderItem *item)
static void new_folder_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *new_item;
gchar *new_folder;
@@ -186,7 +185,7 @@ static void new_folder_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
cm_return_if_fail(item->folder->account != NULL);
@@ -349,7 +348,7 @@ static void delete_folder_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->path != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -492,7 +491,7 @@ static void subscribe_cb_full(FolderView *folderview, guint action)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
@@ -613,7 +612,7 @@ static void subscribed_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
- FolderItem *item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ FolderItem *item = folderview_get_selected_item(folderview);
if (!item || !item->folder || !item->folder->account)
return;
@@ -635,11 +634,10 @@ static void subscribed_cb(GtkAction *action, gpointer data)
static void download_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
imap_gtk_synchronise(item, 0);
}
diff --git a/src/mh_gtk.c b/src/mh_gtk.c
index d5f0fd5..f98cc1e 100644
--- a/src/mh_gtk.c
+++ b/src/mh_gtk.c
@@ -129,7 +129,6 @@ static void set_sensitivity(GtkUIManager *ui_manager, FolderItem *item)
static void new_folder_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *new_item;
gchar *new_folder;
@@ -138,7 +137,7 @@ static void new_folder_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
cm_return_if_fail(item->folder != NULL);
diff --git a/src/news_gtk.c b/src/news_gtk.c
index 74d82df..2783f78 100644
--- a/src/news_gtk.c
+++ b/src/news_gtk.c
@@ -162,7 +162,7 @@ static void subscribe_newsgroup_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
if (mainwin->lock_count || news_folder_locked(item->folder))
@@ -240,7 +240,6 @@ static void subscribe_newsgroup_cb(GtkAction *action, gpointer data)
static void unsubscribe_newsgroup_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
gchar *name;
gchar *message;
@@ -250,7 +249,7 @@ static void unsubscribe_newsgroup_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
cm_return_if_fail(item != NULL);
if (mainwin->lock_count || news_folder_locked(item->folder))
@@ -411,11 +410,10 @@ void news_gtk_synchronise(FolderItem *item, gint days)
static void download_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
news_gtk_synchronise(item, 0);
}
diff --git a/src/plugins/mailmbox/plugin_gtk.c b/src/plugins/mailmbox/plugin_gtk.c
index 9402879..75de2f2 100644
--- a/src/plugins/mailmbox/plugin_gtk.c
+++ b/src/plugins/mailmbox/plugin_gtk.c
@@ -229,7 +229,6 @@ static void add_mailbox(GtkAction *action, gpointer callback_data)
static void new_folder_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *new_item;
gchar *new_folder;
@@ -238,7 +237,7 @@ static void new_folder_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
diff --git a/src/plugins/rssyl/rssyl_cb_menu.c b/src/plugins/rssyl/rssyl_cb_menu.c
index 73347f4..476d2bc 100644
--- a/src/plugins/rssyl/rssyl_cb_menu.c
+++ b/src/plugins/rssyl/rssyl_cb_menu.c
@@ -51,7 +51,6 @@ void rssyl_new_feed_cb(GtkAction *action,
gpointer data)
{
FolderView *folderview = (FolderView*)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
gchar *url;
@@ -59,7 +58,7 @@ void rssyl_new_feed_cb(GtkAction *action,
g_return_if_fail(folderview->selected != NULL);
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
@@ -78,7 +77,6 @@ void rssyl_new_folder_cb(GtkAction *action,
gpointer data)
{
FolderView *folderview = (FolderView*)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item;
FolderItem *new_item;
gchar *new_folder, *p, *tmp;
@@ -86,7 +84,7 @@ void rssyl_new_folder_cb(GtkAction *action,
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
@@ -342,7 +340,6 @@ void rssyl_remove_mailbox_cb(GtkAction *action, gpointer data)
void rssyl_import_feed_list_cb(GtkAction *action, gpointer data)
{
FolderView *folderview = (FolderView *)data;
- GtkCMCTree *ctree = GTK_CMCTREE(folderview->ctree);
FolderItem *item = NULL;
gchar *path = NULL;
OPMLImportCtx *ctx = NULL;
@@ -359,7 +356,7 @@ void rssyl_import_feed_list_cb(GtkAction *action, gpointer data)
/* Find the destination folder for the import */
g_return_if_fail(folderview->selected != NULL);
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
g_return_if_fail(item != NULL);
g_return_if_fail(item->folder != NULL);
diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c
index b02ee76..ec86574 100644
--- a/src/plugins/vcalendar/vcal_folder.c
+++ b/src/plugins/vcalendar/vcal_folder.c
@@ -1959,7 +1959,7 @@ static void unsubscribe_cal_cb(GtkAction *action, gpointer data)
if (!folderview->selected) return;
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
g_return_if_fail(item != NULL);
g_return_if_fail(item->path != NULL);
g_return_if_fail(item->folder != NULL);
@@ -2073,7 +2073,7 @@ static void set_view_cb(GtkAction *gaction, GtkRadioAction *current, gpointer da
if (setting_sensitivity) return;
oitem = gtk_cmctree_node_get_row_data(ctree, folderview->opened);
- item = gtk_cmctree_node_get_row_data(ctree, folderview->selected);
+ item = folderview_get_selected_item(folderview);
if (!item)
return;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list