[Geany-Devel] GEANY - New behaviour of "close" document action to close only tabs
vadim4j at gmail.com
Mon Jan 21 23:04:29 UTC 2013
It is just a "demonstrative" code.
So, I just wanted to share my changes,
may be someone will be interested in them, nothing more :-)
Actually, meanwhile I dont see it as a plugin-like functionality, but
rather like main functionality
which can be turned on/off from "settings" box.
On Tue, Jan 22, 2013 at 12:42 AM, Lex Trotman <elextr at gmail.com> wrote:
> On 22 January 2013 09:08, vadim kochan <vadim4j at gmail.com> wrote:
> > Hi all,
> > May be someone will be interested in this.
> > I find useless that file is removed from session when I close it from
> > and decided to make
> > changes for this.Not sure if the changes are good, this is first working
> > version.
> Something like this should be in a plugin rather than changing the
> behaviour of the Geany default projects. The default project
> functionality (really just named sessions) provides a very lightweight
> and simple paradigm which should not be changed. Making your version
> a plugin will allow the current system to remain as the default. There
> are also the two existing project plugins which provide different
> project features, so why not another?
> > I think that tabs can be more usefull when allows switching only between
> > selected
> > documents but not between all.
> > Here are the changes
> > https://github.com/vkochan/geany/commits/close_tab_not_file .
> > Will be glade to have any response.
> > Here are some notes:
> > 1) All "close" actions anywhere in IDE now means to close document tab
> > 2) Opened tabs are saved into session file for future restoring them
> > opening the project.
> > 3) To remove document from project it is possible only by using "Remove"
> > menu
> > item on sidebar panel.
> > 4) Plugins should receive "document-close" event in case when document
> > removed
> > from project.Not sure if its correct. With these changes should be 2
> > different events: document-close
> > & document-remove.
> Personally I don't see the use-case for your paradigm, the project
> session remembers all files opened unless they are manually removed?
> But that is up to you.
> > The feature can be turned on only after defining a macro in cflags before
> > the build:
> > -DGEANY_CLOSE_TAB_NOT_FILE
> As I said above, it should be a plugin, not a change to the core
> behaviour. Then a user can enable it at runtime if they want to.
> Also a compile time selection is not acceptable, distributions can
> only select one option, and having differing project functionality in
> different distros is going to be very confusing for users, so it is
> unlikely to be accepted into Geany.
> PS if your plugin needs extra hooks into the core please discuss it
> here *before* you code anything, that will save you from possibly
> having to make big changes.
> > I tested it only a little bit, not all cases, so there can be some
> > surprises.
> > _______________________________________________
> > Devel mailing list
> > Devel at lists.geany.org
> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
> Devel mailing list
> Devel at lists.geany.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel