return pixbuf;
}
-#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
+#if defined USE_GNUTLS
static void auto_configure_done(const gchar *hostname, gint port, gboolean ssl, AutoConfigureData *data)
{
gboolean smtp = strcmp(data->tls_service, "submission") == 0 ? TRUE : FALSE;
cm_return_val_if_fail(view != NULL, NULL);
cm_return_val_if_fail(column >= 0, NULL);
- sel = gtk_tree_view_get_selection(view);
+ model = gtk_tree_view_get_model(view);
+ if (_model != NULL)
+ *_model = model;
- cm_return_val_if_fail(
- gtk_tree_selection_count_selected_rows(sel) == 1,
- NULL);
+ sel = gtk_tree_view_get_selection(view);
+ if (_selection != NULL)
+ *_selection = sel;
- if (!gtk_tree_selection_get_selected(sel, &model, &iter))
+ if (!gtk_tree_selection_get_selected(sel, NULL, &iter))
return NULL; /* No row selected */
+ if (_iter != NULL)
+ *_iter = iter;
+
+ if (gtk_tree_selection_count_selected_rows(sel) > 1)
+ return NULL; /* Can't work with multiselect */
+
cm_return_val_if_fail(
gtk_tree_model_get_n_columns(model) > column,
NULL);
gtk_tree_model_get(model, &iter, column, &ptr, -1);
- if (_model != NULL)
- *_model = model;
- if (_selection != NULL)
- *_selection = sel;
- if (_iter != NULL)
- *_iter = iter;
-
return ptr;
}