Bug 244667 - Python PopupApplet doesn't popup when in a panel
Summary: Python PopupApplet doesn't popup when in a panel
Status: RESOLVED WORKSFORME
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 22:14 UTC by Thomas Tanghus
Modified: 2011-01-21 08:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A minimal test case Plasma Widget (13.96 KB, application/x-plasma)
2010-07-14 22:14 UTC, Thomas Tanghus
Details
A working example of a Python PopupApplet (16.47 KB, application/octet-stream)
2010-10-20 14:47 UTC, Thomas Tanghus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Tanghus 2010-07-14 22:14:14 UTC
Created attachment 49155 [details]
A minimal test case Plasma Widget

Version:           unspecified (using KDE 4.4.4) 
OS:                Linux

I have tried to create a Python based PopupApplet for the last ~6 months to no avail.
I have attached a minimal test case.
When added to the panel it shows up fine with the correct icon. When added to the desktop it also works as supposed and shows the correct QGraphicsWidget.
The peculiar thing is that if I first add it to the desktop and then drag it to the panel it works as expected and the QGraphicsWidget pops up when you click on the icon.
It's like some signal/slot doesn't get connected or whatever.
This is the wish I get the most from the users of my Plasmoids and I have tried everything I can think of to get it to work, I have read the source code for the libraries and for the bindings and I have asked on the kde-bindings and plasma-devel mailing lists.

Reproducible: Always

Steps to Reproduce:
Install the attached plasmoid package. Add the "Python PopupApplet" Widget to the panel. Click on the icon.

Actual Results:  
Nothing happens.

Expected Results:  
The QGraphicsWidget should pop up.

When first added to the desktop and the dragged to the panel it works OK.
Comment 1 Thomas Tanghus 2010-07-14 22:18:19 UTC
BTW: I'm using KDE SC 4.4.5 but it is not selectable in the dropdown list.
Comment 2 Thomas Tanghus 2010-10-20 14:44:40 UTC
After a lot of searching i finally found a working Python Plasmoid.

metadata.desktop needs to have the following line:

ServiceTypes=Plasma/Applet,Plasma/PopupApplet

I'll attach a working (as of KDE SC 4.5.1) example
Comment 3 Thomas Tanghus 2010-10-20 14:47:22 UTC
Created attachment 52700 [details]
A working example of a Python PopupApplet
Comment 4 Nikita Churaev 2011-01-21 08:00:52 UTC
This bug does affect me, on KDE 4.5.5
Comment 5 Nikita Churaev 2011-01-21 08:25:51 UTC
Have to call self.setGraphicsWidget twice to get my applet working.

Overloading function:

def graphicsWidget(self):
    return self._widget

doesn't work at all.
Comment 6 Thomas Tanghus 2011-01-21 08:28:45 UTC
Can you attach a package with your Plasmoid? Then I'll have a look at it.