Unsplit when the source document is closed.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/split-window-plugin@2937 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
a0fc129a49
commit
0bf9414532
@ -4,6 +4,8 @@
|
||||
doc/plugins.dox:
|
||||
Add plugin signal "document-close", sent just before a document is
|
||||
closed.
|
||||
* plugins/splitwindow.c:
|
||||
Unsplit when the source document is closed.
|
||||
|
||||
|
||||
2008-09-10 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
|
||||
|
@ -254,6 +254,20 @@ void plugin_init(GeanyData *data)
|
||||
}
|
||||
|
||||
|
||||
static void on_document_close(GObject *obj, GeanyDocument *doc, gpointer user_data)
|
||||
{
|
||||
/* remove the split window because the document won't exist anymore */
|
||||
if (our_editor && doc == our_editor->document)
|
||||
on_unsplit(NULL, NULL);
|
||||
}
|
||||
|
||||
PluginCallback plugin_callbacks[] =
|
||||
{
|
||||
{ "document-close", (GCallback) &on_document_close, FALSE, NULL },
|
||||
{ NULL, NULL, FALSE, NULL }
|
||||
};
|
||||
|
||||
|
||||
void plugin_cleanup()
|
||||
{
|
||||
if (plugin_state != STATE_UNSPLIT)
|
||||
|
Loading…
x
Reference in New Issue
Block a user