[gtksourceview/gtksourcecompletion] Make sure to position the window before showing it
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtksourceview/gtksourcecompletion] Make sure to position the window before showing it
- Date: Sun, 26 Apr 2009 04:41:48 -0400 (EDT)
commit b049da55e87879cb7d2358d5ffddf1d5710added
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sat Apr 25 14:33:38 2009 +0200
Make sure to position the window before showing it
---
gtksourceview/gtksourcecompletion.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index 46ff7b2..1c87504 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2042,7 +2042,19 @@ gtk_source_completion_show (GtkSourceCompletion *completion,
completion->priv->filter_criteria = g_strdup (criteria);
update_typing_offsets (completion);
-
+
+ if (place == NULL)
+ {
+ gtk_source_completion_utils_move_to_cursor (GTK_WINDOW (completion->priv->window),
+ GTK_SOURCE_VIEW (completion->priv->view));
+ }
+ else
+ {
+ gtk_source_completion_utils_move_to_iter (GTK_WINDOW (completion->priv->window),
+ GTK_SOURCE_VIEW (completion->priv->view),
+ place);
+ }
+
/* Make sure all providers are ours */
for (l = providers; l; l = g_list_next (l))
{
@@ -2059,19 +2071,7 @@ gtk_source_completion_show (GtkSourceCompletion *completion,
completion->priv->active_providers =
g_list_reverse (completion->priv->active_providers);
-
- if (place == NULL)
- {
- gtk_source_completion_utils_move_to_cursor (GTK_WINDOW (completion->priv->window),
- GTK_SOURCE_VIEW (completion->priv->view));
- }
- else
- {
- gtk_source_completion_utils_move_to_iter (GTK_WINDOW (completion->priv->window),
- GTK_SOURCE_VIEW (completion->priv->view),
- place);
- }
-
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]