[gnome-builder] greeter: iterate box children rather than plugins
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] greeter: iterate box children rather than plugins
- Date: Tue, 21 Nov 2017 00:57:33 +0000 (UTC)
commit 2e83f8e8da9f0f1b0ba91b38472e11a06b17bbb6
Author: Christian Hergert <chergert redhat com>
Date: Mon Nov 20 16:57:22 2017 -0800
greeter: iterate box children rather than plugins
The plugins can be in an order other than that of the widgets since the
widgets have priority. So iterate container instead to get proper
ordering.
src/libide/greeter/ide-greeter-perspective.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/src/libide/greeter/ide-greeter-perspective.c b/src/libide/greeter/ide-greeter-perspective.c
index b8e6fcd..8c89425 100644
--- a/src/libide/greeter/ide-greeter-perspective.c
+++ b/src/libide/greeter/ide-greeter-perspective.c
@@ -114,20 +114,19 @@ ide_perspective_iface_init (IdePerspectiveInterface *iface)
}
static void
-ide_greeter_perspective_activate_cb (PeasExtensionSet *set,
- PeasPluginInfo *plugin_info,
- PeasExtension *exten,
- gpointer user_data)
+ide_greeter_perspective_activate_cb (GtkWidget *widget,
+ gpointer user_data)
{
- IdeGreeterSection *section = (IdeGreeterSection *)exten;
gboolean *handled = user_data;
- g_assert (PEAS_IS_EXTENSION_SET (set));
- g_assert (plugin_info != NULL);
- g_assert (IDE_IS_GREETER_SECTION (section));
+ g_assert (GTK_IS_WIDGET (widget));
+ g_assert (handled != NULL);
+
+ if (!IDE_IS_GREETER_SECTION (widget))
+ return;
if (!*handled)
- *handled = ide_greeter_section_activate_first (section);
+ *handled = ide_greeter_section_activate_first (IDE_GREETER_SECTION (widget));
}
static void
@@ -139,9 +138,9 @@ ide_greeter_perspective__search_entry_activate (IdeGreeterPerspective *self,
g_assert (IDE_IS_GREETER_PERSPECTIVE (self));
g_assert (GTK_IS_SEARCH_ENTRY (search_entry));
- peas_extension_set_foreach (self->sections,
- ide_greeter_perspective_activate_cb,
- &handled);
+ gtk_container_foreach (GTK_CONTAINER (self->sections_container),
+ ide_greeter_perspective_activate_cb,
+ &handled);
if (!handled)
gdk_window_beep (gtk_widget_get_window (GTK_WIDGET (search_entry)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]