Commit Graph

356 Commits

Author SHA1 Message Date
Aaron J. Seigo
0e5f15dc50 * add Corona::addContainmentDelayed for more control on the Corona subclass side during default layout loading
* accept bad config objectsin Applet::save and Containment::save
* move some initialization code around to be more robust with external use (will make more sense in next commit to workspace/plasma/plasma)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828940
2008-07-07 02:16:08 +00:00
Aaron J. Seigo
9ccc9336a5 * prevent removing active containments (brute force mechanism: just ignore the request totally)
* select the correct containment for removal when zoomed out (will have isses on multi-screen; see FIXME)
* move containment destruction logic out of Corona; it really doesn't belong there
* remove the hack to not set focus on a containment when clicked as that doesn't seem to reliably trigger it for me here and it doesn't address the issue of a new containment still messing things up, so we really ought to have a generic solution instead of a slightly ugly hack

BUG:id=165670

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828906
2008-07-06 22:43:53 +00:00
Aaron J. Seigo
762be363ec rework the toolbox creation, containment type setting and isContainment setting code to make it resilient against when and where those properties are set
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828636
2008-07-06 10:03:10 +00:00
Aaron J. Seigo
a404763830 don't check the view for regular applets; the problem only affect containments
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828205
2008-07-04 21:48:25 +00:00
Marco Martin
f203f0ffff don't setFocus on applets or containments when the view is zoomed out,
that would drive to an automatic scrolling of the view when clicking on
it, hiding other containments

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=828193
2008-07-04 21:13:48 +00:00
Aaron J. Seigo
92ee66d578 be extra sure that the applet has an entry in the config on being added so when we config sync we're guaranteed they are in there
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=827479
2008-07-03 05:46:25 +00:00
Marijn Kruisselbrink
21b148b963 change all ClassName::Private classes to ClassNamePrivate, and adjust friends accordingly; this makes plasma compilable with gcc < 4.2
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826893
2008-07-01 18:56:43 +00:00
Marco Martin
878966df21 immutability() doesn't always return d->immutability()
it cause the clock to be moved also in locked mode


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826501
2008-06-30 21:05:16 +00:00
Aaron J. Seigo
07613b5b41 SVN_SILENT: ssh.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=826347
2008-06-30 14:39:25 +00:00
Aaron J. Seigo
350bb8c48e AppletScript::shape()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=824153
2008-06-25 00:33:46 +00:00
Aaron J. Seigo
2fc9fca715 make setConfigurationRequired match setFailedToLaunch by adding a reason string. this allows more than just a mysterious "Configure" button. thanks to Chani for spotting the API irregularity.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823770
2008-06-24 03:17:38 +00:00
Marco Martin
f359a0f551 removes the modifications of the maximum and minimum size hints made in
flushPendingConstraintsEvents, now it changes only the sizepolicy
and the enforcing is done by returning the proper values in sizeHint.
ConstrainedSquare behaves like square with sizes less than
Liconloader::sizeLarge, otherwise the size is not much controllable and
would be hard to have the right (not blurry) icon sizes when the panel
is not so big

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823640
2008-06-23 18:49:10 +00:00
Richard Dale
eb2b4126ae * Fix typo in warning message, and make the english scan a bit better
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=823161
2008-06-22 17:29:59 +00:00
Marijn Kruisselbrink
b10a0bcbe3 fix qMax calls on platforms where qreal is not double
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=821243
2008-06-16 22:20:49 +00:00
Aaron J. Seigo
659844e273 use the caching (!), don't crash if we get a 0 widget parameter
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=821186
2008-06-16 19:10:38 +00:00
Marco Martin
b5855d7b20 set a minimum size of 0,0 when an applet is moved in the panel, it still
can happen that it exits from top of the screen but at least it won't
totally destroy the panel layout anymore

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820917
2008-06-15 19:10:50 +00:00
Davide Bettio
d489ddc1ea BUGFIX: Applet::setConfigurationRequired(bool needsConfig) now destroys also the button when needsConfig is false.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=820338
2008-06-13 22:12:23 +00:00
Aaron J. Seigo
681ddb5cdc prepare ourselves for upstream fixes ;-P
CCBUG:163459

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818610
2008-06-09 00:03:25 +00:00
Jason Stubbs
21367769e7 Fix systray icon positioning on initial layouts and take svg margins
into account. When the size is too small to allow the svg and a single
icon, disable the svg.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=818155
2008-06-07 22:51:51 +00:00
Aaron J. Seigo
d222baf2f2 emit geom changed signal on size changes as well as a SizeConstraint. one should one or the other but not both, i suppose.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=817989
2008-06-07 10:52:34 +00:00
Aaron J. Seigo
f1ce0ee124 safety in removing panels, aka "work around the inane requirement to first remove items from the scene before deleting them if they are a QGraphicsWidget and have a layout"
BUG:163205

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816760
2008-06-04 19:04:34 +00:00
Marco Martin
1cb044332c new aspect ratio mode ConstrainedSquare
it makes applets in panel to not
be wider than tall in horizontal panels and not taller than wider in
vertical panels, but can be for instance less wide than tall in
horizontal panels, as opposed to square applets.
it makes poossible to have icons with a reasonable size in very big
panels as vertical panels usually are for instance

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816757
2008-06-04 18:58:38 +00:00
Aaron J. Seigo
3d45aae7fb more code clean ups
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816745
2008-06-04 18:20:58 +00:00
Marco Martin
5ddceb467b add Theme::currentThemeHasImage() that checks if the current theme has a
certain svg or if it would fallback to the default theme if loaded.
this makes possible an alternative fallback mechanism between images of
the same theme, used now for the TransparentBackground background hint

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=816734
2008-06-04 17:44:37 +00:00
Chani Armitage
8e9bd0ff09 revert my last commit; this does work after all, sorry.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815996
2008-06-03 00:24:51 +00:00
Marco Martin
dedc5eac8f deactivate translucent background when the containment becomes the
panel, prevents weird margins

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815657
2008-06-02 13:27:20 +00:00
Chani Armitage
62a32a22a7 don't try to associate with widgets.
it's not needed for global shortcuts, and it wouldn't work that way for local shortcuts anyways.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815532
2008-06-02 05:43:05 +00:00
Aaron J. Seigo
b228fb7c49 save shortcut settings
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815055
2008-06-01 03:03:43 +00:00
Aaron J. Seigo
4878d04cc3 allow setting and getting of global shortcuts
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815050
2008-06-01 02:53:50 +00:00
Aaron J. Seigo
40e4b3e88e * global keyboard shortcuts for applets
* move the contents of setGeometry to itemChange and resizeEvent for greater reliability

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815043
2008-06-01 02:13:53 +00:00
Albert Astals Cid
cc3f0c3a90 Don't show Apply button as it doesn't work correctly, acked by Aaron
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=815001
2008-05-31 21:26:49 +00:00
Aaron J. Seigo
6e71a7adc3 use Plasma::PushButton
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=814353
2008-05-30 06:16:37 +00:00
Aaron J. Seigo
1d5979e532 check that we have children; prevents crash. will continue polishing from the fairgrounds later today.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=814045
2008-05-29 08:49:40 +00:00
Marco Martin
5f3a757bae new BackgroundHint:
TranslucentBackground, now used by folder view.
when an applet has TranslucentBackground set, it loads
"widgets/tranlucentbackground" as its own background
when that svg does not exists in theh them it falls back to
"widgets/background" instead of translucentbackground of the default
theme

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=813283
2008-05-27 10:57:09 +00:00
Marco Martin
83a5c1ee6f corrected a bug that led to 100% cpu usage in some cases (endless
resizing loop) had to use maximum and minimum sizes, layouts seems to be
sooo stoopid :(

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=813266
2008-05-27 10:04:52 +00:00
Aaron J. Seigo
05d6ec6401 remove the args Applet injects to hide that impl detail from subclasses
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812568
2008-05-25 18:38:07 +00:00
Jason Stubbs
f478ae1ca4 geometry() isn't up to date at the time that an ItemPositionHasChanged
notification is received, so don't use it in calculating the correct
position. Also some other small WoC cleanups.

BUG: 161969

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812493
2008-05-25 15:40:29 +00:00
Marco Martin
8c285fdee5 don't allow to drag applets registered as drag handle when the
containment is locked
BUG: 162584

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812459
2008-05-25 14:10:47 +00:00
Kevin Ottens
8edc0b399f Remove the "ghost view" from public API. It's completely internal and
used nowhere.

"ervin, fighting feature creep in APIs since 1980."

(BTW, at this rate I'm less and less convinced that it'd be wise to not
have a second round of API review post 4.1)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812172
2008-05-24 18:33:40 +00:00
Marco Martin
fb80af2962 update applet margins when the theme changes
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=812116
2008-05-24 15:58:40 +00:00
Aaron J. Seigo
bea0906806 finish yet another 4.1 feature gap: allow the user to select what to do on drop. the text is a bit lame for icon, it should be "link to file" or something similar but that string doesn't seem to be handy and we're in a string freeze =/ at least it works =)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811949
2008-05-24 07:47:20 +00:00
Rob Scheepmaker
e9989989c5 Check if containment() actually returns a containment, and if view() actually returns a
view. Should fix a crash reported by chani.


svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811785
2008-05-23 17:21:14 +00:00
Thiago Macieira
f6e555fdbc Initialise variable.
Valgrind rationale:
==18955== Conditional jump or move depends on uninitialised value(s)
==18955==    at 0x40E2295: Plasma::Applet::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) (applet.cpp:765)
==18955==    by 0x65259FF: _ZL12_q_paintItemP13QGraphicsItemP8QPainterPK24QStyleOptionGraphicsItemP7QWidgetb (qgraphicsscene.cpp:3766)
==18955==    by 0x6525AE3: QGraphicsScenePrivate::drawItemHelper(QGraphicsItem*, QPainter*, QStyleOptionGraphicsItem const*, QWidget*) (qgraphicsscene.cpp:3790)
==18955==    by 0x652B61E: QGraphicsScene::drawItems(QPainter*, int, QGraphicsItem**, QStyleOptionGraphicsItem const*, QWidget*) (qgraphicsscene.cpp:4015)
==18955==    by 0x6541637: QGraphicsView::drawItems(QPainter*, int, QGraphicsItem**, QStyleOptionGraphicsItem const*) (qgraphicsview.cpp:3294)
==18955==    by 0x6546C08: QGraphicsView::paintEvent(QPaintEvent*) (qgraphicsview.cpp:3042)
==18955==    by 0x5EDD149: QWidget::event(QEvent*) (qwidget.cpp:7082)
==18955==    by 0x62D12B1: QFrame::event(QEvent*) (qframe.cpp:627)
==18955==    by 0x63804C8: QAbstractScrollArea::viewportEvent(QEvent*) (qabstractscrollarea.cpp:914)
==18955==    by 0x6544410: QGraphicsView::viewportEvent(QEvent*) (qgraphicsview.cpp:2299)
==18955==    by 0x6383611: QAbstractScrollAreaPrivate::viewportEvent(QEvent*) (qabstractscrollarea_p.h:72)
==18955==    by 0x638363F: QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) (qabstractscrollarea_p.h:83)

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811619
2008-05-23 14:41:55 +00:00
Aaron J. Seigo
1ff027988b be more lenient with the requirement for a service
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811335
2008-05-22 18:43:34 +00:00
Aaron J. Seigo
26f7e83a53 give proper control over saving/restoring to the containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811211
2008-05-22 15:53:48 +00:00
Marco Martin
73c4847a75 remove an unused variable
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=811184
2008-05-22 14:34:30 +00:00
Chani Armitage
30dd547919 SVN_SILENT: really minor style cleanup.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810602
2008-05-21 04:37:10 +00:00
Chani Armitage
ccde7ded20 replace Panel::remove() with Containment::destroy()
now I can remove some of the ten desktop containments I accumulated :)
oh, and the code is cleaner too, yay!

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=810129
2008-05-20 04:02:36 +00:00
Marco Martin
812d870086 enforce square aspect ratio when aspectRatioMode() is square of applets
in the panel

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809947
2008-05-19 19:34:13 +00:00
Alexis Ménard
5f6b242127 This magic line seems to fix our crash with embeeded widget
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=809939
2008-05-19 19:19:47 +00:00