[latexila] Hide completion calltip in a better place
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Hide completion calltip in a better place
- Date: Sun, 27 Jan 2013 14:06:41 +0000 (UTC)
commit 07fd0e91f2743e419a0323588799af4a12cb75a4
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Sun Jan 27 15:01:55 2013 +0100
Hide completion calltip in a better place
src/document_view.vala | 23 +++++++++++++++++++----
src/main_window.vala | 21 ---------------------
2 files changed, 19 insertions(+), 25 deletions(-)
---
diff --git a/src/document_view.vala b/src/document_view.vala
index 1ac8477..a79a54c 100644
--- a/src/document_view.vala
+++ b/src/document_view.vala
@@ -65,10 +65,7 @@ public class DocumentView : Gtk.SourceView
completion.remember_info_visibility = true;
completion.show_headers = false;
- buffer.notify["cursor-position"].connect (() =>
- {
- provider.hide_calltip_window ();
- });
+ hide_completion_calltip_when_needed ();
}
catch (GLib.Error e)
{
@@ -207,6 +204,24 @@ public class DocumentView : Gtk.SourceView
return false;
}
+ private void hide_completion_calltip_when_needed ()
+ {
+ focus_out_event.connect (() =>
+ {
+ CompletionProvider provider = CompletionProvider.get_default ();
+ provider.hide_calltip_window ();
+
+ // propagate the event further
+ return false;
+ });
+
+ buffer.notify["cursor-position"].connect (() =>
+ {
+ CompletionProvider provider = CompletionProvider.get_default ();
+ provider.hide_calltip_window ();
+ });
+ }
+
private bool on_backspace (Gdk.EventKey event)
{
// See GDK_KEY_BackSpace in gdk/gdkkeysyms.h (not available in Vala)
diff --git a/src/main_window.vala b/src/main_window.vala
index dfcb5ed..1b0e7ad 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -245,7 +245,6 @@ public class MainWindow : Window
/* Other misc stuff */
- hide_completion_calltip_when_needed ();
support_drag_and_drop ();
shrink_window_when_unmaximized ();
@@ -498,26 +497,6 @@ public class MainWindow : Window
_vpaned.set_position (settings.get_int ("vertical-paned-position"));
}
- private void hide_completion_calltip_when_needed ()
- {
- // hide completion calltip
- notify["active-tab"].connect (() =>
- {
- CompletionProvider provider = CompletionProvider.get_default ();
- provider.hide_calltip_window ();
- });
-
- // hide completion calltip
- focus_out_event.connect (() =>
- {
- CompletionProvider provider = CompletionProvider.get_default ();
- provider.hide_calltip_window ();
-
- // propagate the event further
- return false;
- });
- }
-
// Drag and drop of a list of files.
private void support_drag_and_drop ()
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]