|
|
Re: KParts question: msg#00353
kde-devel
|
Subject: |
Re: KParts question |
Actually I have one more question. is it possible to override the behavior of an action inherited by the Part? In my case I would like to customize the SaveAs behavior. What should I do? Is there a specific function that I can override to fit my needs?
Thanks again, Matteo On Tue, Jul 28, 2009 at 22:23, Albert Astals Cid <aacid@xxxxxxx> wrote:
A Dimarts, 28 de juliol de 2009, Andreas Pakulat va escriure:
> On 28.07.09 15:57:53, Matteo Agostinelli wrote:
> > Hello!
> >
> > I am curently developing a KDE application based on the Kate part. I have
> > created the template using kapptemplate. Now I would like to customize
> > the contents of the menu and, while I am able to add new actions, I
> > cannot remove existing elements, inherited from the Kate part. For
> > example, let's assume that I want to remove the Save and Save As...
> > actions from the File menu.
> >
> > <MenuBar>
> > <Menu name="file" noMerge="1"><text>&File</text>
> >
> > <Action name="file_open" />
> > <Action name="file_open_recent" />
> >
> > <DefineGroup name="save_merge"/>
> > <Separator/>
> >
> > <DefineGroup name="revert_merge" append="revert_merge"/>
> > <DefineGroup name="print_merge" append="print_merge"/>
> > <Separator/>
> >
> > <Action name="file_quit"/>
> > </Menu>
> >
> > If I remove the line '<DefineGroup name="save_merge"/>', I still get the
> > Save and Save as elements. They are just shifted to the bottom of the
> > menu but they are not removed. So, is it possible to remove them at all?
>
> You can't. xmlgui doesn't allow to do that as the KPart's xmlgui-file's
> content is just added to your menu. At least thats what I've seen so
> far.
Right, not a bug, you are setting the shell XMLGUI file but the part is also
setting one and it adds the save actions, if you want this not to happen you
should open a feature request against katepart or even better go to kwrite-
devel@xxxxxxx, discuss the feature and if accepted code it yourself.
Albert
>
> Andreas
>
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
|
|