SF.net SVN: geany: [1034] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Mon Nov 27 11:32:45 UTC 2006
Revision: 1034
http://svn.sourceforge.net/geany/?rev=1034&view=rev
Author: ntrel
Date: 2006-11-27 03:32:45 -0800 (Mon, 27 Nov 2006)
Log Message:
-----------
Show build result on status bar if Compiler window is not selected.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-11-25 17:07:59 UTC (rev 1033)
+++ trunk/ChangeLog 2006-11-27 11:32:45 UTC (rev 1034)
@@ -1,3 +1,9 @@
+2006-11-27 Nick Treleaven <nick.treleaven at btinternet.com>
+
+ * src/build.c:
+ Show build result on status bar if Compiler window is not selected.
+
+
2006-11-25 Nick Treleaven <nick.treleaven at btinternet.com>
* src/msgwindow.c, src/notebook.c, src/msgwindow.h, src/notebook.h:
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2006-11-25 17:07:59 UTC (rev 1033)
+++ trunk/src/build.c 2006-11-27 11:32:45 UTC (rev 1034)
@@ -674,6 +674,35 @@
}
+static void show_build_result_message(gboolean failure)
+{
+ gchar *msg;
+
+ if (failure)
+ {
+ msg = _("Compilation failed.");
+ msgwin_compiler_add(COLOR_DARK_RED, TRUE, "%s", msg);
+ // If msgwindow is hidden, user will want to display it to see the error
+ if (! app->msgwindow_visible)
+ {
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(msgwindow.notebook), MSG_COMPILER);
+ msgwin_show();
+ }
+ else
+ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(msgwindow.notebook)) != MSG_COMPILER)
+ ui_set_statusbar("%s", msg);
+ }
+ else
+ {
+ msg = _("Compilation finished successfully.");
+ msgwin_compiler_add(COLOR_BLUE, TRUE, "%s", msg);
+ if (! app->msgwindow_visible ||
+ gtk_notebook_get_current_page(GTK_NOTEBOOK(msgwindow.notebook)) != MSG_COMPILER)
+ ui_set_statusbar("%s", msg);
+ }
+}
+
+
static void build_exit_cb(GPid child_pid, gint status, gpointer user_data)
{
if (build_info.type != GBO_RUN) // not necessary when executing a file
@@ -695,19 +724,7 @@
{ // any other failure occured
failure = TRUE;
}
-
-
- if (failure)
- {
- msgwin_compiler_add(COLOR_DARK_RED, TRUE, _("Compilation failed."));
- if (! app->msgwindow_visible) msgwin_show();
- }
- else
- {
- gchar *msg = _("Compilation finished successfully.");
- msgwin_compiler_add(COLOR_BLUE, TRUE, msg);
- if (! app->msgwindow_visible) ui_set_statusbar("%s", msg);
- }
+ show_build_result_message(failure);
#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list