Revision: 573 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=573&view=rev Author: frlan Date: 2009-03-31 21:14:49 +0000 (Tue, 31 Mar 2009)
Log Message: ----------- GeanyLaTeX: Added key bindings for formatting text with bold, italic and typewriter font face.
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2009-03-31 21:14:23 UTC (rev 572) +++ trunk/geanylatex/ChangeLog 2009-03-31 21:14:49 UTC (rev 573) @@ -1,6 +1,8 @@ 2009-03-30 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* Moved replacement functions into their own submenu. + * Added key bindings for formatting text with bold, italic and typewriter + font face.
2009-03-28 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2009-03-31 21:14:23 UTC (rev 572) +++ trunk/geanylatex/src/geanylatex.c 2009-03-31 21:14:49 UTC (rev 573) @@ -68,6 +68,9 @@ KB_LATEX_ENVIRONMENT_INSERT, KB_LATEX_INSERT_NEWITEM, KB_LATEX_REPLACE_SPECIAL_CHARS, + KB_LATEX_FORMAT_BOLD, + KB_LATEX_FORMAT_ITALIC, + KB_LATEX_FORMAT_TYPEWRITER, COUNT_KB };
@@ -979,6 +982,26 @@ replace_special_character(); }
+static void kb_format_bold(G_GNUC_UNUSED guint key_id) +{ + if (NULL == document_get_current()) + return; + glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_BOLD)); +} + +static void kb_format_italic(G_GNUC_UNUSED guint key_id) +{ + if (NULL == document_get_current()) + return; + glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_ITALIC)); +} + +static void kb_format_typewriter(G_GNUC_UNUSED guint key_id) +{ + if (NULL == document_get_current()) + return; + glatex_insert_latex_format(NULL, GINT_TO_POINTER(LATEX_TYPEWRITER)); +} /*static void kb_bibtex_entry_insert(G_GNUC_UNUSED guint key_id) { insert_bibtex_entry(NULL, NULL); @@ -1006,6 +1029,12 @@ _("Run insert environment dialog"), menu_latex_insert_environment); keybindings_set_item(plugin_key_group, KB_LATEX_INSERT_NEWITEM, kb_insert_newitem, 0, 0, "latex_insert_item", _("Insert \item"), NULL); + keybindings_set_item(plugin_key_group, KB_LATEX_FORMAT_BOLD, kb_format_bold, + 0, 0, "format_bold", _("Format selection in bold font face"), NULL); + keybindings_set_item(plugin_key_group, KB_LATEX_FORMAT_ITALIC, kb_format_italic, + 0, 0, "format_italic", _("Format selection in italic font face"), NULL); + keybindings_set_item(plugin_key_group, KB_LATEX_FORMAT_TYPEWRITER, kb_format_typewriter, + 0, 0, "format_typewriter", _("Format selection in typewriter font face"), NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
plugins-commits@lists.geany.org