KDevelop UI cleanup initiative
Sascha Cunz
scunz at ng-projekt.de
Sun May 30 21:11:37 UTC 2004
On Sunday 30 May 2004 14:44, Jens Dagerbo wrote:
> > > 2. The fact that all toolviews are always shown, even when they don't
> > > contain anything.
> >
> > Yes. Makes no sense to have the valgrind plugin visible unless one at
> > least started one valgrinding task. Same for: grep (actually any other
> > output view)
>
> Exactly.
>
> > > It would for instance be nice if the debugger plugin didn't show all
> > > its toolviews when the debugger isn't running as they are completely
> > > useless then. And in fact, it does hide them, but they don't disappear.
> > > This is a problem of the isolated to the IDEAl UI mode, as the other
> > > modes can hide toolviews without removing them. I suspect we won't
> > > solve this, but it would have been nice. :)
> >
> > Won't we? Is there a big problem i do not see? We could create a
> > slotPrepareDebugging and a slotStopedDebugging. Those slots would create
> > the debugger ui or destroy it. If i'm missing something here, please tell
> > me!
>
> I'm not following.. the debugger plugin is responsible for both starting
> the debugger and creating it's UI. If you suggest it should hold off
> creating most of its UI until the debugger is started (and destroy it
> afterwards) this is not only a large change, it seems like overkill for
> what is really just hiding a few widgets.
>
> The reason hide() probably won't do (IIRC) is that, unless I'm mistaken,
> the IDEAl toolbar buttons will not disappear when we hide the widgets. We
> would still have the "GDB" toolbar button visible for instance, and hiding
> the buttons is really the real objective.
>
> However, now that Jowenn seems to have reappeared, maybe he has some
> suggestions. :)
>
> > While writing this mail, i remembered my try to put all file related tool
> > views into one toolview: Actually it is "the core" that says what
> > toolviews are visible and which not. So i doubt we cannot hide them in
> > IDEAl mode. We could at least do like we do with AutoHell Manager and
> > QListViewItems of it's sub projects.
>
> And what trick is employed in the AM? :)
Hideing and (re-)showing :)
well, let's consider:
- storing a "State" map somewhere in src/ - call it "stateMap" and let's say
it maps a QString to a boolean.
- adding "void enterState(const QString&);", "void leaveState(const
QString&);" and "bool amInState(const QString&) const;" to some
Core-Interface
- add "QStringList toolViewsVisibleInStates();" to KDevPlugin
- when we start the debugger, we enterState("debugger"); Which in turn will
walk all plugins that are visible in debugger state and insert them as
toolviews. if we stop the debugger, we leaveState("debugger"); which will
remove all the debugger tool views and store them into a map.
This is just a short draft and I think we could actually do that much easier.
But contrary to "it will not happen", this would be a solution - and an
extendable one, too.
Sascha
More information about the KDevelop-devel
mailing list