On Wed, 29 May 2013 00:04:31 +0200 Pallai Roland pallair@magex.hu wrote:
2013/5/28 Dimitar Zhekov dimitar.zhekov@gmail.com:
Long story short, why don't you write a plugin that connects to "document-close", and focuses your favorite widget when the last document is closed? [...]
I considered this but I have to connect to focus-event signals of plugin's widgets if I want to return to the most recent widget [...]
How about connecting to "set-focus-event" of the main Geany window? You will be able to select at least the top level widget to return to. Well, you won't have exact widget...
Or you can track the focus event for the side/down panels only, and attach a panel ID + it's current page to each sci object on "document-open". That'll work almost without exceptions, and you can even add a keybinding to jump back to the page possibly used to open the current document.
It's not about just me, I really believe it makes Geany a bit better. I presented use cases where it has advantages, ...
Does it? ui_add_recent_widget() can only tell us what widget was used to open the most recent document, not the one which was used to open the _last_ remaining document. Considering that the plugin may be removed, or the widget may be in a different state, that's still better than a random "grab-focus"... not much better though.
using of this feature is optional in plugins
How is that an advantage? It'll work even worse.
no known drawbacks,
Except making plugins incompatible with all previous versions of Geany.
code complexity is very low,
Usability too, in it's current form.
Don't get me wrong, but I don't understand this resistance: it changes a behaviour that nobody cared about. If it helps only 1% of Geany users -as Colomban wrote-, why not..?
If it only helps only 1% of Geany users, does not work well, and requires changes to the core and many plugins, why accept it?..
I don't understand this resistance I do not want to break or change your workflow.
Although I don't beleive this feature has a place in Geany, I am still honestly trying to find an implementation that'll will be more useful, and can be implemented without making changes left and right. :)