[gtksourceview/gtksourcecompletion] Don't move completion window while completing
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceview/gtksourcecompletion] Don't move completion window while completing
- Date: Sat, 19 Sep 2009 13:04:58 +0000 (UTC)
commit e7da3b0e26f08331ee85d54bf8307554ec69f44b
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Sat Sep 19 14:51:04 2009 +0200
Don't move completion window while completing
Only moves the completion window when the completion starts
gtksourceview/gtksourcecompletion.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 38bc03b..15b2ad5 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -1434,6 +1434,18 @@ gtk_source_completion_hide_default (GtkSourceCompletion *completion)
static void
gtk_source_completion_show_default (GtkSourceCompletion *completion)
{
+ /* Move completion window */
+ if (completion->priv->context)
+ {
+ GtkTextIter location;
+ gtk_source_completion_context_get_iter (completion->priv->context,
+ &location);
+
+ gtk_source_completion_utils_move_to_iter (GTK_WINDOW (completion->priv->window),
+ GTK_SOURCE_VIEW (completion->priv->view),
+ &location);
+ }
+
gtk_widget_show (GTK_WIDGET (completion->priv->window));
gtk_widget_grab_focus (GTK_WIDGET (completion->priv->view));
@@ -2057,11 +2069,6 @@ update_completion (GtkSourceCompletion *completion,
gtk_source_completion_context_get_iter (context, &location);
- /* Move completion window */
- gtk_source_completion_utils_move_to_iter (GTK_WINDOW (completion->priv->window),
- GTK_SOURCE_VIEW (completion->priv->view),
- &location);
-
if (GTK_WIDGET_VISIBLE (completion->priv->info_window))
{
/* Move info window accordingly */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]