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

List:       kde-devel
Subject:    Re: Hi all
From:       Chakkaradeep C C <chaks.yoper () gmail ! com>
Date:       2005-09-30 5:27:55
Message-ID: a54a308e0509292215m5d69fbfv2454e6d2068ab356 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Aaron,

> 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.
 can you please provide a small example for the above?....i went thru "
kservicegroup.h" and i did saw an example for geting "screensavers".In the
same way how can i find the programs installed?..
 and,
 in the Menu creation, where do we 'draw' the Menu?..i want to do something
like WindowsXP start Menu...
 and,
 in the Menu creation code...in the "service_mnu.cpp",
********************code**********************************************************************************
 PanelServiceMenu * m =
newSubMenu(g->name(), g->relPath(), this, g->name().toUtf8(),
inlineHeaderName);
********************code**********************************************************************************
  does the above code create a new menu?...so when i check for
"KST_KServiceGroup", i get all the Parents..that is
"Accessories","Games","Development" etc.,.And is the line below which adds
them?..
"int newId = insertItem(iconset, groupCaption, m, id++);"??
 and when it comes to "KST_KService", how are those items added as child to
their respective "KST_KServiceGroup" in the insertMenuItem( ) function.??
 I really feel very hard to grasp things as am new to KDE Programing...i
would be very hapy if people could help me out..
 thanks in advance...
 with regards,
C.C.Chakkaradeep
  On 9/28/05, Aaron J. Seigo <aseigo@kde.org> wrote:

> 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


[Attachment #5 (text/html)]

<div>Hi Aaron,</div>
<div><br>&gt;in that case you won't want to follow the groupings as provided \
by<br>&gt;KServiceGroup. you'll just want to get all the applications available \
and<br>&gt;store them in your own tree arrangement. you can query \
sycoca&nbsp;&nbsp;(sycoca == <br>&gt;SYstem COnfiguraton CAche) by application name \
or keywords.</div> <div>&nbsp;</div>
<div>can you please provide a small example for the above?....i went thru \
&quot;kservicegroup.h&quot; and i did saw an example for geting \
&quot;screensavers&quot;.In the same way how can i find the programs \
installed?..</div>

<div>&nbsp;</div>
<div>and,</div>
<div>&nbsp;</div>
<div>in the Menu creation, where do we 'draw' the Menu?..i want to do something like \
WindowsXP start Menu...</div> <div>&nbsp;</div>
<div>and,</div>
<div>&nbsp;</div>
<div>in the Menu creation code...in the &quot;service_mnu.cpp&quot;, </div>
<div>********************code**********************************************************************************</div>
 <div>PanelServiceMenu * m \
=<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
newSubMenu(g-&gt;name(), g-&gt;relPath(), this, g-&gt;name().toUtf8(), \
inlineHeaderName);<br>********************code**********************************************************************************
 </div>
<div>&nbsp;</div>
<div>does the above code create a new menu?...so when i check for \
&quot;KST_KServiceGroup&quot;, i get all the Parents..that is \
&quot;Accessories&quot;,&quot;Games&quot;,&quot;Development&quot; etc.,.And is the \
line below which adds them?.. </div>
<div>&quot;int newId = insertItem(iconset, groupCaption, m, id++);&quot;??</div>
<div>&nbsp;</div>
<div>and when it comes to &quot;KST_KService&quot;, how are those items added as \
child to their respective &quot;KST_KServiceGroup&quot; in the insertMenuItem( ) \
function.??</div> <div>&nbsp;</div>
<div>I really feel very hard to grasp things as am new to KDE Programing...i would be \
very hapy if people could help me out..</div> <div>&nbsp;</div>
<div>thanks in advance...</div>
<div>&nbsp;</div>
<div>with regards,</div>
<div>C.C.Chakkaradeep<br>&nbsp;</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 9/28/05, <b class="gmail_sendername">Aaron J. \
Seigo</b> &lt;<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>&gt; \
wrote:</span></div> <div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; \
BORDER-LEFT: #ccc 1px solid">On Wednesday 28 September 2005 00:32, Chakkaradeep C C \
wrote:<br>&gt; Hi all,<br>&gt;<br>&gt; &gt;&gt; was unable to find where the \
&quot;Applications&quot; Menu gets added. <br>&gt; &gt;<br>&gt; &gt;that happens in \
PanelServiceMenu. KMenu::initialize() makes a call to<br>&gt; \
&gt;PanelServiceMenu::initialize() which calls doInitialize which call<br>&gt; &gt; \
fillMenu<br>&gt;<br>&gt; i got the above function, but now since i want to place the \
applications in <br>&gt; my own custom group name rather than using \
&quot;Application,Development,Games&quot;,<br>&gt; how should i proceed...does \
kappfinder plays a role here?..<br><br>in that case you won't want to follow the \
groupings as provided by <br>KServiceGroup. you'll just want to get all the \
applications available and<br>store them in your own tree arrangement. you can query \
sycoca&nbsp;&nbsp;(sycoca ==<br>SYstem COnfiguraton CAche) by application name or \
keywords.<br> <br>&gt; what does,<br>&gt; &quot;KServiceGroup::Ptr \
g(static_cast&lt;KServiceGroup *&gt;(e));&quot; statement<br>&gt; do?<br><br>e and e1 \
are KSycocaEntry objects; KServiceGroup is a KSycocaEntry subclass<br>that represents \
a group of &quot;services&quot; (in this case, application entries as <br>described \
by .desktop files). so this cast is necessary to change the pointer<br>type from a \
KSycocaEntry to a KServiceGroup.<br><br>&gt; if ( nbChildCount == 1 &amp;&amp; \
g-&gt;allowInline() &amp;&amp; g-&gt;inlineAlias()) <br><br>this bit of code just \
inlines submenus of only one item. so \
this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Menu \
A<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Menu B<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Item 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Menu C<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Item 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Item 3 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Item 4<br>&nbsp;&nbs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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