Commit Graph

197 Commits

Author SHA1 Message Date
Jaime Torres
ab8e956d57 remove a break; after a return
there is no need for a break; after a return (dead code)

REVIEW: 103323
2011-12-04 12:24:35 +01:00
Aaron Seigo
2f5d8e4e7f the graphics widget may not have been into a layout, or may be null
BUG:287548
2011-11-28 09:43:22 +01:00
Aaron Seigo
7ed45afaaf if the graphicswidget isn't on a corona, use the applet's scene 2011-11-22 13:56:35 +01:00
Aaron Seigo
9775682bef use a QWeakPointer with the graphics widget handed in as we don't own it 2011-11-22 13:29:02 +01:00
Aaron Seigo
79ad385f41 give applets with no qwidget or graphicswidget a chance to do something 2011-08-25 17:35:07 +02:00
Aaron Seigo
ee57550909 really don't show when there is no content 2011-08-16 14:57:36 +02:00
Aaron Seigo
78cfff2f3c if there are no widgets, don't create a dialog 2011-08-16 14:57:36 +02:00
Aaron Seigo
858abd8243 allow popups to be freely resized when they aren't the applet 2011-08-08 14:48:57 +02:00
Aaron Seigo
5484609cd3 consolidate creation code; use the layout; don't hide dialog if already hidden
fixes a few annoyances in the system tray
2011-08-03 16:45:29 +02:00
David Palacio
00714cc198 Ensure icon is added to layout.
BUG: 268104
REVIEW: 101148
2011-04-17 16:55:46 -05:00
Albert Astals Cid
dc1c622717 Initialize preShowStatus
acked by Marco
(cherry picked from commit e62e101ee05f630b4b6f6705c756dbb1bbb8a05f)
2011-04-08 17:56:28 +01:00
Marco Martin
30cc539904 don't switch to a popup when we are already in one 2011-02-26 17:34:04 +01:00
ruberg
b23b9664be BUG: 236853
BUG: 233235

Properly restore the size of PopupApplets from last session even when a preferredSize is set in the graphicsWidget()
2011-02-24 18:26:40 +01:00
Aaron Seigo
56c25bd8f2 minor ws anomoly 2011-02-15 09:38:58 -08:00
Aaron Seigo
2b2f482ecd save/track/restore ItemStatus properly 2011-02-04 17:52:03 -08:00
Aaron Seigo
b4b0fc207a toggle on activation 2011-02-04 16:18:28 -08:00
Aaron Seigo
1d473439a5 leave geom updates to applets w/out icons
when an applet sets an empty icon, it's handling the main interface.
PopupApplet emiting geom signals just runs the risk of poorly timed
updates. this causes panel jitter with the system tray when it resizes
2011-02-03 20:38:27 -08:00
Aaron Seigo
74b55d7ca5 set status correctly 2011-01-30 13:34:52 -08:00
Marco Martin
faa7b0abd1 just check for icon existence, no matter if it has a qicon or a svg set
fixes popup/complete switch when the panel gets resized

svn path=/trunk/KDE/kdelibs/; revision=1212674
2011-01-07 22:02:36 +00:00
Marco Martin
698b513868 the dialog private is in its seprarate file ecause it gets accessed by popupapplet to set an applet pointer
in this way we can use the corona to actually find out the real desktop geometry, that doesn't fail for extended monitors like QDesktopWidget does.

BUG:257955

svn path=/trunk/KDE/kdelibs/; revision=1207416
2010-12-17 22:37:09 +00:00
Aaron J. Seigo
8ba74ed014 fix (and comment out for lower debug verbosity) a bit of debug that was accessing a pointer before checking
svn path=/trunk/KDE/kdelibs/; revision=1206552
2010-12-14 22:53:50 +00:00
Aaron J. Seigo
aac15c8e68 the fix for 242173 in r1140471 broke use cases where the applet is activated and then showPopup(someInterval) is called. the showPopup call would get made, and then it would be overridden at the next event loop with a timeout of 0 due to the QTimer::singleShot in appletActivated. this queues _all_ calls to showPopup using a QBasicTimer, which should address the focus issues a bit more comprehensively for 242173 and not break, e.g., the autohide on the device notifier.
BUG:242173

svn path=/trunk/KDE/kdelibs/; revision=1206270
2010-12-14 03:14:14 +00:00
Aaron J. Seigo
91706a22a1 stylistic consistency: "else if" when that's what it is doing
svn path=/trunk/KDE/kdelibs/; revision=1198890
2010-11-20 05:44:47 +00:00
Jacopo De Simoi
691315952e Make sure showPopup(0) actually does what it is supposed to do
BUG: 256124
FIXED-IN:4.5.4

svn path=/trunk/KDE/kdelibs/; revision=1198830
2010-11-19 22:12:52 +00:00
Ivan Čukić
533799963e Added bool PopupApplet::isIconified() const method
See: http://reviewboard.kde.org/r/5666/


svn path=/trunk/KDE/kdelibs/; revision=1187560
2010-10-19 20:02:51 +00:00
Aaron J. Seigo
2f9828b966 allow popup applets to define the alignment of their popup
svn path=/trunk/KDE/kdelibs/; revision=1174612
2010-09-12 23:54:30 +00:00
Aaron J. Seigo
23ebeb3bf6 * appletActions -> addAppletActions
* containmentActions -> addContainmentActions
* make both take an event for positioning purposes
* make prepareContainmentActions a more generic so that one code path for handling setting up a ContainmentActions plugin is used everywhere; this also shrinks addContainmentActions down to just being a permissions checker
* make PopupApplet use ContainmentPrive::addAppletActions directly; fewer code paths to track, as it allows removal of ContainmentPrivate::showApplContextMenu

svn path=/trunk/KDE/kdelibs/; revision=1173567
2010-09-09 18:37:28 +00:00
Marco Martin
12a3da4aa4 if the applet parent of this popupapplet is -not- a containment, always collapse the popup
svn path=/trunk/KDE/kdelibs/; revision=1148414
2010-07-10 15:10:08 +00:00
Marco Martin
4d593f353c delay popup showin in the event queue after activation
fixes focus issues on popups
BUG:242173

svn path=/trunk/KDE/kdelibs/; revision=1140471
2010-06-20 19:45:29 +00:00
Marco Martin
fac1870bc2 is the dialog that we are sure i doesn't exist when the popupapplet is expanded, not the icon.
this unscrews size hints (and therefore unscrews the newspaper containment too)

svn path=/trunk/KDE/kdelibs/; revision=1132102
2010-05-29 18:20:01 +00:00
Aaron J. Seigo
b927523850 should only be for preferred size
svn path=/trunk/KDE/kdelibs/; revision=1130680
2010-05-26 01:15:35 +00:00
Aaron J. Seigo
376b6cbb88 PopupApplet now respects the configured size
svn path=/trunk/KDE/kdelibs/; revision=1130581
2010-05-25 18:21:04 +00:00
Marco Martin
df3259842c fallback here too if the element doesn't exist
svn path=/trunk/KDE/kdelibs/; revision=1129432
2010-05-22 11:40:22 +00:00
Marco Martin
1307855db1 this status hack is not needed anymore
svn path=/trunk/KDE/kdelibs/; revision=1128778
2010-05-20 08:45:05 +00:00
Marco Martin
f46ac96bb1 set the accepting input status only if it's unknown
svn path=/trunk/KDE/kdelibs/; revision=1126385
2010-05-13 21:28:55 +00:00
Marco Martin
e1c03d3ef8 by default, set expanded popupapplets to accept input, this covers most of the "panel must have focus" needs
BUG:177674

svn path=/trunk/KDE/kdelibs/; revision=1126373
2010-05-13 21:10:59 +00:00
Aaron J. Seigo
0b5d39a0db tidy-ups
svn path=/trunk/KDE/kdelibs/; revision=1124323
2010-05-08 20:47:42 +00:00
Aaron J. Seigo
3c80abf735 check to see which applet is under the event, defaulting to the host applet.
CCBUG:235252

svn path=/trunk/KDE/kdelibs/; revision=1124305
2010-05-08 19:10:07 +00:00
Marco Martin
d54fd38d3b hardcoded setMinimumSize is evil, evil, evil
now the actual sizehints are used, since qgraphicslayouts got slightly better we have more up to date hints

svn path=/trunk/KDE/kdelibs/; revision=1117260
2010-04-21 17:47:38 +00:00
Marco Martin
b6f75d6e46 if an svg is set for the icon switch to the full view on the desktop as well
svn path=/trunk/KDE/kdelibs/; revision=1115279
2010-04-15 20:30:14 +00:00
Marco Martin
fbe946ca4c don't toggle the popup on activate, but actually show it
also set the state on needsattention.

if the view of the applet is not the same for its containment, call popupposition with the parent of the applet rather than the applet itself.
this fixes the popup appearing at funny places for applets in systemtray, like devicenotifier

svn path=/trunk/KDE/kdelibs/; revision=1115260
2010-04-15 19:25:30 +00:00
Marco Martin
ec3d3774bc try to load a monocrome icon as popupicon, fallback to KIcon
svn path=/trunk/KDE/kdelibs/; revision=1115209
2010-04-15 16:14:37 +00:00
Aaron J. Seigo
434be1bfca save dialog sizes "immediately"
svn path=/trunk/KDE/kdelibs/; revision=1111109
2010-04-04 21:08:54 +00:00
Aaron J. Seigo
8b23c1a4ab only do the resizing when we actually need to
svn path=/trunk/KDE/kdelibs/; revision=1110789
2010-04-04 01:55:56 +00:00
Marco Martin
60d5462c3f don't hide the popup if it lost focus but ithe icon is pressed.
not too pretty solution to
BUG:230157

svn path=/trunk/KDE/kdelibs/; revision=1101663
2010-03-10 14:20:20 +00:00
Aaron J. Seigo
bb75767105 don't remove an item that isn't in the layout
svn path=/trunk/KDE/kdelibs/; revision=1100924
2010-03-09 00:12:31 +00:00
Aaron J. Seigo
b640c67b67 pass on popupEvent signals to the scriptengine
svn path=/trunk/KDE/kdelibs/; revision=1097159
2010-02-28 15:10:30 +00:00
Aaron J. Seigo
b335bdb1b6 we should only muck with the minimum sizes of the popup applet when iconified if it is actually using an icon; otherwise we leave it up to the applet itself to do this properly as it normally would have to
BUG:226391

svn path=/trunk/KDE/kdelibs/; revision=1088928
2010-02-11 22:52:16 +00:00
Aaron J. Seigo
45280bdda6 toggle the popup when activated
BUG:222418

svn path=/trunk/KDE/kdelibs/; revision=1073718
2010-01-12 18:35:03 +00:00
Aaron J. Seigo
9685752853 debug no longer needed, problem solved.
svn path=/trunk/KDE/kdelibs/; revision=1071845
2010-01-08 22:12:35 +00:00