[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KStatusNotifierItem's "secondaryActivateRequested" signal not being emitted
From: Eduard Huguet <eduardhc () gmail ! com>
Date: 2013-06-26 8:39:13
Message-ID: CALG9nuXyNhoyX-uAsO21nVFseZB-4ekLBbjd9bTdNpMsdTZkXw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
This is also what I discovered later. It seems a bit weird to me, as I
think it would be more logical to provide a signal when the user right
clicks on the icon (as it's a fairly common action - who middle-clicks on a
tray icon, ever, ...?), but well, this is the way it works.
Anyway, I finally found a way to do what I wanted by connecting to the
"aboutToShow" signal of the QMenu returned by contextMenu() call of the
KStatusNotifierItem's associated "KMenu" object: by doing so, I can update
the menu safely right before it's displayed.
As a sidenote, trying the same thing directly over KStatusNotifierItem's
KMenu object didn't work, and leaded to strange dbus-related errors
appearing on the console...
Kind regards,
Eduard Huguet
2013/6/25 Albert Astals Cid <aacid@kde.org>
> El Dimarts, 25 de juny de 2013, a les 10:42:42, Eduard Huguet va escriure=
:
> > Hi,
> > I'm trying to add tray icon support for a small application of my own,
> and
> > I'd like to be able to regenerate the context menu right before this is
> > displayed.
> >
> > To do so, I try to connect KStatusNotifierItem's
> > "secondaryActivateRequested" signal to an slot in my dialog, assuming
> that
> > it would get emitted when right-clicking on the tray icon (according to
> > doc), but apparently it never gets fired. =BFIs this really implemented=
, or
> > I'm simply misunderstanding the purpose of this signal?
>
> Reading the code it seems to me it's middle-clicking thaat fires it and n=
ot
> right-clicking.
>
> Cheers,
> Albert
>
> >
> > Anyway, if anyone have any other idea about how I could implement this
> > (updating context menu contents right before it gets displayed), I'd be
> > glad to know it :-)
> >
> > Kind regards,
> > Eduard Huguet
>
>
[Attachment #5 (text/html)]
<div dir="ltr">Hi, <div style>This is also what I discovered later. It seems a bit \
weird to me, as I think it would be more logical to provide a signal when the user \
right clicks on the icon (as it's a fairly common action - who middle-clicks on a \
tray icon, ever, ...?), but well, this is the way it works.</div> <div \
style><br></div><div style>Anyway, I finally found a way to do what I wanted by \
connecting to the "aboutToShow" signal of the QMenu returned by \
contextMenu() call of the KStatusNotifierItem's associated "KMenu" \
object: by doing so, I can update the menu safely right before it's \
displayed.</div> <div style><br></div><div style>As a sidenote, trying the same thing \
directly over KStatusNotifierItem's KMenu object didn't work, and leaded to \
strange dbus-related errors appearing on the console...</div><div style> \
<br></div><div style>Kind regards, </div><div style> Eduard Huguet</div><div \
style><br></div><div style><br></div><div style><br></div><div style><br></div><div \
style><br></div><div style><br></div><div style><br></div><div style> \
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/25 \
Albert Astals Cid <span dir="ltr"><<a href="mailto:aacid@kde.org" \
target="_blank">aacid@kde.org</a>></span><br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> El Dimarts, 25 \
de juny de 2013, a les 10:42:42, Eduard Huguet va escriure:<br> <div class="im">> \
Hi,<br> > I'm trying to add tray icon support for a small application of my \
own, and<br> > I'd like to be able to regenerate the context menu right before \
this is<br> > displayed.<br>
><br>
> To do so, I try to connect KStatusNotifierItem's<br>
> "secondaryActivateRequested" signal to an slot in my dialog, assuming \
that<br> > it would get emitted when right-clicking on the tray icon (according \
to<br> > doc), but apparently it never gets fired. żIs this really implemented, \
or<br> > I'm simply misunderstanding the purpose of this signal?<br>
<br>
</div>Reading the code it seems to me it's middle-clicking thaat fires it and \
not<br> right-clicking.<br>
<br>
Cheers,<br>
Albert<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Anyway, if anyone have any other idea about how I could implement this<br>
> (updating context menu contents right before it gets displayed), I'd be<br>
> glad to know it :-)<br>
><br>
> Kind regards,<br>
> Eduard Huguet<br>
<br>
</div></div></blockquote></div><br></div>
>> 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