[gtk/wip/otte/dnd: 15/22] comboboxtext: Inline functions into return_if_fail()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/dnd: 15/22] comboboxtext: Inline functions into return_if_fail()
- Date: Sat, 22 Feb 2020 06:38:55 +0000 (UTC)
commit 99fc31865a78d1a12fc01b2adc3d9e78b8a9a8ce
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 22 06:55:08 2020 +0100
comboboxtext: Inline functions into return_if_fail()
gtk/gtkcomboboxtext.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkcomboboxtext.c b/gtk/gtkcomboboxtext.c
index 3794690414..bbfd426430 100644
--- a/gtk/gtkcomboboxtext.c
+++ b/gtk/gtkcomboboxtext.c
@@ -491,7 +491,6 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
GtkListStore *store;
GtkTreeIter iter;
gint text_column;
- gint column_type;
g_return_if_fail (GTK_IS_COMBO_BOX_TEXT (combo_box));
g_return_if_fail (text != NULL);
@@ -506,8 +505,7 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
else if (text_column < 0)
text_column = 0;
- column_type = gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), text_column);
- g_return_if_fail (column_type == G_TYPE_STRING);
+ g_return_if_fail (gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), text_column) == G_TYPE_STRING);
if (position < 0)
gtk_list_store_append (store, &iter);
@@ -522,8 +520,7 @@ gtk_combo_box_text_insert (GtkComboBoxText *combo_box,
id_column = gtk_combo_box_get_id_column (GTK_COMBO_BOX (combo_box));
g_return_if_fail (id_column >= 0);
- column_type = gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), id_column);
- g_return_if_fail (column_type == G_TYPE_STRING);
+ g_return_if_fail (gtk_tree_model_get_column_type (GTK_TREE_MODEL (store), id_column) == G_TYPE_STRING);
gtk_list_store_set (store, &iter, id_column, id, -1);
}
@@ -603,14 +600,12 @@ gtk_combo_box_text_get_active_text (GtkComboBoxText *combo_box)
{
GtkTreeModel *model;
gint text_column;
- gint column_type;
model = gtk_combo_box_get_model (GTK_COMBO_BOX (combo_box));
g_return_val_if_fail (GTK_IS_LIST_STORE (model), NULL);
text_column = gtk_combo_box_get_entry_text_column (GTK_COMBO_BOX (combo_box));
g_return_val_if_fail (text_column >= 0, NULL);
- column_type = gtk_tree_model_get_column_type (model, text_column);
- g_return_val_if_fail (column_type == G_TYPE_STRING, NULL);
+ g_return_val_if_fail (gtk_tree_model_get_column_type (model, text_column) == G_TYPE_STRING, NULL);
gtk_tree_model_get (model, &iter, text_column, &text, -1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]