[gtk/wip/muktupavels/listbox-master] listbox: set selected_row before emitting signal
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/muktupavels/listbox-master] listbox: set selected_row before emitting signal
- Date: Fri, 11 Jan 2019 11:23:53 +0000 (UTC)
commit 1cd934e105d32c9c7654a7bb8015ec07d72eef4e
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Jan 2 01:14:17 2019 +0200
listbox: set selected_row before emitting signal
Signal emittion was added in 6f857f87dcd9 commit and it seems that
this is only place where selected_row is set after emitting signal.
Because of this gtk_list_box_get_selected_row currently returns NULL
as selected row if selection mode is set to GTK_SELECTION_BROWSE.
gtk/gtklistbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index dc470ebce7..943b1d9a16 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1645,8 +1645,8 @@ gtk_list_box_update_selection_full (GtkListBox *box,
{
gtk_list_box_unselect_all_internal (box);
gtk_list_box_row_set_selected (row, TRUE);
- g_signal_emit (box, signals[ROW_SELECTED], 0, row);
priv->selected_row = row;
+ g_signal_emit (box, signals[ROW_SELECTED], 0, row);
}
else if (priv->selection_mode == GTK_SELECTION_SINGLE)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]