Skip to content

Commit

Permalink
Fix closing the documents when quitting
Browse files Browse the repository at this point in the history
When quitting we avoid doing some unnecessary actions, and used to
simply destroy the Scintilla widget (and thus the notebook page)
instead of the elaborate UI updates.

Unfortunately, when the infobars landed they changed what is packed as
a notebook page, and now destroying the Scintilla widget alone is not
enough to close the page.  Fix this by properly removing the whole page
no matter what it contains.

This issue was visible when quitting Geany with a project open.
  • Loading branch information
b4n committed Jul 26, 2014
1 parent 0682a25 commit b65f499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/document.c
Expand Up @@ -653,7 +653,7 @@ static gboolean remove_page(guint page_num)
/* we need to destroy the ScintillaWidget so our handlers on it are
* disconnected before we free any data they may use (like the editor).
* when not quitting, this is handled by removing the notebook page. */
gtk_widget_destroy(GTK_WIDGET(doc->editor->sci));
gtk_notebook_remove_page(GTK_NOTEBOOK(main_widgets.notebook), page_num);
}
else
{
Expand Down

0 comments on commit b65f499

Please sign in to comment.