Fix a possible segfault on quitting caused by processing GTK messages before status messages
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@487 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
5b4f2b5280
commit
add773c88c
@ -1,3 +1,9 @@
|
||||
2006-06-26 Nick Treleaven <nick.treleaven@btinternet.com>
|
||||
|
||||
* src/document.c: Fix a possible segfault on quitting caused by
|
||||
processing GTK messages before status messages.
|
||||
|
||||
|
||||
2006-06-25 Enrico Troeger <enrico.troeger@uvena.de>
|
||||
|
||||
* README, doc/geany.docbook: Added license notice Scintilla.
|
||||
|
@ -525,16 +525,6 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
|
||||
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);
|
||||
@ -552,6 +542,15 @@ int document_open_file(gint idx, const gchar *filename, gint pos, gboolean reado
|
||||
utils_update_recent_menu();
|
||||
}
|
||||
|
||||
// currently status messages are overridden by update sci SCN_UPDATEUI message
|
||||
// processing gtk messages first causes a segfault on closing & reloading utils.c
|
||||
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") : "");
|
||||
|
||||
g_free(utf8_filename);
|
||||
g_free(locale_filename);
|
||||
//gettimeofday(&tv1, &tz);
|
||||
|
Loading…
x
Reference in New Issue
Block a user