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

List:       kde-devel
Subject:    Re: Hi all
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2005-09-28 14:23:41
Message-ID: 200509280823.50490.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 28 September 2005 00:32, Chakkaradeep C C wrote:
> Hi all,
>
> >> was unable to find where the "Applications" Menu gets added.
> >
> >that happens in PanelServiceMenu. KMenu::initialize() makes a call to
> >PanelServiceMenu::initialize() which calls doInitialize which call
> > fillMenu
>
> i got the above function, but now since i want to place the applications in
> my own custom group name rather than using "Application,Development,Games",
> how should i proceed...does kappfinder plays a role here?..

in that case you won't want to follow the groupings as provided by 
KServiceGroup. you'll just want to get all the applications available and 
store them in your own tree arrangement. you can query sycoca  (sycoca == 
SYstem COnfiguraton CAche) by application name or keywords.

> what does,
> "KServiceGroup::Ptr g(static_cast<KServiceGroup *>(e));" statement
> do?

e and e1 are KSycocaEntry objects; KServiceGroup is a KSycocaEntry subclass 
that represents a group of "services" (in this case, application entries as 
described by .desktop files). so this cast is necessary to change the pointer 
type from a KSycocaEntry to a KServiceGroup.

> if ( nbChildCount == 1 && g->allowInline() && g->inlineAlias())

this bit of code just inlines submenus of only one item. so this:

	Menu A
		Menu B
			Item 1
		Menu C
			Item 2
			Item 3
		Item 4
		Item 5
		Item 6

becomes:

	Menu A
		Menu C
			Item 2
			Item 3
		Item 1
		Item 4
		Item 5
		Item 6

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)

[Attachment #5 (application/pgp-signature)]

 =

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=
e <<


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

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