SF.net SVN: geany: [469] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Jun 20 14:54:17 UTC 2006


Revision: 469
Author:   ntrel
Date:     2006-06-20 07:54:09 -0700 (Tue, 20 Jun 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=469&view=rev

Log Message:
-----------
Also show status messages on the status bar

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
    trunk/src/msgwindow.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-06-20 11:55:34 UTC (rev 468)
+++ trunk/ChangeLog	2006-06-20 14:54:09 UTC (rev 469)
@@ -4,6 +4,8 @@
    src/document.h: Go back to the same line when reloading.
                    Fix start selection bug when clicking in the
                    current file if it has changed.
+ * src/msgwindow.c, src/document.c:
+   Also show status messages on the status bar.
 
 
 2006-06-19  Enrico Troeger  <enrico.troeger at uvena.de>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-06-20 11:55:34 UTC (rev 468)
+++ trunk/src/document.c	2006-06-20 14:54:09 UTC (rev 469)
@@ -529,12 +529,8 @@
 
 	sci_goto_pos(doc_list[idx].sci, pos, TRUE);
 
-	if (reload)
+	if (! reload)
 	{
-		msgwin_status_add(_("File %s reloaded."), utf8_filename);
-	}
-	else
-	{
 		filetype *use_ft = (ft != NULL) ? ft : filetypes_get_from_filename(utf8_filename);
 
 		if (readonly) gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(
@@ -555,10 +551,18 @@
 
 		document_set_filetype(idx, use_ft);
 		utils_build_show_hide(idx);
+	}
+
+	// update sci to send SCN_UPDATEUI before we set status messages
+	while (gtk_events_pending())
+		gtk_main_iteration();
+	if (reload)
+		msgwin_status_add(_("File %s reloaded."), utf8_filename);
+	else
 		msgwin_status_add(_("File %s opened(%d%s)."),
 				utf8_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)),
 				(readonly) ? _(", read-only") : "");
-	}
+
 	document_set_text_changed(idx);
 
 	g_free(data);

Modified: trunk/src/msgwindow.c
===================================================================
--- trunk/src/msgwindow.c	2006-06-20 11:55:34 UTC (rev 468)
+++ trunk/src/msgwindow.c	2006-06-20 14:54:09 UTC (rev 469)
@@ -174,6 +174,10 @@
 	g_vsnprintf(string, 511, format, args);
 	va_end(args);
 
+	// display status message in status bar
+	gtk_statusbar_pop(GTK_STATUSBAR(app->statusbar), 1);
+	gtk_statusbar_push(GTK_STATUSBAR(app->statusbar), 1, string);
+
 	gtk_list_store_append(msgwindow.store_status, &iter);
 	//gtk_list_store_insert(msgwindow.store_status, &iter, 0);
 	//gtk_list_store_set(msgwindow.store_status, &iter, 0, (state > 0) ? &white : &dark, 1, string, -1);


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