Revision: 494 Author: eht16 Date: 2006-06-27 08:29:33 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/geany/?rev=494&view=rev
Log Message: ----------- Parse stdout of compiler output too.
Modified Paths: -------------- trunk/ChangeLog trunk/data/filetypes.pascal trunk/data/filetypes.php trunk/src/build.c trunk/src/callbacks.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-27 15:24:39 UTC (rev 493) +++ trunk/ChangeLog 2006-06-27 15:29:33 UTC (rev 494) @@ -1,3 +1,9 @@ +2006-06-27 Enrico Troeger enrico.troeger@uvena.de + + * data/filetypes.php, data/filetypes.pascal, src/callbacks.c, + src/build.c: Parse stdout of compiler output too. + + 2006-06-27 Nick Treleaven nick.treleaven@btinternet.com
* src/geany.h, src/keyfile.c:
Modified: trunk/data/filetypes.pascal =================================================================== --- trunk/data/filetypes.pascal 2006-06-27 15:24:39 UTC (rev 493) +++ trunk/data/filetypes.pascal 2006-06-27 15:29:33 UTC (rev 494) @@ -38,5 +38,5 @@ # %f will be replaced by the complete filename # %e will be replaced by the filename without extension # (use only one of it at one time) -compiler=fpc "%f" 1>&2 +compiler=fpc "%f" run_cmd="./%e"
Modified: trunk/data/filetypes.php =================================================================== --- trunk/data/filetypes.php 2006-06-27 15:24:39 UTC (rev 493) +++ trunk/data/filetypes.php 2006-06-27 15:29:33 UTC (rev 494) @@ -24,9 +24,7 @@ # %f will be replaced by the complete filename # %e will be replaced by the filename without extension # (use only one of it at one time) -# Geany expects that compilers put there error messages on stderr, php -l put the messages on stdout, -# so to get it working, we push them to stderr -compiler=php -l "%f" 1>&2 +compiler=php -l "%f" run_cmd=php "%f"
# use can also use something like this, to view your PHP or HTML files through a browser and webserver
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2006-06-27 15:24:39 UTC (rev 493) +++ trunk/src/build.c 2006-06-27 15:29:33 UTC (rev 494) @@ -454,24 +454,23 @@ { //if (s != G_IO_STATUS_NORMAL && s != G_IO_STATUS_EOF) break; if (GPOINTER_TO_INT(data)) - { msgwin_compiler_add(COLOR_RED, FALSE, g_strstrip(msg)); - if (app->pref_editor_use_indicators) + else + msgwin_compiler_add(COLOR_BLACK, FALSE, g_strstrip(msg)); + + if (app->pref_editor_use_indicators) + { + gchar *filename; + gint line; + utils_parse_compiler_error_line(g_strstrip(msg), &filename, &line); + if (line != -1) { - gchar *filename; - gint line; - utils_parse_compiler_error_line(g_strstrip(msg), &filename, &line); - if (line != -1) - { - gint idx = document_find_by_filename(filename, FALSE); - // document_set_indicator will check valid idx - document_set_indicator(idx, line - 1); - } - g_free(filename); + gint idx = document_find_by_filename(filename, FALSE); + // document_set_indicator will check valid idx + document_set_indicator(idx, line - 1); } + g_free(filename); } - else - msgwin_compiler_add(COLOR_BLACK, FALSE, g_strstrip(msg));
x++; g_free(msg);
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-06-27 15:24:39 UTC (rev 493) +++ trunk/src/callbacks.c 2006-06-27 15:29:33 UTC (rev 494) @@ -1403,14 +1403,12 @@ GtkTreeModel *model; GtkTreeSelection *selection; gchar *string; - static GdkColor red = {0, 65535, 0, 0}; - GdkColor *color;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(msgwindow.tree_compiler)); if (gtk_tree_selection_get_selected(selection, &model, &iter)) { - gtk_tree_model_get(model, &iter, 0, &color, 1, &string, -1); - if (string && gdk_color_equal(&red, color)) + gtk_tree_model_get(model, &iter, 1, &string, -1); + if (string != NULL) { gint line; gint idx;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.