summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-06-07 16:40:09 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-06-09 13:30:55 -0400
commit1720eb471347acec40154e873c3b6e08fe0385a9 (patch)
tree6c6f76e9552da4658ad6b1e03c1245cf7d78c4f3 /gtk/gtkcombobox.c
parent9722ae0458d9c0612e9406fe396e6b65bae7928e (diff)
downloadgtk+-1720eb471347acec40154e873c3b6e08fe0385a9.tar.gz
GtkComboBox: Notify for has-frame and editing-canceled
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 4f65c565af..0e8e75ccc4 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1170,17 +1170,14 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_HAS_FRAME:
- priv->has_frame = g_value_get_boolean (value);
-
- if (priv->has_entry)
+ if (priv->has_frame != g_value_get_boolean (value))
{
- GtkWidget *child;
-
- child = gtk_bin_get_child (GTK_BIN (combo_box));
-
- gtk_entry_set_has_frame (GTK_ENTRY (child), priv->has_frame);
+ priv->has_frame = g_value_get_boolean (value);
+ if (priv->has_entry)
+ gtk_entry_set_has_frame (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo_box))),
+ priv->has_frame);
+ g_object_notify (object, "has-frame");
}
-
break;
case PROP_FOCUS_ON_CLICK:
@@ -1212,7 +1209,11 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_EDITING_CANCELED:
- priv->editing_canceled = g_value_get_boolean (value);
+ if (priv->editing_canceled != g_value_get_boolean (value))
+ {
+ priv->editing_canceled = g_value_get_boolean (value);
+ g_object_notify (object, "editing-canceled");
+ }
break;
case PROP_HAS_ENTRY:
@@ -5372,13 +5373,18 @@ gtk_combo_box_set_entry_text_column (GtkComboBox *combo_box,
g_return_if_fail (text_column >= 0);
g_return_if_fail (model == NULL || text_column < gtk_tree_model_get_n_columns (model));
- priv->text_column = text_column;
+ if (priv->text_column != text_column)
+ {
+ priv->text_column = text_column;
+
+ if (priv->text_renderer != NULL)
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box),
+ priv->text_renderer,
+ "text", text_column,
+ NULL);
- if (priv->text_renderer != NULL)
- gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box),
- priv->text_renderer,
- "text", text_column,
- NULL);
+ g_object_notify (G_OBJECT (combo_box), "entry-text-column");
+ }
}
/**
@@ -5909,5 +5915,7 @@ gtk_combo_box_set_active_id (GtkComboBox *combo_box,
}
} while (gtk_tree_model_iter_next (model, &iter));
- return match;
+ g_object_notify (G_OBJECT (combo_box), "active-id");
+
+ return match;
}