[gnome-builder/wip/chergert/completion] completion: switch to IdeCompletion
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/completion] completion: switch to IdeCompletion
- Date: Mon, 4 Jun 2018 08:36:06 +0000 (UTC)
commit 24932b267121c6526c52c231d2e96e933107763f
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 4 01:34:08 2018 -0700
completion: switch to IdeCompletion
src/libide/ide.h | 1 +
src/plugins/beautifier/gb-beautifier-process.c | 8 ++++----
src/plugins/comment-code/gbp-comment-code-view-addin.c | 12 ++++++------
3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/libide/ide.h b/src/libide/ide.h
index dc21a4873..ac954a142 100644
--- a/src/libide/ide.h
+++ b/src/libide/ide.h
@@ -62,6 +62,7 @@ G_BEGIN_DECLS
#include "buildsystem/ide-environment-variable.h"
#include "buildsystem/ide-environment.h"
#include "buildsystem/ide-simple-build-target.h"
+#include "completion/ide-completion.h"
#include "completion/ide-completion-compat.h"
#include "completion/ide-completion-context.h"
#include "completion/ide-completion-item.h"
diff --git a/src/plugins/beautifier/gb-beautifier-process.c b/src/plugins/beautifier/gb-beautifier-process.c
index 7032033da..edd2efa87 100644
--- a/src/plugins/beautifier/gb-beautifier-process.c
+++ b/src/plugins/beautifier/gb-beautifier-process.c
@@ -230,7 +230,7 @@ process_communicate_utf8_cb (GObject *object,
const gchar *stdout_str = NULL;
const gchar *stderr_str = NULL;
g_autoptr(GError) error = NULL;
- GtkSourceCompletion *completion;
+ IdeCompletion *completion;
GtkTextBuffer *buffer;
GtkTextIter begin;
GtkTextIter end;
@@ -274,9 +274,9 @@ process_communicate_utf8_cb (GObject *object,
else if (g_utf8_validate (stdout_str, -1, NULL))
{
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (state->source_view));
- completion = gtk_source_view_get_completion (GTK_SOURCE_VIEW (state->source_view));
+ completion = ide_source_view_get_completion (IDE_SOURCE_VIEW (state->source_view));
- gtk_source_completion_block_interactive (completion);
+ ide_completion_block_interactive (completion);
gtk_text_buffer_begin_user_action (buffer);
gtk_text_buffer_get_iter_at_mark (buffer, &begin, state->begin_mark);
@@ -291,7 +291,7 @@ process_communicate_utf8_cb (GObject *object,
g_signal_emit_by_name (state->source_view, "selection-theatric", IDE_SOURCE_VIEW_THEATRIC_EXPAND);
gtk_text_buffer_end_user_action (buffer);
- gtk_source_completion_unblock_interactive (completion);
+ ide_completion_unblock_interactive (completion);
ide_task_return_boolean (task, TRUE);
}
diff --git a/src/plugins/comment-code/gbp-comment-code-view-addin.c
b/src/plugins/comment-code/gbp-comment-code-view-addin.c
index 5324a007f..30aa2cfbc 100644
--- a/src/plugins/comment-code/gbp-comment-code-view-addin.c
+++ b/src/plugins/comment-code/gbp-comment-code-view-addin.c
@@ -271,7 +271,7 @@ gbp_comment_code_view_addin_comment_action (GSimpleAction *action,
IdeSourceView *source_view;
GtkTextBuffer *buffer;
const gchar *param;
- GtkSourceCompletion *completion;
+ IdeCompletion *completion;
GtkSourceLanguage *lang;
const gchar *start_tag;
const gchar *end_tag = NULL;
@@ -291,7 +291,7 @@ gbp_comment_code_view_addin_comment_action (GSimpleAction *action,
return;
editable = gtk_text_view_get_editable (GTK_TEXT_VIEW (source_view));
- completion = gtk_source_view_get_completion (GTK_SOURCE_VIEW (source_view));
+ completion = ide_source_view_get_completion (IDE_SOURCE_VIEW (source_view));
lang = gtk_source_buffer_get_language (GTK_SOURCE_BUFFER (buffer));
if (!editable || lang == NULL)
return;
@@ -340,25 +340,25 @@ gbp_comment_code_view_addin_comment_action (GSimpleAction *action,
if (indent == G_MAXINT)
return;
- gtk_source_completion_block_interactive (completion);
+ ide_completion_block_interactive (completion);
gtk_text_buffer_begin_user_action (buffer);
for (gint line = start_line; line <= end_line; ++line)
gbp_comment_code_view_addin_comment_line (buffer, start_tag, end_tag, line, indent, block_comment);
gtk_text_buffer_end_user_action (buffer);
- gtk_source_completion_unblock_interactive (completion);
+ ide_completion_unblock_interactive (completion);
}
else if (*param == '1')
{
- gtk_source_completion_block_interactive (completion);
+ ide_completion_block_interactive (completion);
gtk_text_buffer_begin_user_action (buffer);
for (gint line = start_line; line <= end_line; ++line)
gbp_comment_code_view_addin_uncomment_line (buffer, start_tag, end_tag, line, block_comment);
gtk_text_buffer_end_user_action (buffer);
- gtk_source_completion_unblock_interactive (completion);
+ ide_completion_unblock_interactive (completion);
}
else
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]