Revision: 1153 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1153&view=re... Author: frlan Date: 2010-02-09 18:46:55 +0000 (Tue, 09 Feb 2010)
Log Message: ----------- GeanyLaTeX: Move code for initialize configuration from configuration file into a function.
Modified Paths: -------------- trunk/geanylatex/src/geanylatex.c
Modified: trunk/geanylatex/src/geanylatex.c =================================================================== --- trunk/geanylatex/src/geanylatex.c 2010-02-09 18:46:14 UTC (rev 1152) +++ trunk/geanylatex/src/geanylatex.c 2010-02-09 18:46:55 UTC (rev 1153) @@ -1533,13 +1533,11 @@ "authors.")); }
-void -plugin_init(G_GNUC_UNUSED GeanyData * data) + +void glatex_init_configuration() { - GtkWidget *tmp = NULL; GKeyFile *config = g_key_file_new(); - gint i; - + /* loading configurations from file ...*/ config_file = g_strconcat(geany->app->configdir, G_DIR_SEPARATOR_S, "plugins", G_DIR_SEPARATOR_S, @@ -1588,11 +1586,20 @@ "glatex_reference_chapter", "\ref{{{reference}}}"); glatex_ref_all_string = utils_get_setting_string(config, "reference", "glatex_reference_all", _("\ref{{{reference}}}, page \pageref{{{reference}}}")); + + g_key_file_free(config); +}
- main_locale_init(LOCALEDIR, GETTEXT_PACKAGE);
- g_key_file_free(config); +void +plugin_init(G_GNUC_UNUSED GeanyData * data) +{ + GtkWidget *tmp = NULL; + gint i;
+ main_locale_init(LOCALEDIR, GETTEXT_PACKAGE); + + glatex_init_configuration(); glatex_init_encodings_latex();
menu_latex = gtk_menu_item_new_with_mnemonic(_("_LaTeX"));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.