GNOME Bugzilla – Bug 133865
menu editor does not work
Last modified: 2006-01-15 21:18:03 UTC
they are shown as toplevel menu items.
Yes, unfortunately creating/editing menus in glade3 is broken in many ways and it's one of the major items in the TODO file. What you see when pressing "Edit Menu" is a cut&paste port of the old glade-2 menu editor, but it is not working... the fact that you can actually add something (even if only toplevel) pretty much surprise me since I thought it was not working at all ;-) . I'm changing the summary to a generic bug for the menu editor, so that we track here all the ideas/issues with the menu editor. Among other things, the following come to my mind: - rework the backend (Menu/MenuShell widgets in glade-gtk.c, so that they can have children etc). Note: we may want to see what happens in glade-2/gtk with regard to the new GtkAction api - rework the UI (for example it was proposed to handle accelerators directly in the TreeView, like the shortcuts editing in gnome-terminal)
I will start to work on a new menu editor for the new menu in gtk+- 2.4. So if anybody has ideas/proposals or want to make the menu editor instead of me, please speak now. Cheers,
Good to see you in full hacking mode :-) Some of questions/ideas (no code, sorry ;) - beeing action based, how does it interact with the toolbar? Do we need a ActionsMenuEditor which handles both menu and toolbars? If Yes how does one make an app with menubar and not toolbar or viceversa? - How do we handle popup menus (and to a lesser degree the deprecated OptionMenu) which AFAIK still need the old menu stuff? - For the accelerator thingie I mentioned above we can use the acclerator widget in libegg - when you come up with something, it may be worth to discuss on glade-devel since it may be of interest also to Damon/Glade-2
it would be awesome if menu edition could be done in a way similar to that of Visual Studio or QT Designer. I'll attach some screenshots to illustrate the way they work.
Created attachment 24238 [details] adding a new top level menu item
Created attachment 24239 [details] editing menues with QT Designer
I already tried to do it that way a long time ago, but it was a pain in the ass. This time I will try to do it the simpler I can, and once we have something that can create menus, and a bit of free time, I will maybe play with cool new ways to create menus. But first I want a working, traditional menu editor. Cheers,
Does anyone work on the menu editor at the moment?
I had been tasked with this, but I suffered some catastrophic data loss & wound up losing pretty much of my un-checked in development, so that's back to square one. At this point, I'm too swamped with other things to really do any glade work, so I'm offering the task up for anyone else who'd like a crack at it.
for what it is worth I find the menu editing using programs like Visual studio really cumbersome and slow to use, you have to mess around with mouse a lot to get into the right place to edit anything (it is like trying to make a html table by adding one cell at a time). I think trying to make the input system too much like the end result is a not the best idea for the default menu editing system (useful for editing already created menus but annoying when you want to create your menus) and from what Joaquin wrote it sounds like a pain to implement anway. The existing glade-2 menu editor isn't half bad but it would be easier if it allowed items in the list to be edited in place. If it were more like a full editable list (think spreadsheet) I think it could be a lot faster to input the necessary information. (Ideally I hope to eventualy get around to writing a script to turn quick and dirty text markup into a glade/other-xml file File _New _Open --- Close Edit Cu_t _Copy etc.)
Now that Juan Pablo Ugarte is working on the menu editor I'll put down some of my ideas on the topic. - Noting from the first patch (implementing load/save support for menus) that previously created menus are somewhat editable, I'm hoping it wont be too hard to get Diego Gonzalez's idea in without too much trouble, although I agree with Alan Horkan that adding placeholders and such is just troublesome for the user, it'd be nice to have somthing resembleing the glade-2 menu editor for the creation & heavy manipulation of menus & toolbars, but still be able to edit the previously created menu's properties without launching the menu editor. - As I was saying on the list, I want to do the most code re-use as possible: o I want to enhance the glade-editor code alot; particularly I want to remove the GladeEditorProperty code from glade-editor and implement encapsulation at that level properly o Also I want to enhance the GladeProjectView so that you can chose a widget in the hierarchy to make the active "top-level" for the project-view (and also discociate context menu stuff from the project-view, glade-app could be a client of the project view and implement that stuff seperatly). In a nutshell I want to be able to use the project-view & the GladeEditorProperties in the menu/toolbar editors.
GladeEditorProperty now in its own file, much much cleaner code now, GladeEditorProperties can be used anywhere throughout the code easily now. GladeEditorProperty is also now a GtkHBox derivitive containing the "controls" part of the property, the label item is accessable on the struct as `->eventbox' (an eventbox containing the label), these need to be packed seperately into a table to look nice (hence why they arent contained in the same HBox).
Menu editor is in cvs and stablizing, closing this bug.