[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Question on Toolbars
From:       Albert Astals Cid <aacid () kde ! org>
Date:       2013-02-18 19:15:38
Message-ID: 1941830.FuZ9Dzssx5 () xps
[Download RAW message or body]

El Dimecres, 13 de febrer de 2013, a les 16:19:50, Stephane MANKOWSKI va 
escriure:
> Hi,
> 
> In Skrooge, the main windows is a *KParts::MainWindow* where plugins
> (*KParts::ReadOnlyPart*) are added by using something like this:
> 
>     /*setupActions();*/
>     /*setupGUI(Default, "../skg/skgmainpanel.rc");*/
>     /*...*/
>     /*for (int j = 0; j < nbplugin; ++j)*/
>     /*guiFactory()->addClient(m_pluginsList.at(j));*/
> 
> *This work well*, menus and toolbars are built as expected.
> 
> But, I still have some questions:
> 
> *Q1: Why in "Configure Toolbars", I have one item per plugin in the combo? *
> 
> This is not really user friendly to customize the toolbar.

Agreed

> 
> *Q2:Is it possible to group all "Main Toolbar"? How?*

I don't think you can (without adding the feature to kdelibs)

> *Q3:Is the following behavior normal ?*
> If the rc file of the "unit" plugin is like this:
> *<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
> <kpartgui name="skrooge_unit" version="2">
> <MenuBar>
>    <Menu name="edit"><text>Edit</text>
>        <Separator group="edit_group_2"/>
>        <Action name="edit_split_stock" group="edit_group_2"/>
>    </Menu>
>    <Menu name="tool"><text>Tools</text>
>        <Action name="tool_delete_unused_units" group="tool_group_2"/>
>    </Menu>
> </MenuBar>
> _<ToolBar name="mainToolBar"><text>Main Toolbar</text></ToolBar>_
> </kpartgui>*
> Then the 2 actions can be added in the "Main Toolbar" like this:
> 
> If I remove the empty <ToolBar> in the rc file, then the user is no more
> able to add the 2 actions in the "Main Toolbar".
> Is it normal? Does it mean that each plugin must declare all toolbars to
> be sure that the action can be added?

That is how i understand it, each plugin has it's own toolbar, it seems that 
kdelibs has a feature that if you name all the toolbars the same way they are 
collapsed and just shown as one, but the editing and "creating" part is still 
not really up to that feature.

It may be an interesting feature to add but xmlgui+parts is not really easy to 
develop, so unless you have lots of time to spent getting your head around it, 
it may be better to improve the documentation. After all, all KDE programs 
have the same issue, so users may be already used to it.

Cheers,
  Albert

> 
> Thank you in advance.
> Regards,
> Stephane

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic