Revision: 800 http://svn.sourceforge.net/geany/?rev=800&view=rev Author: ntrel Date: 2006-09-08 03:20:15 -0700 (Fri, 08 Sep 2006)
Log Message: ----------- Show parsable errors in red; stderr and compile failure in dark red
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/callbacks.c trunk/src/document.c trunk/src/msgwindow.c trunk/src/msgwindow.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/ChangeLog 2006-09-08 10:20:15 UTC (rev 800) @@ -1,3 +1,11 @@ +2006-09-08 Nick Treleaven nick.treleaven@btinternet.com + + * src/build.c, src/msgwindow.c, src/msgwindow.h: + Show parsable errors in red; stderr and compile failure in dark red. + * src/callbacks.c: Fix compilation problem with sci_cb_do_comment. + * src/document.c: Quick fix for C89 compatibility. + + 2006-09-07 Enrico Tröger enrico.troeger@uvena.de
* src/socket.c, src/main.c, src/callbacks.c:
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/src/build.c 2006-09-08 10:20:15 UTC (rev 800) @@ -468,31 +468,29 @@ { //GIOStatus s; gchar *msg; - guint x = 1;
while (g_io_channel_read_line(ioc, &msg, NULL, NULL, NULL) && msg) { //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)); - else - msgwin_compiler_add(COLOR_BLACK, FALSE, g_strstrip(msg)); + gint color; + color = (GPOINTER_TO_INT(data)) ? COLOR_DARK_RED : COLOR_BLACK; + g_strstrip(msg);
if (app->pref_editor_use_indicators) { gchar *filename; gint line; - msgwin_parse_compiler_error_line(g_strstrip(msg), &filename, &line); - if (line != -1) + msgwin_parse_compiler_error_line(msg, &filename, &line); + if (line != -1 && filename != NULL) { gint idx = document_find_by_filename(filename, FALSE); - // document_set_indicator will check valid idx - document_set_indicator(idx, line - 1); + document_set_indicator(idx, line - 1); // will check valid idx + color = COLOR_RED; // error message parsed on the line } g_free(filename); } + msgwin_compiler_add(color, FALSE, msg);
- x++; g_free(msg); } } @@ -526,11 +524,11 @@
if (failure) { - msgwin_compiler_add(COLOR_BLUE, TRUE, _("compilation finished unsuccessful")); + msgwin_compiler_add(COLOR_DARK_RED, TRUE, _("Compilation failed.")); } else { - msgwin_compiler_add(COLOR_BLUE, TRUE, _("compilation finished successful")); + msgwin_compiler_add(COLOR_BLUE, TRUE, _("Compilation finished successfully.")); }
#endif
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/src/callbacks.c 2006-09-08 10:20:15 UTC (rev 800) @@ -2468,7 +2468,7 @@ { gint idx = document_get_cur_idx(); if (idx == -1 || ! doc_list[idx].is_valid) return; - sci_cb_do_comment(idx, -1); + sci_cb_do_comment(idx); }
@@ -2478,7 +2478,7 @@ { gint idx = document_get_cur_idx(); if (idx == -1 || ! doc_list[idx].is_valid) return; - sci_cb_do_uncomment(idx, -1); + sci_cb_do_uncomment(idx); }
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/src/document.c 2006-09-08 10:20:15 UTC (rev 800) @@ -1566,11 +1566,13 @@
void document_undo(gint idx) { + undo_action *action; + +#if 1 sci_undo(doc_list[idx].sci); return; +#endif
- undo_action *action; - if (idx == -1 || ! doc_list[idx].is_valid) return;
action = g_trash_stack_pop(&doc_list[idx].undo_actions);
Modified: trunk/src/msgwindow.c =================================================================== --- trunk/src/msgwindow.c 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/src/msgwindow.c 2006-09-08 10:20:15 UTC (rev 800) @@ -171,6 +171,7 @@ GdkColor *color; GtkTreePath *path; static GdkColor red = {0, 65535, 0, 0}; + static GdkColor dark_red = {0, 65535 / 2, 0, 0}; static GdkColor blue = {0, 0, 0, 65535}; static GdkColor black = {0, 0, 0, 0}; static gchar string[512]; @@ -185,6 +186,7 @@ switch (msg_color) { case COLOR_RED: color = &red; break; + case COLOR_DARK_RED: color = &dark_red; break; case COLOR_BLUE: color = &blue; break; default: color = &black; }
Modified: trunk/src/msgwindow.h =================================================================== --- trunk/src/msgwindow.h 2006-09-07 17:40:44 UTC (rev 799) +++ trunk/src/msgwindow.h 2006-09-08 10:20:15 UTC (rev 800) @@ -28,6 +28,7 @@ enum { COLOR_RED, + COLOR_DARK_RED, COLOR_BLACK, COLOR_BLUE };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.