It is just a "demonstrative" code.<div>So, I just wanted to share my changes, </div><div>may be someone will be interested in them, nothing more :-)</div><div><br></div><div>Actually, meanwhile I dont see it as a  plugin-like functionality, but rather like main functionality</div>
<div>which can be turned on/off from "settings" box.<br><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 12:42 AM, Lex Trotman <span dir="ltr"><<a href="mailto:elextr@gmail.com" target="_blank">elextr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 22 January 2013 09:08, vadim kochan <<a href="mailto:vadim4j@gmail.com">vadim4j@gmail.com</a>> wrote:<br>

> Hi all,<br>
> May be someone will be interested in this.<br>
><br>
> I find useless that file is removed from session when I close it from tab,<br>
> and decided to make<br>
> changes for this.Not sure if the changes are good, this is first working<br>
> version.<br>
<br>
</div>Something like this should be in a plugin rather than changing the<br>
behaviour of the Geany default projects.  The default project<br>
functionality (really just named sessions) provides a very lightweight<br>
and simple paradigm which should not be changed.  Making your version<br>
a plugin will allow the current system to remain as the default. There<br>
are also the two existing project plugins which provide different<br>
project features, so why not another?<br>
<div class="im"><br>
<br>
><br>
> I think that tabs can be more usefull when allows switching only between<br>
> selected<br>
> documents but not between all.<br>
><br>
> Here are the changes<br>
> <a href="https://github.com/vkochan/geany/commits/close_tab_not_file" target="_blank">https://github.com/vkochan/geany/commits/close_tab_not_file</a> .<br>
> Will be glade to have any response.<br>
><br>
> Here are some notes:<br>
><br>
> 1) All "close" actions anywhere in IDE now means to close document tab page.<br>
><br>
> 2) Opened tabs are saved into session file for future restoring them after<br>
> opening the project.<br>
><br>
> 3) To remove document from project it is possible only by using "Remove"<br>
> menu<br>
> item on sidebar panel.<br>
><br>
> 4) Plugins should receive "document-close" event in case when document<br>
> removed<br>
> from project.Not sure if its correct. With these changes should be 2<br>
> different events: document-close<br>
> & document-remove.<br>
><br>
<br>
</div>Personally I don't see the use-case for your paradigm, the project<br>
session remembers all files opened unless they are manually removed?<br>
But that is up to you.<br>
<div class="im"><br>
> The feature can be turned on only after defining a macro in cflags before<br>
> the build:<br>
> -DGEANY_CLOSE_TAB_NOT_FILE<br>
><br>
<br>
</div>As I said above, it should be a plugin, not a change to the core<br>
behaviour.  Then a user can enable it at runtime if they want to.<br>
Also a compile time selection is not acceptable, distributions can<br>
only select one option, and having differing project functionality in<br>
different distros is going to be very confusing for users, so it is<br>
unlikely to be accepted into Geany.<br>
<br>
Cheers<br>
Lex<br>
<br>
PS if your plugin needs extra hooks into the core please discuss it<br>
here *before* you code anything, that will save you from possibly<br>
having to make big changes.<br>
<div class="im"><br>
><br>
> I tested it only a little bit, not all cases, so there can be some<br>
> surprises.<br>
><br>
><br>
</div>> _______________________________________________<br>
> Devel mailing list<br>
> <a href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a><br>
> <a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a><br>
><br>
_______________________________________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a><br>
</blockquote></div><br></div>