SF.net SVN: geany: [802] trunk/src

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Sep 8 13:39:36 UTC 2006


Revision: 802
          http://svn.sourceforge.net/geany/?rev=802&view=rev
Author:   ntrel
Date:     2006-09-08 06:39:32 -0700 (Fri, 08 Sep 2006)

Log Message:
-----------
Allow compiler and find messages to be added when the messages
window is hidden.
Add msgwin_show().

Modified Paths:
--------------
    trunk/src/msgwindow.c
    trunk/src/msgwindow.h

Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c	2006-09-08 11:25:56 UTC (rev 801)
+++ trunk/src/msgwindow.c	2006-09-08 13:39:32 UTC (rev 802)
@@ -168,8 +168,8 @@
 void msgwin_compiler_add(gint msg_color, gboolean scroll, gchar const *format, ...)
 {
 	GtkTreeIter iter;
+	GtkTreePath *path;
 	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};
@@ -177,8 +177,6 @@
 	static gchar string[512];
 	va_list args;
 
-	if (! app->msgwindow_visible) return;
-
 	va_start(args, format);
 	g_vsnprintf(string, 511, format, args);
 	va_end(args);
@@ -194,7 +192,8 @@
 	gtk_list_store_append(msgwindow.store_compiler, &iter);
 	gtk_list_store_set(msgwindow.store_compiler, &iter, 0, color, 1, string, -1);
 
-	path = gtk_tree_model_get_path(gtk_tree_view_get_model(GTK_TREE_VIEW(msgwindow.tree_compiler)), &iter);
+	path = gtk_tree_model_get_path(
+		gtk_tree_view_get_model(GTK_TREE_VIEW(msgwindow.tree_compiler)), &iter);
 	gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(msgwindow.tree_compiler), path, NULL, TRUE, 0.5, 0.5);
 
 	if (scroll)
@@ -205,16 +204,24 @@
 }
 
 
+void msgwin_show()
+{
+	app->msgwindow_visible = TRUE;
+	gtk_widget_show(lookup_widget(app->window, "scrolledwindow1"));
+}
+
+
 // adds string to the msg treeview
 void msgwin_msg_add(gint line, gint idx, gchar *string)
 {
 	GtkTreeIter iter;
 	static gint state = 0;
 
-	if (! app->msgwindow_visible) return;
+	if (! app->msgwindow_visible) msgwin_show();
 
 	gtk_list_store_append(msgwindow.store_msg, &iter);
-	gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, idx, 2, ((state++ % 2) == 0) ? &white : &dark, 3, string, -1);
+	gtk_list_store_set(msgwindow.store_msg, &iter, 0, line, 1, idx, 2,
+		((state++ % 2) == 0) ? &white : &dark, 3, string, -1);
 }
 
 
@@ -227,8 +234,6 @@
 	gchar *statusmsg, *time_str;
 	va_list args;
 
-	//if (! app->msgwindow_visible) return;
-
 	va_start(args, format);
 	g_vsnprintf(string, 511, format, args);
 	va_end(args);

Modified: trunk/src/msgwindow.h
===================================================================
--- trunk/src/msgwindow.h	2006-09-08 11:25:56 UTC (rev 801)
+++ trunk/src/msgwindow.h	2006-09-08 13:39:32 UTC (rev 802)
@@ -71,6 +71,8 @@
 
 void msgwin_prepare_compiler_tree_view(void);
 
+void msgwin_show();
+
 void msgwin_msg_add(gint line, gint idx, gchar *string);
 
 void msgwin_compiler_add(gint msg_color, gboolean scroll, gchar const *format, ...);


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