diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-06-12 09:40:06 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-06-12 09:40:06 +0200 |
commit | 5b79976a432cc3ae774f5138585bf04c381dc6c3 (patch) | |
tree | 5c2dab88407713c867a2c7dec0e78575055a86f0 | |
parent | a14081768eef9df34950bf0f8fb1c4489a8983e2 (diff) | |
download | gtk+-5b79976a432cc3ae774f5138585bf04c381dc6c3.tar.gz |
GtkListBox: Add getter for activate_on_single_click
-rw-r--r-- | gtk/gtklistbox.c | 21 | ||||
-rw-r--r-- | gtk/gtklistbox.h | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c index 4d22a431e0..0c8574fc86 100644 --- a/gtk/gtklistbox.c +++ b/gtk/gtklistbox.c @@ -979,6 +979,27 @@ gtk_list_box_set_activate_on_single_click (GtkListBox *list_box, g_object_notify_by_pspec (G_OBJECT (list_box), properties[PROP_ACTIVATE_ON_SINGLE_CLICK]); } +/** + * gtk_list_box_get_activate_on_single_click: + * @list_box: a #GtkListBox + * + * Returns whether rows activate on single clicks. + * + * Returns: %TRUE if rows are activated on single click, %FALSE otherwise + * + * Since: 3.10 + */ +gboolean +gtk_list_box_get_activate_on_single_click (GtkListBox *list_box) +{ + GtkListBoxPrivate *priv = list_box->priv; + + g_return_val_if_fail (list_box != NULL, FALSE); + + return priv->activate_single_click; +} + + static void gtk_list_box_add_move_binding (GtkBindingSet *binding_set, guint keyval, diff --git a/gtk/gtklistbox.h b/gtk/gtklistbox.h index 3795dc1fcc..23cb26d379 100644 --- a/gtk/gtklistbox.h +++ b/gtk/gtklistbox.h @@ -206,6 +206,8 @@ GDK_AVAILABLE_IN_3_10 void gtk_list_box_set_activate_on_single_click (GtkListBox *list_box, gboolean single); GDK_AVAILABLE_IN_3_10 +gboolean gtk_list_box_get_activate_on_single_click (GtkListBox *list_box); +GDK_AVAILABLE_IN_3_10 void gtk_list_box_drag_unhighlight_row (GtkListBox *list_box); GDK_AVAILABLE_IN_3_10 void gtk_list_box_drag_highlight_row (GtkListBox *list_box, |