Shortcuts to toggle Dockwidgets

Milian Wolff mail at milianw.de
Thu Oct 29 14:42:31 UTC 2009


On Thursday, 29. October 2009 15:19:30 Milian Wolff wrote:
> On Thursday, 29. October 2009 10:19:18 Andreas Pakulat wrote:
> > On 29.10.09 02:52:49, Milian Wolff wrote:
> > > Yep, another mail from me...
> > >
> > > I tried to fix an issue that I personally find very grave: The lack of
> > > user definable shortcuts to toggle a _specific_ dock widget, say
> > > documentation or projects.
> > >
> > > Here's my first take on it that looks good to me (central place, every
> > > dock widget gets this feature automagially). It even does what it
> > > should do:
> > >
> > > http://mwolff.pastebin.com/fcf2bd4a
> > >
> > > Big problem: this stuff is not saved across kdevelop restarts. Got some
> > > feedback from #kde-devel, turns out that my whole approach is wrong...
> > > Which is a pity!
> > >
> > > The shortcuts get saved in kdevelopui.rc, but they are not associated
> > > with their actions on restart, since at the time this mapping is done
> > > the actions are not in the action collection or something like that...
> > >
> > > I was told that these actions should go _in each plugin_, and _each
> > > plugin_ should provie a $PLUGINui.rc ...
> >
> > Not "each" plugin, but any plugin that wants a toolview (openwith for
> > example has no such thing).
> 
> Yes, of course.
> 
> > And as Niko said all plugins are xmlguiclients
> > or are able to provide one (we actually need to create plugin-independent
> > clients to be able to use multiple mainwindows).
> 
> Hmm sorry, but I need more help there. The documentation I find on
> xmlguiclients doesn't help me at all with plugin based approach of
>  kdevelop.
> 
> Lets take the Documentation tool view again. It's added by the
> DocumentationController. I find nothing related to xmlgui in that file!
>  It's not even an IPlugin, hence will require special treatment, correct?
> 
> So where would I bring xmlgui in to play?
> 
> I still think that my first approach is much nicer...

Thinking about it:

A dock widget can be added more than once...

So a simple "toggle documentation dock widget" would not work as soon as the 
user added more than one. Ok, we could do "toggle documentation dock widget in 
right area", but that would break if the users added two dock widgets to the 
same area.

This really sucks. I want that feature but apparently it cannot be designed 
fail safe for the case we have. Does that mean this feature cannot be 
implemented?

Imo what we _should_ do is the following (much work, I fear)... And I'll be 
the one to do it:

1) when more than one widget of the same type gets added - no matter to which 
area - append a number (Documentation, Documentation 2, ...)
2) let the user rename a dock widget, usecase e.g.: two consoles, one "local", 
other "remote", for fast diffentiation
3) use these names when configuring toggle shortcuts

Imo one could even add a quickopen provider to quickly toggle dock widgets 
without having to remember a shortcut. this would be really nice as well imo. 
But shortcuts should also be provided imo.
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20091029/290c4cc8/attachment.sig>


More information about the KDevelop-devel mailing list