Revision: 502 Author: eht16 Date: 2006-06-29 07:00:09 -0700 (Thu, 29 Jun 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=502&view=rev
Log Message: ----------- Renamed tools settings from build_* in tools_*.
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/callbacks.c trunk/src/geany.h trunk/src/keyfile.c trunk/src/prefs.c trunk/src/utils.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/ChangeLog 2006-06-29 14:00:09 UTC (rev 502) @@ -1,3 +1,10 @@ +2006-06-29 Enrico Tröger enrico.troeger@uvena.de + + * src/geany.h, src/build.c, src/callbacks.c, src/keyfile.c, + src/utils.c, src/prefs.c: + Renamed tools settings from build_* in tools_*. + + 2006-06-28 Enrico Tröger enrico.troeger@uvena.de
* src/utils.c, src/keyfile.c: Fixed weird behaviour of the recent
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/build.c 2006-06-29 14:00:09 UTC (rev 502) @@ -53,9 +53,9 @@ gchar **argv;
if (idx < 0 || doc_list[idx].file_name == NULL) return (GPid) 1; - + argv = g_new0(gchar*, 2); - argv[0] = (mode == 0) ? g_strdup(doc_list[idx].file_type->programs->compiler) : + argv[0] = (mode == 0) ? g_strdup(doc_list[idx].file_type->programs->compiler) : g_strdup(doc_list[idx].file_type->programs->linker); argv[1] = NULL;
@@ -95,11 +95,11 @@ }
// replace %f and %e in the run_cmd string - cmd_string = g_strdup((mode == 0) ? g_strdup(doc_list[idx].file_type->programs->run_cmd) : + cmd_string = g_strdup((mode == 0) ? g_strdup(doc_list[idx].file_type->programs->run_cmd) : g_strdup(doc_list[idx].file_type->programs->run_cmd2)); cmd_string = utils_str_replace(cmd_string, "%f", view_file); cmd_string = utils_str_replace(cmd_string, "%e", executable); - + // try convert in locale locale_cmd_string = g_locale_from_utf8(cmd_string, -1, NULL, NULL, NULL); if (locale_cmd_string == NULL) locale_cmd_string = g_strdup(view_file); @@ -141,17 +141,17 @@ gchar **argv;
if (idx < 0 || doc_list[idx].file_name == NULL) return (GPid) 1; - + argv = g_new0(gchar*, 3); if (cust_target && app->build_make_custopt) { //cust-target - argv[0] = g_strdup(app->build_make_cmd); + argv[0] = g_strdup(app->tools_make_cmd); argv[1] = g_strdup(app->build_make_custopt); argv[2] = NULL; } else { - argv[0] = g_strdup(app->build_make_cmd); + argv[0] = g_strdup(app->tools_make_cmd); argv[1] = g_strdup("all"); argv[2] = NULL; } @@ -240,7 +240,7 @@
app->cur_idx = idx; document_clear_indicators(idx); - + cmd_string = g_strjoinv(" ", cmd); g_strfreev(cmd);
@@ -248,7 +248,7 @@ if (locale_filename == NULL) locale_filename = g_strdup(doc_list[idx].file_name);
executable = utils_remove_ext_from_filename(locale_filename); - + // replace %f and %e in the command string tmp = g_path_get_basename(locale_filename); cmd_string = utils_str_replace(cmd_string, "%f", tmp); @@ -257,7 +257,7 @@ cmd_string = utils_str_replace(cmd_string, "%e", tmp); g_free(tmp); g_free(executable); - + utf8_cmd_string = g_locale_to_utf8(cmd_string, -1, NULL, NULL, NULL); if (utf8_cmd_string == NULL) utf8_cmd_string = g_strdup(cmd_string);
@@ -323,18 +323,18 @@ struct stat st;
if (idx < 0 || doc_list[idx].file_name == NULL) return (GPid) 1; - + script_name = g_strdup("./geany_run_script.sh");
locale_filename = g_locale_from_utf8(doc_list[idx].file_name, -1, NULL, NULL, NULL); if (locale_filename == NULL) locale_filename = g_strdup(doc_list[idx].file_name);
- locale_term_cmd = g_locale_from_utf8(app->build_term_cmd, -1, NULL, NULL, NULL); - if (locale_term_cmd == NULL) locale_term_cmd = g_strdup(app->build_term_cmd); + locale_term_cmd = g_locale_from_utf8(app->tools_term_cmd, -1, NULL, NULL, NULL); + if (locale_term_cmd == NULL) locale_term_cmd = g_strdup(app->tools_term_cmd); // split the term_cmd, so arguments will work too term_argv = g_strsplit(locale_term_cmd, " ", -1); term_argv_len = g_strv_length(term_argv); - + long_executable = utils_remove_ext_from_filename(locale_filename);
// only check for existing executable, if executable is required by %e @@ -345,7 +345,7 @@ check_executable = g_strconcat(long_executable, ".class", NULL); else check_executable = g_strdup(long_executable); - + // check whether executable exists if (stat(check_executable, &st) != 0) { @@ -356,14 +356,14 @@ goto free_strings; } } -
+ // check if terminal path is set (to prevent misleading error messages) if (stat(term_argv[0], &st) != 0) { msgwin_status_add( _("Could not find terminal '%s' " - "(check path for Terminal tool setting in Preferences)"), app->build_term_cmd); + "(check path for Terminal tool setting in Preferences)"), app->tools_term_cmd); result_id = (GPid) 1; goto free_strings; } @@ -376,13 +376,13 @@ gchar *utf8_working_dir = NULL; utf8_working_dir = g_locale_to_utf8(working_dir, -1, NULL, NULL, NULL); if (utf8_working_dir == NULL) utf8_working_dir = g_strdup(working_dir); - + msgwin_status_add(_("Failed to change the working directory to %s"), working_dir); result_id = (GPid) 1; // return 1, to prevent error handling of the caller g_free(utf8_working_dir); goto free_strings; } - + // replace %f and %e in the run_cmd string cmd = g_strdup(doc_list[idx].file_type->programs->run_cmd); tmp = g_path_get_basename(locale_filename);
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/callbacks.c 2006-06-29 14:00:09 UTC (rev 502) @@ -128,9 +128,9 @@ g_free(app->pref_template_mail); g_free(app->pref_template_initial); g_free(app->pref_template_version); - g_free(app->build_make_cmd); - g_free(app->build_term_cmd); - g_free(app->build_browser_cmd); + g_free(app->tools_make_cmd); + g_free(app->tools_term_cmd); + g_free(app->tools_browser_cmd); while (! g_queue_is_empty(app->recent_queue)) { g_free(g_queue_pop_tail(app->recent_queue)); @@ -504,7 +504,7 @@ gchar *basename;
if (idx == -1 || ! doc_list[idx].is_valid || doc_list[idx].file_name == NULL) return; - + basename = g_path_get_basename(doc_list[idx].file_name); if (dialogs_show_question(_ ("Are you sure you want to reload '%s'?\nAny unsaved changes will be lost."), @@ -2409,7 +2409,7 @@ { gint idx = document_get_cur_idx(); guint i = GPOINTER_TO_INT(user_data); - + if (idx < 0 || encodings[i].charset == NULL) return;
g_free(doc_list[idx].encoding);
Modified: trunk/src/geany.h =================================================================== --- trunk/src/geany.h 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/geany.h 2006-06-29 14:00:09 UTC (rev 502) @@ -181,9 +181,10 @@ gchar *search_text; gchar *terminal_settings; gchar build_make_custopt[256]; - gchar *build_browser_cmd; - gchar *build_make_cmd; - gchar *build_term_cmd; + gchar *tools_browser_cmd; + gchar *tools_make_cmd; + gchar *tools_term_cmd; + gchar *tools_print_cmd; GtkIconSize toolbar_icon_size; GtkWidget *toolbar; GtkWidget *run_button;
Modified: trunk/src/keyfile.c =================================================================== --- trunk/src/keyfile.c 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/keyfile.c 2006-06-29 14:00:09 UTC (rev 502) @@ -130,10 +130,10 @@ g_key_file_set_string(config, PACKAGE, "pref_template_initial", app->pref_template_initial); g_key_file_set_string(config, PACKAGE, "pref_template_version", app->pref_template_version);
- // store build settings - g_key_file_set_string(config, "build", "build_make_cmd", app->build_make_cmd ? app->build_make_cmd : ""); - g_key_file_set_string(config, "build", "build_term_cmd", app->build_term_cmd ? app->build_term_cmd : ""); - g_key_file_set_string(config, "build", "build_browser_cmd", app->build_browser_cmd ? app->build_browser_cmd : ""); + // store tools settings + g_key_file_set_string(config, "tools", "make_cmd", app->tools_make_cmd ? app->tools_make_cmd : ""); + g_key_file_set_string(config, "tools", "terminal_cmd", app->tools_term_cmd ? app->tools_term_cmd : ""); + g_key_file_set_string(config, "tools", "browser_cmd", app->tools_browser_cmd ? app->tools_browser_cmd : "");
for (i = 0; i < app->mru_length; i++) { @@ -285,15 +285,15 @@ app->pref_editor_trail_space = utils_get_setting_boolean(config, PACKAGE, "pref_editor_trail_space", TRUE);
tmp_string = g_find_program_in_path("make"); - app->build_make_cmd = utils_get_setting_string(config, "build", "build_make_cmd", tmp_string); + app->tools_make_cmd = utils_get_setting_string(config, "tools", "tools_make_cmd", tmp_string); g_free(tmp_string);
tmp_string = g_find_program_in_path("xterm"); - app->build_term_cmd = utils_get_setting_string(config, "build", "build_term_cmd", tmp_string); + app->tools_term_cmd = utils_get_setting_string(config, "tools", "tools_term_cmd", tmp_string); g_free(tmp_string);
tmp_string = g_find_program_in_path("mozilla"); - app->build_browser_cmd = utils_get_setting_string(config, "build", "build_browser_cmd", tmp_string); + app->tools_browser_cmd = utils_get_setting_string(config, "tools", "tools_browser_cmd", tmp_string); g_free(tmp_string);
recent_files = g_key_file_get_string_list(config, "files", "recent_files", &len, NULL);
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/prefs.c 2006-06-29 14:00:09 UTC (rev 502) @@ -176,14 +176,14 @@ gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "entry_com_term"), FALSE); gtk_widget_set_sensitive(lookup_widget(app->prefs_dialog, "button_term"), FALSE); #else - if (app->build_make_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_make")), app->build_make_cmd); + if (app->tools_make_cmd) + gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_make")), app->tools_make_cmd);
- if (app->build_term_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_term")), app->build_term_cmd); + if (app->tools_term_cmd) + gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_com_term")), app->tools_term_cmd); #endif - if (app->build_browser_cmd) - gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_browser")), app->build_browser_cmd); + if (app->tools_browser_cmd) + gtk_entry_set_text(GTK_ENTRY(lookup_widget(app->prefs_dialog, "entry_browser")), app->tools_browser_cmd);
// Template settings @@ -370,16 +370,16 @@
// Tools Settings widget = lookup_widget(app->prefs_dialog, "entry_com_make"); - g_free(app->build_make_cmd); - app->build_make_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); + g_free(app->tools_make_cmd); + app->tools_make_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
widget = lookup_widget(app->prefs_dialog, "entry_com_term"); - g_free(app->build_term_cmd); - app->build_term_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); + g_free(app->tools_term_cmd); + app->tools_term_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
widget = lookup_widget(app->prefs_dialog, "entry_browser"); - g_free(app->build_browser_cmd); - app->build_browser_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget))); + g_free(app->tools_browser_cmd); + app->tools_browser_cmd = g_strdup(gtk_entry_get_text(GTK_ENTRY(widget)));
// Template settings widget = lookup_widget(app->prefs_dialog, "entry_template_developer");
Modified: trunk/src/utils.c =================================================================== --- trunk/src/utils.c 2006-06-28 19:27:19 UTC (rev 501) +++ trunk/src/utils.c 2006-06-29 14:00:09 UTC (rev 502) @@ -60,7 +60,7 @@ #else const gchar *argv[3];
- argv[0] = app->build_browser_cmd; + argv[0] = app->tools_browser_cmd; argv[1] = uri; argv[2] = NULL;
@@ -841,7 +841,7 @@ encoding_strings = utils_glist_from_string("UTF-8"); encodings = encodings_get_encodings(encoding_strings); utils_glist_strings_free(encoding_strings); - + if (g_get_charset((const gchar**)&locale_charset) == FALSE) { const GeanyEncoding *locale_encoding; @@ -1854,7 +1854,7 @@ "bitset", "dequev", "list", "map", "set", "queue", "stack", "vector", "algorithm", "iterator", "functional", "string", "complex", "valarray", NULL }; - + blank = gtk_menu_item_new_with_label("#include "...""); gtk_container_add(GTK_CONTAINER(menu_edit), blank); gtk_widget_show(blank); @@ -2340,7 +2340,7 @@ guint field_idx_line; // idx of the field where the line is guint field_idx_file; // idx of the field where the filename is guint skip_dot_slash = 0; // number of characters to skip at the beginning of the filename - + *filename = NULL; *line = -1;
@@ -2394,7 +2394,7 @@ // the error output of python and tcl equals case GEANY_FILETYPES_TCL: case GEANY_FILETYPES_PYTHON: - { + { // File "HyperArch.py", line 37, in ? // (file "clrdial.tcl" line 12) pattern = " ""; @@ -2404,7 +2404,7 @@ break; } case GEANY_FILETYPES_PASCAL: - { + { // bandit.pas(149,3) Fatal: Syntax error, ";" expected but "ELSE" found // still untested with other files than the opened pattern = "("; @@ -2417,7 +2417,7 @@ }
fields = g_strsplit_set(string, pattern, field_min_len); - + // parse the line if (g_strv_length(fields) < field_min_len) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.