[gnome-builder] search: use GtkWidgetClass.activate_signal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] search: use GtkWidgetClass.activate_signal
- Date: Mon, 21 Dec 2015 07:53:36 +0000 (UTC)
commit 2dc3dd0793437e443a9537e8d018f6a9e8a12549
Author: Christian Hergert <christian hergert me>
Date: Tue Nov 24 17:03:22 2015 -0800
search: use GtkWidgetClass.activate_signal
libide/search/ide-omni-search-display.c | 12 ++++++++++--
libide/search/ide-omni-search-display.h | 1 -
2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/libide/search/ide-omni-search-display.c b/libide/search/ide-omni-search-display.c
index c59c3a9..5f72fab 100644
--- a/libide/search/ide-omni-search-display.c
+++ b/libide/search/ide-omni-search-display.c
@@ -46,6 +46,7 @@ enum {
};
enum {
+ ACTIVATE,
RESULT_ACTIVATED,
LAST_SIGNAL
};
@@ -185,12 +186,12 @@ ide_omni_search_display_keynav_failed (IdeOmniSearchDisplay *self,
return ret;
}
-void
+static void
ide_omni_search_display_activate (IdeOmniSearchDisplay *self)
{
gsize i;
- g_return_if_fail (IDE_IS_OMNI_SEARCH_DISPLAY (self));
+ g_assert (IDE_IS_OMNI_SEARCH_DISPLAY (self));
for (i = 0; i < self->providers->len; i++)
{
@@ -578,6 +579,13 @@ ide_omni_search_display_class_init (IdeOmniSearchDisplayClass *klass)
g_object_class_install_properties (object_class, LAST_PROP, properties);
+ signals [ACTIVATE] = widget_class->activate_signal =
+ g_signal_new_class_handler ("activate",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_CALLBACK (ide_omni_search_display_activate),
+ NULL, NULL, NULL, G_TYPE_NONE, 0);
+
signals [RESULT_ACTIVATED] =
g_signal_new_class_handler ("result-activated",
G_TYPE_FROM_CLASS (klass),
diff --git a/libide/search/ide-omni-search-display.h b/libide/search/ide-omni-search-display.h
index 204b354..cf9a56c 100644
--- a/libide/search/ide-omni-search-display.h
+++ b/libide/search/ide-omni-search-display.h
@@ -29,7 +29,6 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (IdeOmniSearchDisplay, ide_omni_search_display, IDE, OMNI_SEARCH_DISPLAY, GtkBin)
-void ide_omni_search_display_activate (IdeOmniSearchDisplay *display);
IdeSearchContext *ide_omni_search_display_get_context (IdeOmniSearchDisplay *display);
void ide_omni_search_display_set_context (IdeOmniSearchDisplay *display,
IdeSearchContext *context);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]