[gedit/wip/spell-checking: 2/3] spell-language-dialog: use gtk_tree_model_get()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/spell-checking: 2/3] spell-language-dialog: use gtk_tree_model_get()
- Date: Tue, 21 Jul 2015 19:01:08 +0000 (UTC)
commit c292b2a241ca86299ea7e365b15d809ee7e22cf0
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue Jul 21 20:17:34 2015 +0200
spell-language-dialog: use gtk_tree_model_get()
plugins/spell/gedit-spell-language-dialog.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/plugins/spell/gedit-spell-language-dialog.c b/plugins/spell/gedit-spell-language-dialog.c
index 510a5e9..0cc9423 100644
--- a/plugins/spell/gedit-spell-language-dialog.c
+++ b/plugins/spell/gedit-spell-language-dialog.c
@@ -241,11 +241,9 @@ gedit_spell_language_dialog_new (GtkWindow *parent,
const GeditSpellCheckerLanguage *
gedit_spell_language_get_selected_language (GeditSpellLanguageDialog *dialog)
{
- GValue value = { 0 };
- const GeditSpellCheckerLanguage *lang;
-
- GtkTreeIter iter;
GtkTreeSelection *selection;
+ GtkTreeIter iter;
+ const GeditSpellCheckerLanguage *lang;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->treeview));
@@ -254,12 +252,9 @@ gedit_spell_language_get_selected_language (GeditSpellLanguageDialog *dialog)
return NULL;
}
- gtk_tree_model_get_value (dialog->model,
- &iter,
- COLUMN_LANGUAGE_POINTER,
- &value);
-
- lang = g_value_get_pointer (&value);
+ gtk_tree_model_get (dialog->model, &iter,
+ COLUMN_LANGUAGE_POINTER, &lang,
+ -1);
return lang;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]