Commit Graph

88 Commits

Author SHA1 Message Date
Aaron J. Seigo
309272b6f9 don't repaint the entire widget when we're setting the same content
CCBUG:204491

svn path=/trunk/KDE/kdelibs/; revision=1018140
2009-09-01 11:00:10 +00:00
Aaron J. Seigo
0caae66c3a be more careful with setWidget
svn path=/trunk/KDE/kdelibs/; revision=1002129
2009-07-25 04:53:35 +00:00
Laurent Montel
b329238653 Fix "‘collapsedGroup’ may be used uninitialized in this function"
svn path=/trunk/KDE/kdelibs/; revision=966207
2009-05-10 16:12:20 +00:00
Rob Scheepmaker
af3c1f881d Set margins for spacer and empty extender label based on the extender-background margins, and also consider the extender empty if there are only empty groups in it.
BUG: 189451


svn path=/trunk/KDE/kdelibs/; revision=961366
2009-04-30 00:34:49 +00:00
Rob Scheepmaker
eb07a4988d Also move child items on a return to source, and store group's collapsed state.
svn path=/trunk/KDE/kdelibs/; revision=959734
2009-04-26 23:49:22 +00:00
Rob Scheepmaker
a5c48ddc4f Move children together with their group when the group gets moved, and add a group convenience function to extender to avoid needing all those casts from extenderitem to extendergroup. Plus some minor code cleanups.
svn path=/trunk/KDE/kdelibs/; revision=959604
2009-04-26 17:03:15 +00:00
Rob Scheepmaker
fac4e005d0 Replace the "i" icon for showing/hiding jobs and notifications in the systray with a spinner widget. When jobs are running it is animated. It also shows one or two numbers in front of the widget to indicate the amount of completed, and the total amount of items. (only one number if all items are completed)
Apparently I also had something else uncomitted: showing an eta in the applicationjobs dataengine, and no using double margins in extenderitems.


svn path=/trunk/KDE/kdelibs/; revision=954560
2009-04-15 22:21:29 +00:00
Rob Scheepmaker
b22ec1abf8 Use opaque extender background while dragging.
svn path=/trunk/KDE/kdelibs/; revision=951207
2009-04-08 17:25:50 +00:00
Rob Scheepmaker
37c0a4a725 More sensible behavior when detaching an ExtenderGroup: no autohide of the group, and treating new items in the source applets extender as if the group were expanded.
svn path=/trunk/KDE/kdelibs/; revision=949228
2009-04-04 16:42:59 +00:00
Aaron J. Seigo
d0e40170fa if the drag left our application (and so target() is null), treat it as if the drag was rejected. this works around braindamaged apps like firefox who accept anything dropped on them regardless of mimetype and then mark it as a move!
svn path=/trunk/KDE/kdelibs/; revision=947546
2009-03-31 18:45:30 +00:00
Rob Scheepmaker
0bfbed06ae Move ExtenderGroupPrivate to a seperate header file, so we can call addItemToGroup in setGroup.
svn path=/trunk/KDE/kdelibs/; revision=944336
2009-03-25 13:03:04 +00:00
Rob Scheepmaker
c47d34bcba Yay! Add support for grouping in extenders. Expect this feature used for grouping jobs in systemtray soon: I'll commit that as soon as I figured out the last problem that patch has (an atm seemingly random crash that happens incidentally).
svn path=/trunk/KDE/kdelibs/; revision=943303
2009-03-23 16:30:32 +00:00
Rob Scheepmaker
766bca2524 Addition of the hasItem(...) function to Extender. And usage of this function in libplasmaclock. This function allows for checking if items exist, even if that item hasn't been instantiated yet.
svn path=/trunk/KDE/kdelibs/; revision=938688
2009-03-12 17:19:45 +00:00
Rob Scheepmaker
e1730c4704 Move the showing of the dropzone from panelview to containment. Leads to less code duplication and makes showing dropzones when dragging extenderitems to the panel work. Also don't hide the extenderapplet and panel when detaching the last item from an extenderapplet, and move extenderitems off screen before creating the pixmap to avoid other items appearing in the pixmap.
svn path=/trunk/KDE/kdelibs/; revision=938242
2009-03-11 14:41:37 +00:00
Artur Duque de Souza
cae61ee4ca Use enums from KIconLoader
Instead of using hardcore numbers, it would be great to use the enums provided by 
KIconLoader whenever we use sizes for icons.

Made the change for the obvious ones replacing "16" by KIconLoader::SizeSmall, 
"22" by KIconLoader::SizeSmallMedium and "32" by KIconLoader::SizeMedium.

svn path=/trunk/KDE/kdelibs/; revision=926544
2009-02-15 16:35:52 +00:00
Rob Scheepmaker
6ce839cc08 1 regression down! Reenabling and changing one of the layout workarounds fixes the incorrect sizehints problem for detached extenderitems, while still allowing
for items on the desktop to be resized, which is even beter then it was in 4.2. I might backport depending on how good this works with Qt4.4 and depending on 
how complex the patch would become (it would need a few of the changes from my previous monsterpatch).


svn path=/trunk/KDE/kdelibs/; revision=923944
2009-02-09 19:21:59 +00:00
Rob Scheepmaker
fe805eb338 Massive refactoring of extender drag&drop handling. This should avoid bugs with the old way of doing things (toplevel view on an offscreen widget can lose
mouse events while dragging), and is generally shorter and cleaner. There are still some regressions I'll be working on fixing, but it basically works, avoids 
crashes and is even faster.


svn path=/trunk/KDE/kdelibs/; revision=923915
2009-02-09 18:10:45 +00:00
Rob Scheepmaker
4278e03a25 Two fixes:
* Monitor for sizechanges of the widgets contained inside an ExtenderItem, so the ExtenderItem 
size get's adjusted when the widget size is.
* Check the desired icon size only after themeUpdated is called, with the svg on it's native 
size. Avoids the problem of an occasion giant titlebar.

I will backport both when I've had the time to test with Qt4.4


svn path=/trunk/KDE/kdelibs/; revision=922762
2009-02-07 15:08:17 +00:00
Rob Scheepmaker
1eb7e181bc Qt4.5 hit qt-copy, and layouts behave properly now! Let's remove the layout bug workaround
hacks from extenders. This improves behavior a lot. :)


svn path=/trunk/KDE/kdelibs/; revision=922575
2009-02-07 09:52:49 +00:00
Sebastian Kügler
42d63443ab Make sure the source applet still exists
Will backport to the 4.2 branch

svn path=/trunk/KDE/kdelibs/; revision=919944
2009-02-01 21:56:19 +00:00
Olivier Goffart
7bd898f55e Fix crash at plasma startup.
The toolbox has to be initialized before any call to setCollapsed. (because the resize event uses it)


svn path=/trunk/KDE/kdelibs/; revision=913616
2009-01-19 16:03:20 +00:00
Rob Scheepmaker
bfb771ddd8 Make all items persistent by default, even if still attached. This allows us to restore their position and their collapsed state.
svn path=/trunk/KDE/kdelibs/; revision=912127
2009-01-16 18:49:54 +00:00
Aaron J. Seigo
4e7e534103 * add actions in the order they are added, not alphabetically by name (?!)
* remove actions if they get deleted
CCBUG:30042

svn path=/trunk/KDE/kdelibs/; revision=907996
2009-01-09 02:15:23 +00:00
Stephan Kulow
744f3ef721 avoid tons of warnings for empty sizes
svn path=/trunk/KDE/kdelibs/; revision=907537
2009-01-08 11:28:58 +00:00
Marco Martin
dc76999e7e kill that ugly white border when dragging the extender and compositing
is active (need a custom view for that, sigh)

svn path=/trunk/KDE/kdelibs/; revision=901786
2008-12-26 16:41:53 +00:00
Marco Martin
3ada99112f resize the extender applet to a sane size when created
svn path=/trunk/KDE/kdelibs/; revision=899905
2008-12-21 20:28:17 +00:00
Urs Wolfer
f320d2e700 * typos--
* optimize QString operations
* fix include guard

svn path=/trunk/KDE/kdelibs/; revision=899600
2008-12-21 11:56:01 +00:00
Rob Scheepmaker
71d6e19ae8 Don't allow extenderitems to be dragged when plasma is locked.
svn path=/trunk/KDE/kdelibs/; revision=897287
2008-12-15 16:50:47 +00:00
Aaron J. Seigo
87fb3dfabe smarter use of QMap
svn path=/trunk/KDE/kdelibs/; revision=895574
2008-12-11 02:55:28 +00:00
Rob Scheepmaker
c51d9d7d9b Yeah, finally! Fixed a crash that occurs when moving an extenderitem back to its source from an extender that was also the last one to have a spacer inserted because the same item was hovering over it. Phew, that was a mouthfull... With this fix we monitor if previousTargetExtender get's destoryed so we don't accidently try to remove it's spacer.
BUG: 171498


svn path=/trunk/KDE/kdelibs/; revision=895405
2008-12-10 17:29:40 +00:00
Rob Scheepmaker
7ae063b1ec Don't crash on use when detaching extenderitems while having widgets locked. Instead just move the item back where it came from.
svn path=/trunk/KDE/kdelibs/; revision=895345
2008-12-10 13:51:26 +00:00
Rob Scheepmaker
72eaf8c5f7 No longer use a QGraphicsGridLayout to manage offscreen widgets in corona. Instead position them manually and give each one a spot where they can grow up to QWIDGETSIZEMAX. This has the advantage of not requiring hacks to work around QGL problems, and it avoids having to move all views when one item resizes. It feels snappier and the code looks cleaner.
svn path=/trunk/KDE/kdelibs/; revision=895118
2008-12-10 00:57:42 +00:00
Rob Scheepmaker
b321b2f033 Performance optimization: only change the icon if it's actually a different icon. Mainly affects uiserver widgets atm.
Oh, and warning--.


svn path=/trunk/KDE/kdelibs/; revision=894878
2008-12-09 14:04:33 +00:00
Rob Scheepmaker
9116edc392 Use iconSize() function now that that function exists. This avoids having the margins in the dragger 2 pixels smaller then specified.
svn path=/trunk/KDE/kdelibs/; revision=894041
2008-12-07 18:28:26 +00:00
Rob Scheepmaker
e1bb614999 Fixed crash when clicking an extenders dragger without actually dragging, and fixed the 'hand problem'.
svn path=/trunk/KDE/kdelibs/; revision=890806
2008-11-30 11:45:23 +00:00
Rob Scheepmaker
2d4971eb46 Extender Polishing time! The following problems have been adressed:
* Far more correct spacer implementation. This avoids the spacer jumping around while dragging an item. Also adjustSizeHints is now only called once/spacer move.
* Avoid spacer related memleak.
* Only load extenderItems that are actually detached. This way, attached items won't linger around in case of a plasma crash.
* Use utilities-desktop-extra as icon for items with no saved icon (e.g. items where the icon is set using setIcon(QIcon) instead of setIcon(QString)). Sure beats the questionmark.
* Update mask when offscreen extender items are resized when being dragged to avoid screwed up masks (white borders).
* Start the drag only aften being moved a minimum of QApplication::startDragDistance().
* Correct transformation for calls to showDropZone.
* Use the mouse position for positioning items in extenders or panels, the topleft corner for positioning in a desktop containment. This feels the most natural.
* Move items back to the extender they came from when they're dropped into nowhere.
* Some small code style fixes.



svn path=/trunk/KDE/kdelibs/; revision=890249
2008-11-28 17:06:00 +00:00
Rob Scheepmaker
926dae37a7 Also hide dialogs of applets on the desktop.
Use topleft of extenderitem to check if we're over a containment, since that point is also used when instantiating an extenderapplet, and otherwise the dropzone could be at a different position then the actual applet being created.


svn path=/trunk/KDE/kdelibs/; revision=888951
2008-11-25 15:26:13 +00:00
Rob Scheepmaker
e7e26f82e7 To be consistent with ordinary applets, we need some visual feedback when hovering over containments with extenderitems, so call showDropZone...
svn path=/trunk/KDE/kdelibs/; revision=887683
2008-11-22 15:16:46 +00:00
Aaron J. Seigo
ac412d787b delete the widget first so that it gets a chance to clean up with the extenderitem it is in still around
svn path=/trunk/KDE/kdelibs/; revision=886236
2008-11-18 21:22:55 +00:00
Rob Scheepmaker
cfb43a7632 Correct sizehints for extender containing applets on the desktop. Also renamed the private adjustSize() function to adjustSizeHints() to avoid confusion.
svn path=/trunk/KDE/kdelibs/; revision=882356
2008-11-10 15:49:31 +00:00
Aaron J. Seigo
4b08c03726 change KDE includes to use the .h style now that we're in libs
svn path=/trunk/KDE/kdelibs/; revision=879795
2008-11-04 02:04:34 +00:00
Aaron J. Seigo
1b523b9054 ok, this time JUST the plasma dir ;)
svn path=/trunk/KDE/kdelibs/; revision=879759
2008-11-03 23:08:39 +00:00
Aaron J. Seigo
fa5a2d87d9 bum-de-dum! plasma to kdelibs.
svn path=/trunk/KDE/kdelibs/; revision=879757
2008-11-03 23:03:26 +00:00
Rob Scheepmaker
babf165d5d A last couple of api changes before the move to kdelibs:
* in class Extender rename setExtenderAppearance to setAppearance.
* in class ExtenderItem rename moveBackToSource to returnToSource.
* in class ExtenderItem addition of showCloseAction() and hideCloseAction().
... and some minor tweaks in the implementation.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=879670
2008-11-03 19:49:14 +00:00
Kevin Ottens
f66b4d819b API changes as announced:
* ConfigXml becomes ConfigLoader
  * Containment::(add|remove)ToolBoxTool(QAction *action) becomes
    Containment::(add|remove)ToolBoxAction(QAction *action)
  * Flash becomes FlashingLabel
  * Icon becomes IconWidget
  * PanelSvg becomes FrameSvg

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877504
2008-10-29 17:46:33 +00:00
Rob Scheepmaker
871508e467 Store the title and icon in extenderitem's config so applets don't have to store/restore this info manually.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=877485
2008-10-29 17:01:11 +00:00
Rob Scheepmaker
a00b42cf69 Correct placement when detaching extenderItems.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=876615
2008-10-27 17:16:41 +00:00
Rob Scheepmaker
08b16a80dc Fixed extender appearence in dialogs of applets on the desktop.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875773
2008-10-25 14:49:31 +00:00
Rob Scheepmaker
d09ca6858f Also automatically hide dialogs from popupapplets if the last extender item is destroyed.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875760
2008-10-25 14:17:17 +00:00
Rob Scheepmaker
704fad3d81 Small extender api improvements:
* extender() -> protected
* initExtenderItem() no longer a slot
* autoExpireDelay return uint instead of bool


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=875751
2008-10-25 13:41:00 +00:00