SF.net SVN: geany-plugins:[518] trunk/geanylatex

frlan at users.sourceforge.net frlan at xxxxx
Sat Feb 28 13:56:27 UTC 2009


Revision: 518
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=518&view=rev
Author:   frlan
Date:     2009-02-28 13:56:26 +0000 (Sat, 28 Feb 2009)

Log Message:
-----------
GeanyLaTeX:  Added keybinding to insert \item into document. Very useful at e.g. writing lists

Modified Paths:
--------------
    trunk/geanylatex/ChangeLog
    trunk/geanylatex/src/geanylatex.c

Modified: trunk/geanylatex/ChangeLog
===================================================================
--- trunk/geanylatex/ChangeLog	2009-02-28 13:55:41 UTC (rev 517)
+++ trunk/geanylatex/ChangeLog	2009-02-28 13:56:26 UTC (rev 518)
@@ -2,6 +2,8 @@
 
  * Don't react on some keybindings in case of no document is open.
  * Added a feature for easy inserting environments to document.
+ * Added keybinding to insert \item into document. Very useful at
+   e.g. writing lists
 
 
 2009-02-18  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>

Modified: trunk/geanylatex/src/geanylatex.c
===================================================================
--- trunk/geanylatex/src/geanylatex.c	2009-02-28 13:55:41 UTC (rev 517)
+++ trunk/geanylatex/src/geanylatex.c	2009-02-28 13:56:26 UTC (rev 518)
@@ -65,6 +65,7 @@
 	LATEX_INSERT_NEWLINE,
 	LATEX_TOGGLE_ACTIVE,
 	LATEX_ENVIRONMENT_INSERT,
+	LATEX_INSERT_NEWITEM_KB,
 	COUNT_KB
 };
 
@@ -942,6 +943,13 @@
 	glatex_insert_string("\\\\\n", TRUE);
 }
 
+static void kb_insert_newitem(G_GNUC_UNUSED guint key_id)
+{
+	if (NULL == document_get_current())
+		return;
+	glatex_insert_string("\\item ", TRUE);
+}
+
 /*static void kb_bibtex_entry_insert(G_GNUC_UNUSED guint key_id)
 {
 	insert_bibtex_entry(NULL, NULL);
@@ -964,8 +972,8 @@
 	keybindings_set_item(plugin_key_group, LATEX_ENVIRONMENT_INSERT,
 	 	kbref_insert_environment, 0, 0, "latex_insert_environment",
 		_("Run insert environment dialog"), menu_latex_insert_environment);
-
-
+	keybindings_set_item(plugin_key_group, LATEX_INSERT_NEWITEM_KB,
+		kb_insert_newitem, 0, 0, "latex_insert_item", _("Insert \\item"), NULL);
 }
 
 void plugin_help()


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list