Multiple main window support, and action-collections
Andreas Pakulat
apaku at gmx.de
Mon Jul 27 00:56:42 UTC 2009
On 27.07.09 03:11:54, Alexander Dymo wrote:
> > > I'd say we need two functions in a plugin:
> > > //this would return action collection without a parent, and then will be
> > > //reparented to a mainwindow by mainwindow itself
> > > KActionCollection &IPlugin::guiActions()
> > > QString IPlugin::xmlGuiFile()
> > > and a function in MainWindowPrivate to create KXMLGUIClient instance
> > > based on this information.
> >
> > We now have this in one function instead.
> In this one?
> createActionsForMainWindow(Sublime::MainWindow* window, QString& xmlFile,
> KActionCollection& actions)
>
> Api-wise this function, being in IPlugin, doesn't look good. Functions which
> modify their arguments are a bit confusing.
Hmm, but it does make the default setup easier, i.e. supplying the
KActionCollection from the xmlgui client. The xmlfile indeed is a bit
strange and might be better in a separate function.
> > > /me wonders whether there're more problems possible...
> >
> > I'm pretty sure there are, but I'm not sure any of that is fixable
> > within kdevelop. I really wonder wether its worth the trouble or we just
> > decide to either drop xmlgui or multi-mainwindow support.
>
> It's going to be quite complex to drop xmlgui. It does solve quite a lot of
> problems (shortcuts, toolbar/menu editing, merging with kate and other parts
> ui and so on). Not an easy task. After all "liveui" was never finished.
Frankly, I don't care about kparts other than kate. We're not konqueror
after all. Shortcuts are actually not that hard to do without xmlgui,
its just filling up kshortcutseditor with a list of action collections
and then doing something with that. In fact its quite easy to let it
store the shortcuts into a config file and then read it from there.
Leaves the toolbar-editing (menu-editing isn't supported via GUI and I
doubt there are many users out there editing the xml file), no idea
wether the editor is exported...
So while this isn't an easy task, if we decide that we only need a
subset of xmlgui its not undoable IMHO (and so far all we need is a
subset). It might even prove to be easier to do than trying to fixup
xmlgui to properly handle multiple mainwindows.
Maybe we should ask dfaure what he thinks about all this?
Andreas
--
Your love life will be happy and harmonious.
More information about the KDevelop-devel
mailing list