[gnome-builder/wip/libide] libide: add IdeSourceView::hide-completion gsignalaction
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: add IdeSourceView::hide-completion gsignalaction
- Date: Mon, 16 Mar 2015 07:18:04 +0000 (UTC)
commit 70cc0205771e15e0fcbe32964992d23746c46d8c
Author: Christian Hergert <christian hergert me>
Date: Mon Mar 16 00:05:50 2015 -0700
libide: add IdeSourceView::hide-completion gsignalaction
libide/ide-source-view.c | 23 +++++++++++++++++++++++
libide/ide-source-view.h | 1 +
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 46134d1..60e612b 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -193,6 +193,7 @@ enum {
CYCLE_COMPLETION,
DELETE_SELECTION,
END_MACRO,
+ HIDE_COMPLETION,
INDENT_SELECTION,
INSERT_AT_CURSOR_AND_INDENT,
INSERT_MODIFIER,
@@ -4130,6 +4131,17 @@ in_replay:
}
static void
+ide_source_view_real_hide_completion (IdeSourceView *self)
+{
+ GtkSourceCompletion *completion;
+
+ g_assert (IDE_IS_SOURCE_VIEW (self));
+
+ completion = gtk_source_view_get_completion (GTK_SOURCE_VIEW (self));
+ gtk_source_completion_hide (completion);
+}
+
+static void
ide_source_view_real_replay_macro (IdeSourceView *self,
gboolean use_count)
{
@@ -4391,6 +4403,7 @@ ide_source_view_class_init (IdeSourceViewClass *klass)
klass->cycle_completion = ide_source_view_real_cycle_completion;
klass->delete_selection = ide_source_view_real_delete_selection;
klass->end_macro = ide_source_view_real_end_macro;
+ klass->hide_completion = ide_source_view_real_hide_completion;
klass->indent_selection = ide_source_view_real_indent_selection;
klass->insert_at_cursor_and_indent = ide_source_view_real_insert_at_cursor_and_indent;
klass->insert_modifier = ide_source_view_real_insert_modifier;
@@ -4709,6 +4722,16 @@ ide_source_view_class_init (IdeSourceViewClass *klass)
G_TYPE_NONE,
0);
+ gSignals [HIDE_COMPLETION] =
+ g_signal_new ("hide-completion",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (IdeSourceViewClass, hide_completion),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
+
gSignals [INDENT_SELECTION] =
g_signal_new ("indent-selection",
G_TYPE_FROM_CLASS (klass),
diff --git a/libide/ide-source-view.h b/libide/ide-source-view.h
index 549e880..d24e819 100644
--- a/libide/ide-source-view.h
+++ b/libide/ide-source-view.h
@@ -219,6 +219,7 @@ struct _IdeSourceViewClass
GtkDirectionType direction);
void (*delete_selection) (IdeSourceView *self);
void (*end_macro) (IdeSourceView *self);
+ void (*hide_completion) (IdeSourceView *self);
void (*indent_selection) (IdeSourceView *self,
gint level);
void (*insert_at_cursor_and_indent) (IdeSourceView *self,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]