[gtk/wip/muktupavels/listbox] 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] listbox: set selected_row before emitting signal
- Date: Tue, 1 Jan 2019 23:24:10 +0000 (UTC)
commit 4ff4809ede4f1d28a15a2149b5845d99af4437a0
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 6fc931498a..a1213d2928 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1727,8 +1727,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]