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

List:       kde-devel
Subject:    Question on Toolbars
From:       Stephane MANKOWSKI <stephane () mankowski ! fr>
Date:       2013-02-13 15:19:50
Message-ID: 511BAF16.4090003 () mankowski ! fr
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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.

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

*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?

Thank you in advance.
Regards,
Stephane



[Attachment #5 (multipart/related)]

[Attachment #7 (text/html)]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi,<br>
    <br>
    In Skrooge, the main windows is a <b>KParts::MainWindow</b> where
    plugins (<b>KParts::ReadOnlyPart</b>) are added by using something
    like this:<br>
    <blockquote><small><font color="#666666"><i><b>setupActions();</b></i></font></small><br>
      <small><font color="#666666"><i><b>setupGUI(Default,
              "../skg/skgmainpanel.rc");</b></i></font></small><br>
      <small><font color="#666666"><i><b>...</b></i></font></small><br>
      <small><font color="#666666"><i><b>for (int j = 0; j &lt;
              nbplugin; ++j)</b></i></font></small><br>
      <small><font color="#666666"><i><b>&nbsp;
              guiFactory()-&gt;addClient(m_pluginsList.at(j));</b></i></font></small><br>
    </blockquote>
    <font color="#006600"><b>This work well</b></font>, menus and
    toolbars are built as expected.<br>
    <br>
    But, I still have some questions:<br>
    <br>
    <b>Q1: Why in "Configure Toolbars", I have one item per plugin in
      the combo? </b><br>
    <img src="cid:part1.09090105.04010105@mankowski.fr" alt=""><br>
    This is not really user friendly to customize the toolbar.<br>
    <br>
    <b>Q2:Is it possible to group all "Main Toolbar"? How?</b><br>
    <br>
    <b>Q3:Is the following behavior normal ?</b><br>
    If the rc file of the "unit" plugin is like this:<br>
    <b><font color="#666666"><small><small>&lt;!DOCTYPE kpartgui SYSTEM
            "kpartgui.dtd"&gt;<br>
            &lt;kpartgui name="skrooge_unit" version="2"&gt;<br>
            &lt;MenuBar&gt;<br>
            &nbsp; &lt;Menu name="edit"&gt;&lt;text&gt;Edit&lt;/text&gt;<br>
            &nbsp;&nbsp;&nbsp; &nbsp; &lt;Separator group="edit_group_2"/&gt;<br>
            &nbsp;&nbsp;&nbsp; &nbsp; &lt;Action name="edit_split_stock"
            group="edit_group_2"/&gt;<br>
            &nbsp; &lt;/Menu&gt;<br>
            &nbsp; &lt;Menu name="tool"&gt;&lt;text&gt;Tools&lt;/text&gt;<br>
            &nbsp;&nbsp;&nbsp; &nbsp; &lt;Action name="tool_delete_unused_units"
            group="tool_group_2"/&gt;<br>
            &nbsp; &lt;/Menu&gt;&nbsp;&nbsp;&nbsp; <br>
            &lt;/MenuBar&gt;<br>
            <u>&lt;ToolBar name="mainToolBar"&gt;&lt;text&gt;Main
              Toolbar&lt;/text&gt;&lt;/ToolBar&gt;</u><br>
            &lt;/kpartgui&gt;</small></small></font></b><br>
    Then the 2 actions can be added in the "Main Toolbar" like this:<br>
    <img src="cid:part2.08020901.05030503@mankowski.fr" alt=""><br>
    If I remove the empty &lt;ToolBar&gt; in the rc file, then the user
    is no more able to add the 2 actions in the "Main Toolbar".<br>
    Is it normal? Does it mean that each plugin must declare all
    toolbars to be sure that the action can be added?<br>
    <br>
    Thank you in advance.<br>
    Regards,<br>
    Stephane<br>
    <br>
    <br>
  </body>
</html>

["gcdfaeif.png" (image/png)]
["gchhhdcg.png" (image/png)]

>> 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