Kaydet (Commit) e6caa033 authored tarafından Nick Treleaven's avatar Nick Treleaven

Also show status messages on the status bar

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@469 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 13b673d8
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
src/document.h: Go back to the same line when reloading. src/document.h: Go back to the same line when reloading.
Fix start selection bug when clicking in the Fix start selection bug when clicking in the
current file if it has changed. 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@uvena.de> 2006-06-19 Enrico Troeger <enrico.troeger@uvena.de>
......
...@@ -529,11 +529,7 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado ...@@ -529,11 +529,7 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
sci_goto_pos(doc_list[idx].sci, pos, TRUE); 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); filetype *use_ft = (ft != NULL) ? ft : filetypes_get_from_filename(utf8_filename);
...@@ -555,10 +551,18 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado ...@@ -555,10 +551,18 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
document_set_filetype(idx, use_ft); document_set_filetype(idx, use_ft);
utils_build_show_hide(idx); 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)."), msgwin_status_add(_("File %s opened(%d%s)."),
utf8_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)), utf8_filename, gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)),
(readonly) ? _(", read-only") : ""); (readonly) ? _(", read-only") : "");
}
document_set_text_changed(idx); document_set_text_changed(idx);
g_free(data); g_free(data);
......
...@@ -174,6 +174,10 @@ void msgwin_status_add(gchar const *format, ...) ...@@ -174,6 +174,10 @@ void msgwin_status_add(gchar const *format, ...)
g_vsnprintf(string, 511, format, args); g_vsnprintf(string, 511, format, args);
va_end(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_append(msgwindow.store_status, &iter);
//gtk_list_store_insert(msgwindow.store_status, &iter, 0); //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); //gtk_list_store_set(msgwindow.store_status, &iter, 0, (state > 0) ? &white : &dark, 1, string, -1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment