[gnome-builder/wip/chergert/perspective] prefs: refilter after preferences addin is loaded
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/perspective] prefs: refilter after preferences addin is loaded
- Date: Wed, 11 Nov 2015 08:40:27 +0000 (UTC)
commit 6168ca7cb0a928a8f1c8ad53a21eee799654dd8d
Author: Christian Hergert <chergert redhat com>
Date: Wed Nov 11 00:40:19 2015 -0800
prefs: refilter after preferences addin is loaded
libide/preferences/ide-preferences-perspective.c | 23 ++++++++++++++++++---
1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/libide/preferences/ide-preferences-perspective.c
b/libide/preferences/ide-preferences-perspective.c
index e770ad3..bba8529 100644
--- a/libide/preferences/ide-preferences-perspective.c
+++ b/libide/preferences/ide-preferences-perspective.c
@@ -83,7 +83,7 @@ ide_preferences_perspective_refilter (IdePreferencesPerspective *self,
g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
- if (search_text != NULL)
+ if (!ide_str_empty0 (search_text))
spec = ide_pattern_spec_new (search_text);
gtk_container_foreach (GTK_CONTAINER (self->page_stack),
@@ -117,8 +117,17 @@ ide_preferences_perspective_extension_added (PeasExtensionSet *set,
gpointer user_data)
{
IdePreferencesPerspective *self = user_data;
+ const gchar *text;
+
+ g_assert (PEAS_IS_EXTENSION_SET (set));
+ g_assert (plugin_info != NULL);
+ g_assert (IDE_IS_PREFERENCES_ADDIN (extension));
+ g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
ide_preferences_addin_load (IDE_PREFERENCES_ADDIN (extension), IDE_PREFERENCES (self));
+
+ text = gtk_entry_get_text (GTK_ENTRY (self->search_entry));
+ ide_preferences_perspective_refilter (self, text);
}
static void
@@ -128,8 +137,17 @@ ide_preferences_perspective_extension_removed (PeasExtensionSet *set,
gpointer user_data)
{
IdePreferencesPerspective *self = user_data;
+ const gchar *text;
+
+ g_assert (PEAS_IS_EXTENSION_SET (set));
+ g_assert (plugin_info != NULL);
+ g_assert (IDE_IS_PREFERENCES_ADDIN (extension));
+ g_assert (IDE_IS_PREFERENCES_PERSPECTIVE (self));
ide_preferences_addin_unload (IDE_PREFERENCES_ADDIN (extension), IDE_PREFERENCES (self));
+
+ text = gtk_entry_get_text (GTK_ENTRY (self->search_entry));
+ ide_preferences_perspective_refilter (self, text);
}
static void
@@ -237,9 +255,6 @@ ide_preferences_perspective_search_entry_changed (IdePreferencesPerspective *sel
g_assert (GTK_IS_SEARCH_ENTRY (search_entry));
text = gtk_entry_get_text (GTK_ENTRY (search_entry));
- if (ide_str_empty0 (text))
- text = NULL;
-
ide_preferences_perspective_refilter (self, text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]