[latexila] Completion: Ctrl+space shortcut added to the menu
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Completion: Ctrl+space shortcut added to the menu
- Date: Fri, 15 Jul 2011 22:09:26 +0000 (UTC)
commit 1d424b7804203492d00a68a319776c85f32dc7d3
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Sat Jul 16 00:09:22 2011 +0200
Completion: Ctrl+space shortcut added to the menu
The shortcut was already available, but it was not documented. Now it is
in the edit menu.
src/completion.vala | 1 +
src/main_window.vala | 8 ++++++++
src/ui/ui.xml | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/completion.vala b/src/completion.vala
index 073c89b..b74aa2d 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -70,6 +70,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
private bool first_populate = true;
// useful when text is inserted by the program, not the user
+ // TODO use (un)block_interactive ().
public bool locked = false;
/* CompletionProvider is a singleton */
diff --git a/src/main_window.vala b/src/main_window.vala
index c365437..c130fcc 100644
--- a/src/main_window.vala
+++ b/src/main_window.vala
@@ -74,6 +74,8 @@ public class MainWindow : Window
{ "EditUncomment", null, N_("_Uncomment"), "<Shift><Control>M",
N_("Uncomment the selected lines (remove the character \"%\")"),
on_edit_uncomment },
+ { "EditCompletion", null, N_("_Completion"), "<Control>space",
+ N_("Complete the LaTeX command"), on_edit_completion },
{ "EditPreferences", Stock.PREFERENCES, null, null,
N_("Configure the application"), on_open_preferences },
@@ -1609,6 +1611,12 @@ public class MainWindow : Window
active_document.uncomment_selected_lines ();
}
+ public void on_edit_completion ()
+ {
+ return_if_fail (active_tab != null);
+ active_view.show_completion ();
+ }
+
public void on_open_preferences ()
{
PreferencesDialog.show_me (this);
diff --git a/src/ui/ui.xml b/src/ui/ui.xml
index 61c9b79..b0f8fca 100644
--- a/src/ui/ui.xml
+++ b/src/ui/ui.xml
@@ -49,6 +49,8 @@ along with LaTeXila. If not, see <http://www.gnu.org/licenses/>.
<menuitem action="EditComment" />
<menuitem action="EditUncomment" />
<separator />
+ <menuitem action="EditCompletion" />
+ <separator />
<menuitem action="EditPreferences" />
</menu>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]