[anjuta] sourceview: Allow Ctrl-Return to work for autocompletion instead of catching it in the gtksourceview
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] sourceview: Allow Ctrl-Return to work for autocompletion instead of catching it in the gtksourceview
- Date: Sat, 6 Mar 2010 09:17:14 +0000 (UTC)
commit 0f2e14e8d37221f8ca9da9e76f0f43202e5c9b63
Author: Johannes Schmid <jhs gnome org>
Date: Sat Mar 6 10:15:19 2010 +0100
sourceview: Allow Ctrl-Return to work for autocompletion instead of catching it in the gtksourceview widget
plugins/sourceview/anjuta-view.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/plugins/sourceview/anjuta-view.c b/plugins/sourceview/anjuta-view.c
index 9a32015..edf2759 100644
--- a/plugins/sourceview/anjuta-view.c
+++ b/plugins/sourceview/anjuta-view.c
@@ -683,17 +683,21 @@ anjuta_view_key_press_event (GtkWidget *widget, GdkEventKey *event)
case GDK_Down:
case GDK_Page_Up:
case GDK_Page_Down:
- if (assist_tip)
- {
- gtk_widget_destroy (GTK_WIDGET(assist_tip));
- break;
- }
- break;
- case GDK_F7:
- /* F7 is used to toggle cursor visibility but we rather like to
- * use it as shortcut for building (#611204)
- */
- return FALSE;
+ if (assist_tip)
+ {
+ gtk_widget_destroy (GTK_WIDGET(assist_tip));
+ break;
+ }
+ break;
+ case GDK_F7:
+ /* F7 is used to toggle cursor visibility but we rather like to
+ * use it as shortcut for building (#611204)
+ */
+ return FALSE;
+ case GDK_Return:
+ /* Ctrl-Return is used for autocompletion */
+ if (event->state == GDK_CONTROL_MASK)
+ return FALSE;
}
return (* GTK_WIDGET_CLASS (anjuta_view_parent_class)->key_press_event)(widget, event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]