[Geany-devel] [Patch] : On closing the last tab create new untitled document.

Nick Treleaven nick.treleaven at xxxxx
Fri Sep 24 11:47:07 UTC 2010


On Thu, 23 Sep 2010 21:18:11 +0300
Liviu Andronic <landronimirc at gmail.com> wrote:

> >> ..if a single _untitled_ tab is displayed. This is the way Opera
> >> handles it, and that the behaviour that I find ergonomic in this case;
> >> it allows to close the last titled document tab without the need to
> >> close the app. As soon as the document gets modified or gets a title,
> >> the 'x' should be restored. Midori, Xfce's web browser with 'always
> >> show tabbar' enabled, behaves similarly to Opera, although it keeps a
> >> non-functional 'x' even on the last empty tab; clicking on the last
> >> empty tab doesn't close it/re-open another empty, so I guess the
> >> unnecessary 'x' can be reported as a bug.
> >
> > The trouble is, it's difficult to tell if the document is 'modified',
> > as that can include changing indent settings, encoding, etc, not
> > necessarily a textual change.
> >
> I was thinking that this could be done whenever Geany reports an
> 'untitled' document as modified, for example when the tab name becomes
> red and the 'save current file' is activated.

But the tab doesn't change when you just change the indent type. So
there could be a good reason why the user wants to close the document
and start again, to use default indent settings. So closing should not
be disabled because it's not really practical to detect all the
possible changes to document settings.

Regards,
Nick



More information about the Devel mailing list