Revision: 1677 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1677&view=re... Author: frlan Date: 2010-10-24 03:01:09 +0000 (Sun, 24 Oct 2010)
Log Message: ----------- GeanyLaTeX: Ensure LaTeX menu is added to menubar on loading plugin when there is already an LaTeX-document open.
Modified Paths: -------------- trunk/geanylatex/ChangeLog trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/ChangeLog =================================================================== --- trunk/geanylatex/ChangeLog 2010-10-23 09:55:39 UTC (rev 1676) +++ trunk/geanylatex/ChangeLog 2010-10-24 03:01:09 UTC (rev 1677) @@ -1,3 +1,9 @@ +2010-10-24 Frank Lanitz frank@frank.uvena.de + + * Ensure LaTeX menu is added to menubar on loading plugin when there is + already an LaTeX-document open. + + 2010-09-26 Frank Lanitz frank@frank.uvena.de
* Try to backport automatic generation of LINGUAS files into waf script
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-10-23 09:55:39 UTC (rev 1676) +++ trunk/geanylatex/src/geanylatex.c 2010-10-24 03:01:09 UTC (rev 1677) @@ -1970,7 +1970,7 @@ } /* Increase value by an offset as we add a new line so 2 really means 2 */ glatex_autocompletion_context_size = glatex_autocompletion_context_size + 2; - + glatex_autocompletion_only_for_latex = utils_get_setting_boolean(config, "autocompletion", "glatex_autocompletion_only_for_latex", TRUE); glatex_capitalize_sentence_starts = utils_get_setting_boolean(config, "autocompletion", @@ -2244,6 +2244,10 @@ void plugin_init(G_GNUC_UNUSED GeanyData * data) { + GeanyDocument *doc = NULL; + + doc = document_get_current(); + main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
glatex_init_configuration(); @@ -2271,6 +2275,13 @@ { glatex_wizard_generic_toolbar_item = NULL; } + + if ((glatex_add_menu_on_startup == TRUE|| + doc->file_type->id == GEANY_FILETYPES_LATEX) && + main_menu_item == NULL) + { + add_menu_to_menubar(); + }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.