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

List:       kde-devel
Subject:    Re: newbie... mixing kactions and kstdactions
From:       Michael Jarrett <gexcfxyy () umail ! corel ! com>
Date:       2001-02-16 18:31:44
[Download RAW message or body]

Ick! I had problems with this earlier...

You can try actually adding the actions into the menu in XML (merge
won't do here). Use the standard names for them (in
kdelibs/kdeui/kstdaction.cpp somewhere). Ie actually add the <Action
name="file_new"/> to your XML menu definition.

If that doesn't work properly or makes two entries, rename the File menu
to filex (the text will still say "&File" so it doesn't really matter).
It's a hack, but might make it merge right.

Michael Jarrett
x5747

Pupeno wrote:
> 
> On Friday 16 February 2001 11:18, Michael Jarrett wrote:
> > Yes it's perfectly possible - go ahead and mix them - the standard
> > actions will be merged in with yours, if you use the same menu names.
> >
> > Using the XML rc file the <Merge/> tag will allow you to add the
> > stdactions at a specific point in the menu, or you can just accept the
> > default behavior.
> How can I do it ?
> I have this kactions:
> ---------
> fileNew = KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection());
> fileOpen = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
> fileOpenInNew = new KAction(i18n("Open in a New &Window"), 0, this,
> SLOT(slotFileOpenInNew()), actionCollection(), "open_in_new");
> fileOpenLocation = new KAction(i18n("Open Location"), 0, this,
> SLOT(slotFileOpenLocation()), actionCollection(), "open_location");
> fileOpenLocationInNew = new KAction(i18n("Open Location in a New &Window"),
> 0, this, SLOT(slotFileOpenLocationInNew()), actionCollection(),
> "open_location_in_new");
> fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
> fileSaveEverything = new KAction(i18n("Save everything"), 0, this,
> SLOT(slotFileSaveEverything()), actionCollection(), "save_everything");
> fileClose = KStdAction::close(this, SLOT(slotFileClose()),
> actionCollection());
> -----------
> and I want to them to appear in the File menu in this order:
> File
> -New
> -Open
> -Open in a New Window
> -Open Location
> -Open Location in a New Window
> -Save
> -Save Everything
> -Close
> 
> How can I do it ?
> this is my actual ui.rc file:
> <!DOCTYPE kpartgui>
> <kpartgui name="komand" version="0.1">
> <MenuBar>
>   <Menu name="file"><text>&amp;File</text>
>     <Action name="open_in_new"/>
>                 <Action name="open_location"/>
>                 <Action name="open_location_in_new"/>
>                 <Action name="save_everything"/>
>   </Menu>
>   <Action name="window_menu"/>
> </MenuBar>
> </kpartgui>
> 
> Thank you.
> --
> Pupeno: pupeno@pupeno.com.ar  www.pupeno.com.ar
> 
> 
> >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
-- 
The address in the headers is not the poster's real email address.  Do not send
private mail to the poster using your mailer's "reply" feature.  CC's of mail 
to mailing lists are OK.  Problem reports to "postmaster@umail.corel.com".  
The poster's email address is "michaelj@corel.com".
 
>> Visit http://master.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