[Commits] [SCM] claws branch, master, updated. 3.16.0-78-gb096ea9
ticho at claws-mail.org
ticho at claws-mail.org
Tue Feb 27 20:24:28 CET 2018
The branch, master has been updated
via b096ea90d1279b0838eb6c25f6ee801ee63f297e (commit)
from 4c168abbad5d0e4f50735e1c380d05596c7af222 (commit)
Summary of changes:
src/account.c | 6 ++++--
src/addressadd.c | 3 ++-
src/editldap_basedn.c | 10 ++--------
src/importldif.c | 13 ++++++-------
src/mimeview.c | 3 ++-
src/plugins/pgpcore/select-keys.c | 3 ++-
src/ssl_manager.c | 19 ++++++++-----------
7 files changed, 26 insertions(+), 31 deletions(-)
- Log -----------------------------------------------------------------
commit b096ea90d1279b0838eb6c25f6ee801ee63f297e
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Tue Feb 27 20:24:06 2018 +0100
Update uses of gtkut_tree_view_get_selected_pointer().
diff --git a/src/account.c b/src/account.c
index 52e88f5..be5967f 100644
--- a/src/account.c
+++ b/src/account.c
@@ -1633,7 +1633,8 @@ static gint account_list_view_get_selected_account_id(GtkWidget *list_view)
PrefsAccount *res = NULL;
res = (PrefsAccount *)gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(list_view), ACCOUNT_DATA);
+ GTK_TREE_VIEW(list_view), ACCOUNT_DATA,
+ NULL, NULL, NULL);
return (res != NULL ? res->account_id : -1);
}
@@ -1663,7 +1664,8 @@ static PrefsAccount *account_list_view_get_selected_account(GtkWidget *list_view
{
PrefsAccount *res =
(PrefsAccount *)gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(list_view), ACCOUNT_DATA);
+ GTK_TREE_VIEW(list_view), ACCOUNT_DATA,
+ NULL, NULL, NULL);
return res;
}
diff --git a/src/addressadd.c b/src/addressadd.c
index a6a7f2a..dda7b7a 100644
--- a/src/addressadd.c
+++ b/src/addressadd.c
@@ -132,7 +132,8 @@ static gboolean addressadd_key_pressed( GtkWidget *widget, GdkEventKey *event, g
static void set_selected_ptr()
{
addressadd_dlg.fiSelected = gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(addressadd_dlg.tree_folder), ADDRADD_COL_PTR);
+ GTK_TREE_VIEW(addressadd_dlg.tree_folder), ADDRADD_COL_PTR,
+ NULL, NULL, NULL);
}
static void addressadd_ok( GtkWidget *widget, gboolean *cancelled ) {
diff --git a/src/editldap_basedn.c b/src/editldap_basedn.c
index 07a8fc5..6fcaeda 100644
--- a/src/editldap_basedn.c
+++ b/src/editldap_basedn.c
@@ -95,19 +95,13 @@ static void set_selected()
{
GtkWidget *entry = ldapedit_basedn.basedn_entry;
GtkWidget *view = ldapedit_basedn.basedn_list;
- GtkTreeModel *model;
- GtkTreeSelection *sel;
- GtkTreeIter iter;
gchar *text;
if (entry == NULL || view == NULL)
return;
- sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
- if (!gtk_tree_selection_get_selected(sel, &model, &iter))
- return;
-
- gtk_tree_model_get(model, &iter, 0, &text, -1);
+ text = gtkut_tree_view_get_selected_pointer(
+ GTK_TREE_VIEW(view), 0, NULL, NULL, NULL);
if (text == NULL)
return;
diff --git a/src/importldif.c b/src/importldif.c
index 707146c..91bf665 100644
--- a/src/importldif.c
+++ b/src/importldif.c
@@ -277,18 +277,16 @@ static gboolean imp_ldif_field_move() {
static void _update_selected_row()
{
- GtkWidget *view = impldif_dlg.view_fields;
GtkTreeModel *model;
- GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(view));
GtkTreeIter iter;
Ldif_FieldRec *rec;
- if (!gtk_tree_selection_get_selected(sel, &model, &iter))
+ rec = gtkut_tree_view_get_selected_pointer(
+ GTK_TREE_VIEW(impldif_dlg.view_fields), FIELD_COL_PTR,
+ &model, NULL, &iter);
+ if (rec == NULL)
return;
- gtk_tree_model_get(model, &iter, FIELD_COL_PTR, &rec, -1);
- cm_return_if_fail(rec != NULL);
-
ldif_field_set_name(rec, gtk_entry_get_text(
GTK_ENTRY(impldif_dlg.entryAttrib)));
ldif_field_set_selected(rec, gtk_toggle_button_get_active(
@@ -592,7 +590,8 @@ static void imp_ldif_field_list_cursor_changed(GtkTreeView *view,
gtk_entry_set_text( GTK_ENTRY(impldif_dlg.entryAttrib), "" );
- rec = gtkut_tree_view_get_selected_pointer(view, FIELD_COL_PTR);
+ rec = gtkut_tree_view_get_selected_pointer(view, FIELD_COL_PTR,
+ NULL, NULL, NULL);
if( rec != NULL) {
/* Update widget contents */
diff --git a/src/mimeview.c b/src/mimeview.c
index 82cfd78..a00c72f 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -569,7 +569,8 @@ void mimeview_destroy(MimeView *mimeview)
MimeInfo *mimeview_get_selected_part(MimeView *mimeview)
{
return gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(mimeview->ctree), COL_DATA);
+ GTK_TREE_VIEW(mimeview->ctree), COL_DATA,
+ NULL, NULL, NULL);
}
MimeInfo *mimeview_get_node_part(MimeView *mimeview, GtkTreePath *path)
diff --git a/src/plugins/pgpcore/select-keys.c b/src/plugins/pgpcore/select-keys.c
index 0598851..4bfae56 100644
--- a/src/plugins/pgpcore/select-keys.c
+++ b/src/plugins/pgpcore/select-keys.c
@@ -614,7 +614,8 @@ select_btn_cb (GtkWidget *widget, gpointer data)
cm_return_if_fail (sk);
key = gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(sk->view), COL_PTR);
+ GTK_TREE_VIEW(sk->view), COL_PTR,
+ NULL, NULL, NULL);
if (key) {
gpgme_user_id_t uid;
for (uid = key->uids; uid; uid = uid->next) {
diff --git a/src/ssl_manager.c b/src/ssl_manager.c
index 1792b35..38d8457 100644
--- a/src/ssl_manager.c
+++ b/src/ssl_manager.c
@@ -393,17 +393,13 @@ static void ssl_manager_delete_cb(GtkWidget *widget,
{
SSLCertificate *cert;
int val;
- GtkTreeIter sel;
+ GtkTreeIter iter;
GtkTreeModel *model;
- if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection
- (GTK_TREE_VIEW(manager.certlist)),
- &model, &sel))
- return;
-
- gtk_tree_model_get(model, &sel,
- SSL_MANAGER_CERT, &cert,
- -1);
+ cert = gtkut_tree_view_get_selected_pointer(
+ GTK_TREE_VIEW(manager.certlist), SSL_MANAGER_CERT,
+ &model, NULL, &iter);
+
if (!cert)
return;
@@ -418,7 +414,7 @@ static void ssl_manager_delete_cb(GtkWidget *widget,
ssl_certificate_delete_from_disk(cert);
ssl_certificate_destroy(cert);
- gtk_list_store_remove(GTK_LIST_STORE(model), &sel);
+ gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
}
static void ssl_manager_view_cb(GtkWidget *widget,
@@ -427,7 +423,8 @@ static void ssl_manager_view_cb(GtkWidget *widget,
SSLCertificate *cert;
cert = gtkut_tree_view_get_selected_pointer(
- GTK_TREE_VIEW(manager.certlist), SSL_MANAGER_CERT);
+ GTK_TREE_VIEW(manager.certlist), SSL_MANAGER_CERT,
+ NULL, NULL, NULL);
if (!cert)
return;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list