[gnome-builder] preferences: ensure group is made visible when adding custom widget
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] preferences: ensure group is made visible when adding custom widget
- Date: Tue, 14 Mar 2017 06:03:26 +0000 (UTC)
commit affcaf7ef0d51b3e90433165971371d769b35500
Author: Christian Hergert <chergert redhat com>
Date: Mon Mar 13 23:02:39 2017 -0700
preferences: ensure group is made visible when adding custom widget
When we add a custom widget, we need to ensure that the group is shown
so that we don't get in a state where the group is always hidden, such
as if we do async preference loading.
libide/preferences/ide-preferences-perspective.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libide/preferences/ide-preferences-perspective.c
b/libide/preferences/ide-preferences-perspective.c
index 52f7691..d1120aa 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -839,7 +839,10 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
return 0;
}
- gtk_widget_set_visible (widget, TRUE);
+ widget_id = ++self->last_widget_id;
+
+ gtk_widget_show (widget);
+ gtk_widget_show (GTK_WIDGET (group));
if (IDE_IS_PREFERENCES_BIN (widget))
container = IDE_PREFERENCES_BIN (widget);
@@ -853,7 +856,6 @@ ide_preferences_perspective_add_custom (IdePreferences *preferences,
ide_preferences_group_add (group, GTK_WIDGET (container));
- widget_id = ++self->last_widget_id;
g_hash_table_insert (self->widgets, GINT_TO_POINTER (widget_id), widget);
return widget_id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]