I've wondered about this feature myself. My temporary solution was to write a plugin that hides the menu bar until mouse over, like the Start bar used to be configurable in Windows. I haven't had a chance to update all of my plugins to the latest geany, but if you care to look at the plugin, you can see it here https://github.com/sblatnick/geany-plugins/blob/master/hide-menu/src/hide-menu.c.
Alternatively, I thought the best idea would be a single icon, like chrome's menu icon. The problem is finding a place for it that doesn't occupy an entire row or column of screen space.
Thanks,
Steve
On 07/04/2016 10:23 AM, Colomban Wendling wrote:
Le 02/07/2016 à 11:08, Vasiliy Faronov a écrit :
Hi,
Most of the time, when using Geany, I don't need the menu and status bars; they are just noise. But occasionally I want to check the status bar (e.g. for the line/column number) or browse the menu. So I want to toggle their visibility with a keystroke.
I wrote a simple plugin for that: https://github.com/vfaronov/geany-togglebars
The problem is, the menu and status bars are not exposed in geany.main_widgets, so I have to find them manually, which makes the plugin brittle as it relies on a specific window layout.
Perhaps there is a better way to do it?
You could use a more solid resolve_widget() function, that doesn't rely on the layout, something like that:
def resolve_widget(widget, expected_type): if isinstance(widget, expected_type): return widget elif isinstance(widget, Gtk.Container): for child in widget.get_children(): ret = resolve_widget(child, expected_type) if ret: return ret return None
Also, your plugin is a bit dangerous for the new user if I read it correctly: you do not bind the keybinding by default (which is good), but you hide the menubar by default. This means that the user enabling your plugin might be totally lost with no way of recovering his/her menubar to even access the preferences and set a keybinding.
I guess you did that because you didn't wanna bother about a configuration file for saving the state for such a little thing you probably didn't mean to publish so much, but if you do want to publish it it'd be important to resolve this.
Regards, Colomban _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel