Commit Graph

3224 Commits

Author SHA1 Message Date
andreas kainz
1c1c52f425 Merge branch 'master' of git://anongit.kde.org/plasma-framework 2016-05-12 01:40:06 +02:00
andreas kainz
7379b9b830 align air icons and add new ones from oxygen-icons 2016-05-12 01:39:25 +02:00
Kai Uwe Broulik
e159643ec4 [DialogShadows] Cache access to QX11Info::display()
It's called several times and even in a loop.

REVIEW: 127893
2016-05-11 19:58:55 +02:00
Marco Martin
e8c5ee60a8 restore air plasma theme icons from KDE4
VDG will do some work on top of it
2016-05-11 11:44:53 +02:00
Kai Uwe Broulik
f78685389a [QuickTheme] Fix properties
Some properties were duplicated (yay moc for not shouting at us), some were
accessing the wrong getter and some were missing.

REVIEW: 127889
2016-05-10 19:16:28 +02:00
Marco Martin
2b7543c343 reload selected color scheme on colors changed 2016-05-10 17:18:48 +02:00
Marco Martin
f0c119696d highlight/highlightedText from proper color group
lately the highlight color of plasma became a very
washed-out blue, (since it switched to use the
global system colors) that was because it actually
taken the highlight color (and highlightedText)
from the wrong source.
there is a correct color group in kcolorscheme for
that, that is Selection, take those two colors
from that (also means highlight and highlightedtext
always be the same in all plasma::theme::colorgroups
but that's not a problem)

update test to reflect that

REVIEW:127842
2016-05-05 12:22:44 +02:00
David Rosca
f336f80039 ConfigModel: Don't try to resolve empty source path from package
ConfigModel may contain ConfigCategory for both QML pages and KCM pages.
The source property will be empty for KCM pages.  This fixes correctly
returning empty source for KCM pages.
Also return the same value from get().

REVIEW: 127702
2016-05-04 17:34:02 +02:00
Martin Klapetek
18af870303 [calendar] Only show the events mark on days grid, not month or year 2016-05-02 19:51:20 -04:00
Allen Winter
f1844014dd declarativeimports/core/windowthumbnail.h - fix -Wreorder warning 2016-05-01 16:02:46 -04:00
l10n daemon script
e2edaa2c1a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-25 10:23:50 +00:00
Wolfgang Bauer
d884119f5a Always write the theme name to plasmarc, also if the default theme is chosen
Currently, the "name" key is deleted from plasmarc when you select the
default theme (breeze) in the desktop theme KCM.
This leads to unexpected behaviour: If you set e.g. oxygen as look&feel,
and then set breeze as desktop theme, Plasma actually uses Air (the
default desktop theme in the oxygen l&f) on next login instead of
breeze. In other words, it is impossible to configure breeze as desktop
theme when using a different look&feel as breeze.

This fixes the problem by removing the check whether the default theme
is selected and always writes the "name" config key to plasmarc.

REVIEW: 127698
2016-04-22 19:23:35 +02:00
Martin Klapetek
08312b2e34 [calendar] Add a mark to days containing an event
REVIEW: 127586
2016-04-20 23:41:23 -04:00
Marco Martin
1cf145861b add Positive, Neutral, Negative text colors
add named colors for positive (usually green)
neutral(usually yellow) negative(usually red)
foreground objects, such as text or parts of
svg icons/themes

REVIEW:127696
Change-Id: I646306339f1684cdc062da3d3af1489af6092372
2016-04-20 18:25:50 +02:00
l10n daemon script
9f1b9e7af5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-04-19 10:54:27 +00:00
David Rosca
7944fc1d6f ScrollArea: Fix warning when contentItem is not Flickable
REVIEW: 127652
2016-04-15 10:08:43 +02:00
Eike Hein
9bd7e4ce5f Add a prop and method for aligning the menu against a corner of its visual parent.
REVIEW:127646
2016-04-14 22:10:24 +09:00
Eike Hein
17cea8059e Allow setting minimum width on Menu.
REVIEW:127648
2016-04-14 04:21:41 +09:00
Eike Hein
ec16c57e3c Maintain order in stored item list.
Reviewed-by: notmart@gmail.com
2016-04-14 01:38:12 +09:00
Eike Hein
70301e21b9 Extend API to allow (re)positioning menu items during procedural insert.
REVIEW:127645
2016-04-14 01:17:37 +09:00
Marco Martin
553a9bfe53 bind highlightedText color in Plasma::Theme
we have a color in the Plasma theme "highlight" that is basically
an accent color used around.. but one of the uses is to use it as
a background, such as highlighted text. in that case we don't know
what color would be safe for contrasting on top of it for things
like the highlighted text color (plasma style used the background
color for that, which is incorrect)

REVIEW:127637
2016-04-13 12:28:53 +02:00
Friedrich W. H. Kossebau
9f48b41507 Fix unsetting associated application/urls for Plasma::Applets
Summary:
Avoids a crash and a bogus menu entry.

Current code does not properly handle any resetting, which results
in Applet::hasValidAssociatedApplication() still returning true
when urls have been set to an empty list and the application name
to an empty string.
Also are connections to the "destroyed" signal collected on
repeated set calls.
This patch fixes that.

This fixes "Run the Associated Application" menu entry showing up with widgets.

It also prevents the crash in associatedapplicationmanager.cpp:76, which assumes
url lists to be non-empty:
const QString mimeType = mimeDb.mimeTypeForUrl(i.value().first()).name();

Not happy yet with the signal/slot connection management,
improvement proposals welcome.

Reviewers: mart

Reviewed By: mart

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1372
2016-04-12 01:09:44 +02:00
Friedrich W. H. Kossebau
d2fdde4002 Don't expose symbols of private class DataEngineManager
Internal class since first release of plasma-frameworks
2016-04-11 14:19:57 +02:00
Marco Martin
1eff0dea81 add an "event" element in the calendar svg
the calendar svg wasn't used anymore in Plasma 5
restore it for markers for events
2016-04-07 20:15:47 +02:00
David Rosca
b3076a410c SortFilterModel: Invalidate filter when changing filter callback
Model is now correctly filtered when setting filter callback.

REVIEW: 127588
2016-04-06 11:02:51 +02:00
Martin Gräßlin
035e061e13 Add nullptr-check for iconTheme
KIconLoader::global()->theme() might return null. Thus we need to
guard for this case (happens e.g. on build.kde.org).

This results in iconThemeMetadataPath not being set, which is fine
as that condition is handled later on.

CCMAIL: notmart@gmail.com
Reviewed-By: Bhushan Shah
2016-04-05 10:06:27 +02:00
Ivan Čukić
8d3ec9589c Properly guarding against a null applet
- The code used applet and d->applet which pointed to the same thing
- Some places checked dereferening of applet, while the last one did not
2016-04-05 09:49:56 +02:00
Ivan Čukić
cdeb168c53 Fixed the logic problem of testing whether the job was valid 2016-04-05 09:33:52 +02:00
Marco Martin
944c7e60dc cache svg icons from icon theme
cache as well svg icons from the icon theme
(invalidating as well when the icon theme is updated)

REVIEW:127260
2016-04-04 17:47:30 +02:00
David Edmundson
ca98250d0c add missing const on private member
REVIEW: 127549
2016-04-03 23:01:23 +01:00
Martin Klapetek
cff18c2cd2 [calendar] Fix calendar applet not clearing selection when hiding
This removes some old cruft that is not really used and serves
basically only as a bool property for checking if it's null and
wheter it equals the last activated date.

This can be done without it by simply resetting the current selected
date (another property) to "today".

REVIEW: 127455
BUG: 360683
2016-03-30 22:53:49 -04:00
andreas kainz
3b7a701c57 update audio icon to use stylesheet 2016-03-29 16:26:48 +02:00
andreas kainz
2480582c0c update audio mute icon
BUG: 360953
2016-03-25 00:36:13 +01:00
Ivan Čukić
8bd9e56572 Fixing the force-creation of applets when plasma is immutable
REVIEW:127442
2016-03-20 22:48:57 +01:00
Kai Uwe Broulik
92e2c07adf [Fading Node] Don't mix opacity separately
This breaks icon item fading when its opacity is smaller than 1 as can be observed
in the "Leave" dialog.

BUG: 355894
REVIEW: 127427
2016-03-20 11:33:07 +01:00
Kai Uwe Broulik
bd354ecf70 [Svg] Don't reparse configuration in response to Theme::applicationPaletteChanged
Plasma::Theme emits the applicationPaletteChanged signal after it has fetched the
colors from KColorScheme and scheduled the caches to be nuked. There's no need to do
the same exact thing from every single Svg out there.

This speeds up Plasma picking up color scheme changes significantly and is now
on a par with other opened applications.

REVIEW: 127426
2016-03-20 11:30:58 +01:00
David Rosca
28b4400da8 Dialog: Set SkipTaskbar/Pager states before showing window
This sets the states before showing the window and is a proper fix
for the linked bug.

Needs e4cea305ed2ba3c9f580bf9d16c59a1048af0e8a from qtbase - Qt 5.6.1

CCBUG: 332024
REVIEW: 127422
2016-03-19 09:02:43 +01:00
Marco Martin
2661cd701c reintroduce busy property in Applet
both the comic and weather applet have to pick out the
_plasma_graphicsObject to access the AppletInterface
object just to set the busy property on it.
this reintroduces the busy proeprty in Applet too,
both setting it to Applet or AppletInterface
will keep them in sync

REVIEW:127411
2016-03-17 18:27:06 +01:00
Aleix Pol
0e9976afb1 Make sure PlasmaQuick export file is properly found
Uses the subdirectories structure as exported by the project.

REVIEW: 127405
2016-03-17 13:33:19 +01:00
Aleix Pol
309c64f5e9 Don't import an nonexistent layout
It should have a containment at least

REVIEW: 127345
2016-03-16 12:33:10 +01:00
Aleix Pol
c23f2415bb Make it possible for an applet to offer a test object
Makes it possible for plasmoids to test themselves in the different shells
by providing API to extract the object that will test the plasmoid
instance.

REVIEW: 127345
2016-03-16 12:32:25 +01:00
David Edmundson
23d020c797 Redo workaround for plasma dialogs flickering
Reviewed-by: David Rosca
2016-03-15 16:48:39 +00:00
David Edmundson
a9c1427eb1 Revert "Fix taskbar flicking when opening Plasma popups"
Causes a problem I missed.
2016-03-15 16:16:14 +00:00
Marco Martin
917b2768a8 org.kde.plasma:force-create in Containment
so much for removing sytray-related hacks.. :/
when the widgets are locked, must be possible to add/remove
widgets in the sytemtray anyways, as their creation/destruction
can depend from dbus activation (or the first time you launch
plasma with the new systray and it must be populated)

Change-Id: I8095ebf831ae57e1306a4d623b253c2a10ef219f
REVIEW:127373
2016-03-15 16:35:13 +01:00
David Edmundson
42e924e7f6 Fix taskbar flicking when opening Plasma popups
When we show a Qt window it resets all wm_states, including the
SKIP_TASKBAR state that Qt doesn't support see
QXcbWindow::setNetWmStates

In order to set the flag we need to do it after Qt has mapped the
window.

This was previously done using ExposeEvent which will happen after show,
but by it being a separate event the task manager will get notified in
the meantime.

By merging into the same event we can make sure the flag is set before
the task manager processes it.

BUG: 332024
REVIEW: 127374
2016-03-15 14:34:20 +00:00
David Rosca
8f6d1f17e4 Replace QMenu::exec with QMenu::popup
REVIEW: 127355
2016-03-12 13:04:39 +01:00
David Rosca
974a2b5071 FrameSvg: Fix dangling pointers in sharedFrames when theme changes
Store theme pointer in FrameData and set it when adding to sharedFrames.

REVIEW: 127344
2016-03-12 13:02:34 +01:00
David Rosca
fd46322300 IconItem: Schedule pixmap update when window changes
QQuickItem::polish is not called when window changes.

Regression from 344d04e230

REVIEW: 127342
2016-03-12 13:01:07 +01:00
David Rosca
46a1181587 IconItem: Animate active and enabled change even with animations disabled
animated: false should disable only animation when changing source,
we still want the hover and enabled animations.
Also fix docs.

REVIEW: 127302
2016-03-11 14:10:59 +01:00
David Rosca
aaa85f3f98 DaysModel: Make update a slot
update is invoked with QMetaMethod, so it must be a slot

Reviewed-by: kbroulik
2016-03-10 16:26:34 +01:00
Kai Uwe Broulik
344d04e230 [Icon Item] Don't animate from previous pixmap when it has been invisible
We have a lot of reusable singletons that are just hidden when not needed, such
as the OSD. IconItem, however, will always fade from the previous state, even if
the previous action happened minutes ago.

This fixes for example changing the volume and then later changing the brightness
where you could see the OSD animating from the volume icon.

REVIEW: 122859
2016-03-10 13:01:29 +01:00
Kai Uwe Broulik
3b115e6d90 [Icon Item] Don't call loadPixmap in setColorGroup
Changing the color group of an Svg emits repaintNeeded which will then
cause it to schedule a pixmap update anyway. Includes a unittest.

REVIEW: 127313
2016-03-10 12:58:18 +01:00
Kai Uwe Broulik
3decfdd869 [Applet] Don't overwrite "Persistent" flag of Undo notification
The setFlags(SkipGrouping) all overwrites the Persistent flag set in the constructor

Reviewed-By: drosca
2016-03-09 18:39:02 +01:00
Marco Martin
e55eb59dbd add two missing categories 2016-03-09 12:44:47 +01:00
Ivan Čukić
63f14f1ddf Allowing to override plasma mutability setting on containment creation
This adds a 'Sledge Hammer'-like flag (trust me I know what I'm doing)
for creating the containment even if the plasma is not set on
'mutable'.
2016-03-09 11:51:38 +01:00
Marco Martin
6973dac801 add icon/titleChanged
make it possible to set icon and title from
the Applet subclass, making appletInterface (so plasmoid obj)
notice about the change and relay the notify signal
2016-03-09 11:34:21 +01:00
David Rosca
d405378219 Remove QtScript dependency
It's not used anywhere.

REVIEW: 127312
2016-03-09 11:29:50 +01:00
Marco Martin
5b0ec83c36 Revert "mechanism for coronas to load plasmoids from custom folders"
This reverts commit 2751b72835.
2016-03-08 15:39:50 +01:00
Marco Martin
12ea79b341 Merge branch 'mart/customShell'
Conflicts:
	examples/CMakeLists.txt
	src/plasma/pluginloader.cpp
2016-03-08 15:38:31 +01:00
l10n daemon script
64a58b210c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-03-08 10:37:25 +00:00
David Rosca
978b8b3b87 IconItem: Don't overwrite source when using QIcon::name()
source should always return the same value as it was assigned.
Also removed duplicated code (empty sourceString is now handled
as if the source couldn't be converted to any type).

REVIEW: 127282
2016-03-04 23:44:57 +01:00
David Rosca
da340aaefa ContainmentInterface: Fix use of QRect right() and bottom()
right() = x() + width() - 1
bottom() = y() + height() - 1

REVIEW: 127277
2016-03-04 23:44:05 +01:00
Anthony Fieroni
7c06cd064a Merge branch 'master' of git://anongit.kde.org/plasma-framework 2016-03-04 21:06:56 +02:00
Anthony Fieroni
6bb02c88eb [Applet] Don't crash on remove panel
REVIEW: 127240
CCBUG: 345723

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-03-04 21:06:30 +02:00
l10n daemon script
6464f22534 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-03-04 09:12:16 +00:00
David Edmundson
1b21758570 Remove effectively duplicate code path for handling QPixmaps
IconItem handled both QOixmaps and QImages as a source.

QVariant(somePixmap).canConvert<QImage>() returns true so one of the
two code paths isn't executed. Given converting between the two is
practically free, we don't need two code paths.

REVIEW: 127270
2016-03-04 00:20:56 +00:00
David Edmundson
8c4f789b17 Docs for IconItem
REVIEW: 127268
2016-03-04 00:20:02 +00:00
Marco Martin
58c465c042 fix stylesheet
should fix colors assignments of the scrollbar elements

BUG:359345
2016-03-02 12:14:50 +01:00
l10n daemon script
0f3198644e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-03-01 11:55:01 +00:00
Eike Hein
ce4f7c1b79 Fix logic. 2016-03-01 17:41:03 +09:00
Eike Hein
3358c9eb9a Don't wipe window mask on every geometry change when compositing is active and no mask has been set.
Avoids an extra full repaint.
2016-03-01 17:27:33 +09:00
David Rosca
60af310cfc Theme: Discard pixmap cache when changing theme
Changing theme also changes color scheme making the pixmap cache
invalid for monochrome icons.

CCBUG: 359924
REVIEW: 127226
2016-03-01 00:06:15 +01:00
David Rosca
30368e1d45 IconItem: Fix changing color of svg icons loaded from icon theme
Connect to repaintNeeded when creating Plasma::Svg.

REVIEW: 127207
2016-02-29 22:28:58 +01:00
Weng Xuetian
066cf0a0d7 Fix svg iconPath resolving in IconItem
This fixes iconPath is not correctly set when its size changes.

REVIEW: 127201
2016-02-29 13:05:48 -08:00
Marco Martin
40b99a9122 if path is passed, pick the tail
PluginLoader::loadApplet works both by passing a simple plugin
name and a full path of a plasmoid package.

However, when loading the optional C++ plugin, we have to look
in the standard plasmoid plugin path, so only consider the
tail of the path name, as is guaranteed that part is equal to
the plugin name.

BUG:359902
Change-Id: Ic7300b7c12d7693bcb5590e29de780109a8ff81c
2016-02-29 17:31:38 +01:00
Marco Martin
f55e20cc5f properties configurationRequired and reason
unbreak api of Applet::SetConfigurationRequired + add bindings to
appletInterface as properties.
new properties configurationRequired and configurationRequiredReason

Change-Id: I18ff01df94c1a0c5fac79ff801bfa76714c9f986
REVIEW:127218
2016-02-29 14:26:52 +01:00
David Edmundson
88ec6de113 Move contextualActionsAboutToShow to Applet
Applet contains the menu actions, therefore reloading the menu should
happen in Applet not AppletInterface. With AppletInterface being a dumb
wrapper.

This exposes functionality to anyone who overrides Applet, but also will
also allows system tray to emit this signal without having to use
private API.

Change-Id: I95e65de315744a78a82ebba2a954e4f3ae1bd7b2
REVIEW: 127217
2016-02-29 12:10:28 +00:00
l10n daemon script
e1e58332e7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-29 11:17:43 +00:00
Aleix Pol
06c7b9c050 Remove some warnings
Unused variables
Unused code
Unused arguments
Unnecessarily complex code
Initialization order
Duplicated properties

REVIEW: 127214
2016-02-29 00:59:44 +01:00
Aleix Pol
9f62532674 Fix most of Clazy warnings in plasma-framework
REVIEW: 126672
2016-02-29 00:13:41 +01:00
David Rosca
526915895b Add autotests for IconItem
Add some tests for IconItem.
Also found one issue in animation when quickly changing source, first frame
will be rendered with wrong icon.

REVIEW: 127103
2016-02-27 21:24:45 +01:00
l10n daemon script
361204cbee SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-27 09:29:41 +00:00
Marco Martin
d524d96a25 using the margins of the flickable item is wrong
the clip will be at ScrollView, not at flickable level
2016-02-24 12:52:24 +01:00
l10n daemon script
3847dc6d91 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-24 09:12:03 +00:00
David Rosca
172847fc3b DataContainer: Fix slot checks before connect/disconnect
Use indexOfSlot instead of indexOfMethod and check for index >= 0.
Also added missing checks for all dataUpdated connects.

REVIEW: 127133
2016-02-23 19:08:48 +01:00
David Edmundson
73aa13b26d fix uninitialised var
Valgrind pointed this out whilst debugging something else.

REVIEW: 127079
2016-02-23 13:05:10 +00:00
l10n daemon script
78cee23be3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-22 10:53:01 +00:00
David Rosca
fca765bc05 ToolTip: Prevent multiple geometry changes while changing contents
Unset mainItem and set it back only after changing of tooltip contents
is completed. This improves behavior of morphingpopups effect (popups
animates from/to incorrect values).

REVIEW: 127118
2016-02-21 15:06:44 +01:00
David Rosca
4eeed04f0f Revert "Reparse svgElementsCache instead of deleting it in discardCache"
This reverts commit a8e54e15e1.
2016-02-21 15:05:13 +01:00
l10n daemon script
9e1b7dab46 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-21 09:52:09 +00:00
l10n daemon script
82c351cb04 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-20 09:50:14 +00:00
David Rosca
596fa082dd SvgItem: Don't use Plasma::Theme from rendering thread
Logic is similar to IconItem - rendered image is updated
in updatePolish().

REVIEW: 127115
2016-02-19 18:16:30 +01:00
David Rosca
f4e541ad87 Fix crash from previous commit - nullptr check 2016-02-19 13:39:55 +01:00
David Rosca
a8e54e15e1 Reparse svgElementsCache instead of deleting it in discardCache
svgElementsCache may be created on render thread and deleted
on main thread, which will make KSharedConfig crash because
it uses per-thread storage.

BUG: 359539
REVIEW: 127112
2016-02-19 13:25:26 +01:00
David Rosca
82e172cc9e AppletQuickItem: Fix finding own attached layout
Regression from 344dbeb938

BUG: 358849
REVIEW: 127073
2016-02-19 13:23:26 +01:00
Marco Martin
b6d636cc8f smaller expander for the taskbar
2+ doesn't make sense.
use just a single + in a circle ~half of the old one
2016-02-19 12:44:12 +01:00
l10n daemon script
57fbaa0597 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2016-02-19 09:24:58 +00:00
Kai Uwe Broulik
eccf7cf0b2 [ToolTip] Stop show timer if hideTooltip is called
This prevents the tooltip from showing up if hideTooltip was called
before it was shown.

BUG: 358894

Differential Revision: https://phabricator.kde.org/D959
2016-02-18 21:58:35 +01:00
Aleix Pol
978529d175 Remove unused variable
Reviewed by Marco Martin
2016-02-18 17:03:49 +01:00
David Rosca
1f98734dd3 Disable animation of icons in plasma tooltips
Tooltips are now animated with KWin effect.

REVIEW: 126653
2016-02-17 18:40:14 +01:00