Revision: 966 http://svn.sourceforge.net/geany/?rev=966&view=rev Author: ntrel Date: 2006-11-04 04:49:00 -0800 (Sat, 04 Nov 2006)
Log Message: ----------- Make filetype_extensions.conf generation only available with a debug build of Geany.
Modified Paths: -------------- trunk/src/keyfile.c trunk/src/keyfile.h trunk/src/main.c
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-11-04 11:26:31 UTC (rev 965) +++ trunk/src/keyfile.c 2006-11-04 12:49:00 UTC (rev 966) @@ -48,9 +48,6 @@ static gint vpan_position;
-static void generate_filetype_extensions(const gchar *output_dir); - - void configuration_save() { guint i = 0, j = 0, max; @@ -587,6 +584,12 @@ }
+#ifdef GEANY_DEBUG +// Geany data file generation is only available with a debug build of Geany. + +static void generate_filetype_extensions(const gchar *output_dir); + + /* Generate the config files in "data/" from defaults */ void configuration_generate_data_files() { @@ -602,6 +605,7 @@ return; } g_print("Generating system files in %s:\n", gen_dir); + // currently only filetype extensions are auto-generated. generate_filetype_extensions(gen_dir); g_free(gen_dir); } @@ -643,7 +647,9 @@ g_key_file_free(config); }
+#endif
+ void configuration_read_filetype_extensions() { guint i;
Modified: trunk/src/keyfile.h =================================================================== --- trunk/src/keyfile.h 2006-11-04 11:26:31 UTC (rev 965) +++ trunk/src/keyfile.h 2006-11-04 12:49:00 UTC (rev 966) @@ -36,7 +36,9 @@ * realisation of the main window */ void configuration_apply_settings();
+#ifdef GEANY_DEBUG /* Generate the config files in "data/" from defaults */ void configuration_generate_data_files(); +#endif
#endif
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2006-11-04 11:26:31 UTC (rev 965) +++ trunk/src/main.c 2006-11-04 12:49:00 UTC (rev 966) @@ -535,11 +535,13 @@ templates_init(); document_init_doclist(); filetypes_init_types(); +#ifdef GEANY_DEBUG if (generate_datafiles) { configuration_generate_data_files(); exit(0); } +#endif configuration_read_filetype_extensions();
gtk_window_set_icon(GTK_WINDOW(app->window), ui_new_pixbuf_from_inline(GEANY_IMAGE_LOGO, FALSE));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.