GNOME Bugzilla – Bug 431170
Glade should have a Single Document Interface
Last modified: 2013-05-20 07:57:41 UTC
Glade currently has a Multiple Document Interface (MDI), where multiple projects are edited in the same window. The WM already provides a way to switch between documents, and we implement similar functionality in Glade. I see this as an unnecessary duplication of functionality, with no added benefit. It would be better if Glade had a Single Document Interface (SDI), where each glade document is viewed in a new window. This would remove duplicated behaviour and give glade a more document-centric design. There is nothing special about Glade for it to require a MDI interface. MDI's are better to suited to heavyweight IDE's like Anjuta or text editors like Emacs (applications which seem to implement their own WM's). Most other document editors/viewers in GNOME provide an SDI interface (at least in addition to tabbed-MDI). These apps include nautilus, evince, gedit, eye-of-gnome, file-roller, gnome-terminal, and even epiphany. An extract from the GNOME HIG: "MDI has several inherent usability problems, so its use is discouraged in applications. It is better to open each document in a new primary window, with its own menubar, toolbars and statusbar, or allow multiple instances of your application to be run simultaneously. In either case, this leaves it for the window manager (acting on the user's preferences) rather than your application to decide how to group and present document windows from the same application." Technical Notes: * Glade will still support multiple projects. In a hypothetical SDI scheme, all the windows would belong to the same process, so cut-and-paste would work as before. * Would require that components such as the Inspector, Palette, and Editor be associated with a window instance rather than GladeApp. This implies that each window instance will have its own unique child components. GladeApp would probably not even need to know what projects are currently open - Each window instance manages its own project. * Doing this would move a lot of functionality away from GladeApp. This is beneficial as I sense that GladeApp is starting to behave like an all-powerful God Object, with no single core problem for which it has responsibility to solve (http://en.wikipedia.org/wiki/God_object).
Cool ideas, this could also help for things like, DnD widgets from one project to another :) About GladeApp, there are things that make sence and things that dont - having the concept of an "active project" has always been a hinderence and a source of deep hidden bugs, the idea that there is only one editor/palette/project-view etc is also bogus, but lets keep in mind that the GladeApp is also useful in some ways as a proxy object to an IDE (and maybe also to store a _very limited_ amount of global vars) - for instance, the devhelp search signals all the IDE to handle a single signal and perform a search, another requirement is that we'll want to add a signal proxy to GladeApp to notify the IDE that a signal was added/removed/modified in a project (those are currently only available at the GladeWidget level). Albiet, alot of these things could be handled on a per/project basis instead of GladeApp, its definitely worth the investigation. One thing we'll want to keep in mind is that the low level widgets should still remain as flexible and usable as possible independantly, we shouldn't go assuming that an IDE will use such any particular paradigm (this lack of assumption will also help us keep things neat and tidy on our own side too :) ).
I think glade has a SDI right now, no?
No Glade is currently a Multiple-Document-Interface. And, personally I like it this way, the notebook tabs are nice to have and show a comprehensive layout of open files. However I wouldnt mind if we expanded then and allowed notebook tabs to drag'n'drop, allowing reordering of projects in the editor as well as dragging notebook tabs outside of Glade and creating new windows (much in the way that firefox deals with tabs, gedit currently uses an MDI also, not sure but I think that they have options to pop the tabs out of the main UI as well).
I'm going to finally WONTFIX this one. I like how Glade currently works this way, embedders such as IDEs could do differently, but soon Glade will be single instance too, so opening an new Glade file will open a new tab in an already running Glade. I'm comfortable with the way this currently works and would rather have a single instance of Glade with multiple projects loaded than multiple instances of Glade.