Commit Graph

1134 Commits

Author SHA1 Message Date
Marco Martin
014979d8bf Revert "Fix loading plasmoids by absolute path"
This reverts commit 2ed819f37d.

panel loading was completely broken, the patch idea was fine,
but has to be redone and tested better.

CCMAIL:aleixpol@kde.org
2016-10-10 23:31:37 +02:00
Aleix Pol
2ed819f37d Fix loading plasmoids by absolute path
We were not looking into the plugin directory when figuring out the applet
path when it's load from an absolute path.
Fixes configmodeltest

REVIEW: 129101
2016-10-10 21:30:02 +02:00
Aleix Pol Gonzalez
4a9d5cff2a Port some few remaining uses of pluginInfo to pluginMetaData
I forgot to do it in the previous RR.

REVIEW: 129100
2016-10-10 18:02:20 +02:00
Aleix Pol
0ebe2ca1fa Don't enforce metadata.desktop, cleanup constructor
Makes it possible to use plugins that offer a metadata.json file.
Define the service type when falling back to the desktop file parser, so
the type system is proper.
Don't destroy a KPluginMetadata tuple to instanciate it right away.

REVIEW: 129102
2016-10-10 16:28:13 +02:00
Aleix Pol
bd970141ce Simplify plugin construction by relying exclusively on KPluginMetaData
REVIEW: 129057
2016-10-04 23:56:17 +02:00
David Edmundson
0f2bc677b9 Check defaultActionsCfg is valid
Commit 752626ad55 left a code path through
the switch statement where defaultActionsCfg would be an invalid group.

This is semantically correct as there is no relevant actions config for
this type of containment, however we then call methods on it which leads
to an assert in kconfig - and a failing unit test.

REVIEW: 129096
2016-10-04 22:08:58 +01:00
David Edmundson
752626ad55 Don't load containment actions for embedded containments (system trays)
Also load the correct default actions for custom panels.

REVIEW: 129078
2016-10-03 11:45:32 +01:00
David Edmundson
048d5243f0 Update applet alternatives menu entry visibility on demand
It's reasnoble to expect people to download an applet just before trying
to change an existing applet using the alternatives system.

Therefore doing the check at applet initialisation time is semantically
wrong. Especially as it doesn't just disable the action but also skips
creating it.

Finally this gives a startup performance boost; loading all the applets
metadata takes a small amount of time (~20 milliseconds) not really
noticable when you're doing it once, but it adds up if you're doing it
over multiple applets sequentially.
2016-10-03 01:46:33 +01:00
Aleix Pol
7429791309 Improve timetracker output
Show times where 0 is the beginning of the process
Use QDebug to get QVariant's values
Delay constructor print so that we know which class is being constructed
Use QJsonObject instead of going back and forth with QVariantMap

Reviewed by David Edmundson
2016-09-29 12:32:11 +02:00
l10n daemon script
732b7d82a4 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-09-29 09:53:12 +00:00
l10n daemon script
19c89d0b0c 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-09-23 09:35:12 +00:00
David Edmundson
494c690b18 Don't include kdeglobals when dealing with a cache config
The svg elements cache isn't really a "configuration" and it's not
something that should be overridden by global config settings.

Loading it as a simple config skips the cascading and saves reparsing
kdeglobals.

REVIEW: 128966
2016-09-21 11:43:50 +01:00
David Edmundson
16b478a827 Fix Plasma::knownLanguages
There was a logic error meaning this did the exact opposite of what
it should have been doing.

Fortunately no-one calls it anywhere.

REVIEW: 128959
2016-09-20 14:31:29 +01:00
David Edmundson
580af56fe5 Minor optimisation/cleanup in scripengine loading
Avoid creating a KPLuginInfo list from KPluginMetaData

REVIEW: 128955
2016-09-20 14:30:30 +01:00
l10n daemon script
6837a1c855 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-09-15 09:46:00 +00:00
David Edmundson
820baec72e Avoid creating a KPluginInfo from a KPluginMetaData instance
It's not needed, gives a (very) tiny performance boost and is a bit
cleaner.

REVIEW: 128904
2016-09-14 13:39:10 +01:00
l10n daemon script
861f1c982a 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-09-14 09:18:35 +00:00
l10n daemon script
71b8f9b22d 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-09-09 09:25:38 +00:00
David Edmundson
81a314c7a9 Extra guard in Containment::corona in the special system tray case
REVIEW: 128754
2016-08-25 17:48:56 +01:00
David Edmundson
22ba8186f0 When marking a containment as deleted, also mark all sub-applets as deleted - fixes system tray container configs not being deleted
This allows a custom applet to do cleanup (like the system tray, to
delete the inner containment)

REVIEW: 128754
2016-08-25 17:48:23 +01:00
l10n daemon script
888dca5501 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-08-21 09:22:10 +00:00
Friedrich W. H. Kossebau
6521c72f75 Fix wrong or missing "X-KDE-ParentApp" in desktop file definitions
"X-Plasma-ParentApp" would be nicer, but existing code and desktop files
use "X-KDE-ParentApp" as name for that property

REVIEW: 128616
2016-08-20 17:26:05 +02:00
Friedrich W. H. Kossebau
4bf1ef7ea6 Fix API dox of Plasma::PluginLoader: mixup of applets/dataengine/services/...
REVIEW: 128616
2016-08-20 17:19:14 +02:00
David Edmundson
b07904b901 Remove code that can never be executed.
We know d->uiReady is false, otherwise we wouldn't be in this code
block. Modifying d->loadingApplets won't change that.

REVIEW: 128709
2016-08-18 13:21:08 +01:00
Marco Martin
e1a0299a46 don't manually delete applets
applets will be deleted by the parent, as they are
acontainment's children. by not deleting them by hand
also every signal will be disconnected, not causing appletRemoved
to be emitted, so not causing removal of config
pieces at shutdown, this removes the need of the
explicit disconnect in aboutToQuit from contaiment interface

Change-Id: Iddf6ded60ae849ca03c363be6e736da496310b82
reviewed-by: David Edmundson
2016-08-08 15:07:10 +02:00
Aleix Pol
de1a45764a Define what Plasma packagestructures extend plasmashell
It specifies org.kde.plasmashell as the structures' target

REVIEW: 128604
2016-08-05 15:24:23 +02:00
Aleix Pol
67d882037c Define Plasma PackageStructure as regular KPackage PackageStructure plugins
This way we can use kpackagetool5 against them (see RR 128590).

REVIEW: 128596
2016-08-04 19:23:59 +02:00
Kai Uwe Broulik
d91127ca58 [Containment] Treat HiddenStatus as low status
The containment's status is the max of all applets.

Unfortunately, HiddenStatus, while semantically lower, has the highest value,
so as soon as there's a hidden applet (eg. pager with just one virtual desktop),
the panel will always auto-hide even when popups are open as its status will be HiddenStatus.

REVIEW: 128301
2016-07-22 08:32:52 +02:00
Marco Martin
301193cb96 don't assume last is is numScreens()-1
screen ids are going to not be continuous anymore
as screen id is going to correspond 1:1 to connectors,
it will be possible to have "holes", therefore valid ids
that are bigger than screenNum()

REVIEWED-BY:sebas@kde.org
Change-Id: I1c0b1fb827dba4d95f228d32209403150c089c77
2016-07-18 14:47:53 +02:00
R. Harish Navnit
eef8c29b7a Plasma::Service::operationDescription() should return a QVariantMap
REVIEW: 127812
2016-06-27 12:11:25 +05:30
Allen Winter
a07c88cf77 plasma/scripting/scriptengine.cpp - -Wunused-parameter 2016-06-15 13:08:39 -04:00
Allen Winter
a04f0c3f8f plasma/private/timetracker.cpp - -Wpedantic 2016-06-15 13:08:39 -04:00
Marco Martin
6f5816fc57 ensure the scriptengine is here
ensure the scriptengine gets created also for c++ applets
that have a valid scriptengine, move the script init
out of applet::init that can be reimplemented.
remove the second appletscript constructor that is
not necessary anymore

REVIEWED-BY: Kai Uwe Broulik
2016-06-15 11:04:21 +02:00
David Faure
967e81611f PluginLoader::loadApplet: restore compatibility for misinstalled applets.
Summary:
The notifications applet installs the .so into the toplevel plugins dir,
and my earlier code removal broke the loading of that applet.

Reviewers: lbeltrame, mart

Reviewed By: mart

Differential Revision: https://phabricator.kde.org/D1851
2016-06-13 22:47:01 +02:00
David Faure
107c28d361 PluginLoader: improve error message about plugin version compatibility
Summary:
The name of the actual plugin was missing, making the warning rather useless.
Since this is only used within PluginLoader, I added a private function
isPluginVersionCompatible(KPluginLoader), taking code from
Plasma::isPluginVersionCompatible(uint). That one could probably be deprecated,
although no public replacement would be available, just "use PluginLoader".

Test Plan: plasmoidviewer -a org.kde.plasma.digitalclock

Reviewers: mart

Reviewed By: mart

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D1825
2016-06-12 18:13:12 +02:00
David Faure
181869e636 Remove erroneous plugin-loading compat code.
Summary:
This code was passing PREFIX/share/plasma/plasmoids/org.kde.desktopcontainment/metadata.desktop
to KPluginLoader (which expects a .so!), which led to warning noise
"Plasma::isPluginVersionCompatible: unversioned plugin detected, may result in instability"
(since that code tries to find a version symbol in the .so).

The reason why KPluginInfo::libraryPath() returns the .desktop file seems
to be a KPluginMetaData misuse, but this is compat code marked as "to be removed"
so I didn't fully debug the KPluginMetaData misuse.

Test Plan: plasmoidviewer -a org.kde.plasma.digitalclock

Reviewers: mart

Reviewed By: mart

Differential Revision: https://phabricator.kde.org/D1827
2016-06-12 18:12:02 +02:00
Marco Martin
84c29fa3d0 new containment type for the systray
add a new containment type for use in the systray:
this way it will be able to have a screen number without
actually creating a panel from its own

REVIEW:128118
2016-06-07 20:18:06 +02:00
Aleix Pol
9575b8c009 Let Plasma::Corona load the layout on all cases
We either load the existing layout or we load a default one.
With this, it could be removed from ShellCorona.

REVIEW: 127850
2016-06-07 15:23:13 +02:00
Marco Martin
4de0dd2e90 rename state property in status
emergency change: in Qml the name "state" for a property
is reserved for the internal state machine, so any object that
exposes a "state" property on its own would automatically
break the state machine
2016-06-01 14:47:56 +02:00
Marco Martin
f3c05034d9 Selected state for Plasma::Svg and IconItem
Like KIconloader, support a Selected state, in IconItem,
as in all generic svgs/framesvg
it replaces the text color with HighlightedText and the
background color with HighlightColor

Change-Id: Id97a527405d2c3feed75a172f05547defdbf440c
REVIEW:127975
2016-05-31 11:10:47 +02:00
Anthony Fieroni
2275db4b39 [dataengine]If the DataEngine constructor is called with an invalid KPluginInfo object, make sure valid is set to false.
+ test case

REVIEW: 127795

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
2016-05-19 22:45:29 +03:00
Marco Martin
3bffad8c42 relicense few files
license to LGPL2+ as in frameworks licensing policy
The old license in the files was actually wrong, because:
servicejob_p.h : splitted from servicejob.cpp (already 2+)
in 89b71cd9f195da51993533f7fc2329ddc08a7de4

package_p.h: splitted from package.cpp (already 2+)
in 9cb9cfe65e

packagestructure_p.h: created by me in a629fe4d8f
(by copy/paste of the header)
2016-05-19 17:44:43 +02:00
Marco Martin
f98cae5dd0 Use SAX for Plasma::Svg stylesheet replacement
following KIconLoader, use QXmlStreamReader/Writer
here too to replace the svg stylesheet to color
the svg with system colors.
it should be hopefully slightly more efficient

REVIEW:127937
2016-05-17 14:45:54 +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
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
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
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
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ć
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
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
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
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
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
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 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
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
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
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
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
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
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
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 Rosca
4eeed04f0f Revert "Reparse svgElementsCache instead of deleting it in discardCache"
This reverts commit a8e54e15e1.
2016-02-21 15:05:13 +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
l10n daemon script
13dc03991d 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-06 09:49:14 +00:00
l10n daemon script
087c10cd43 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-05 09:18:18 +00:00
l10n daemon script
3dac19023c 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-02 10:51:53 +00:00
Marco Martin
8e71d6590b use complementaryColorScheme from KColorScheme
kill many lines of code
2016-01-26 11:47:00 +01:00
l10n daemon script
bd10d78e1e 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-01-22 09:52:02 +00:00
Marco Martin
427419ba2e more docs
Change-Id: I821c7f38a1880754a12bbcbb997b03d8813e6903
2016-01-12 13:32:17 +01:00
Marco Martin
6841956ea6 deprecate Applet::loadPlasmoid()
Deprecated: use Containment::createApplet instead,
you are not supposed to have applets without containments

Change-Id: I5e73335523687969918a71e56eaa3124d779ee74
2016-01-12 13:28:00 +01:00
l10n daemon script
345fba11bf 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"
2015-12-30 09:28:22 +00:00
Martin Klapetek
f639996bec Use the SkipGrouping flag for the "widget deleted" notification
https://git.reviewboard.kde.org/r/126459/ introduced new
flag that allows to skip the grouping of notifications.

This should fix all bugs caused by checking for appName
being "plasma_workspace" which are all default notifications
from any plasmoid.

CCBUG: 356653
REVIEW: 126461

(this also needs to raise the KF5 dep to 5.18 which is
normally done at release time, but in order to use this
now, it needs to be bumped now, otherwise build failures
will ensue)
2015-12-29 15:12:05 -05:00
David Edmundson
ab135f4e8e Don't always load the timetracker
It has a timer that wakes up every 2 seconds and drains my battery just
simply because I have debug builds. This make it on demand.

Don't track containments twice.
Containments inherit from Applets which also have the same line

Change-Id: Ia9a9b58a0b1197083d692c58e4ce75838c311db4
REVIEW: 126472
2015-12-27 19:37:35 +00:00
Leslie Zhai
97ef641566 Add HiddenStatus for plasmoid self-hiding
Self-hiding plasmoid is useful https://forum.kde.org/viewtopic.php?f=83&t=39501
for example, bluetooth plasmoid can be totally hided when there is NO bluetooth
adpater available.

PassiveStatus is NOT enough, because plasma-workspace's systemtray applet ONLY
hide the passive status plasmoid into ExpandedRepresentation. when click the
expanding triangle, the 'hidden' plasmoid is still visible.

So I added HiddenStatus and implemented it in the plasma-workspace systemtray
applet.

REVIEW: 126297
2015-12-23 22:17:20 +08:00
David Edmundson
01cd374c8e Don't emit statusChanged if it hasn't changed
For some applets the status is bound to a complex expression that can be
re-evaluated a lot. This ends up causing a lot of unnecassary updates.

REVIEW: 126471
2015-12-22 17:32:28 +00:00
David Rosca
bca8e87531 Containment: Don't emit appletCreated with null applet
ContainmentPrivate::createApplet may return null pointer
(eg. when desktop is immutable), so check the pointer before
emitting appletCreated.

REVIEW: 126449
BUG: 356428
2015-12-21 15:00:22 +01:00
Michael Pyne
600bdda045 Fix potential use-after-free in FrameSVG.
Plasma framework's FrameSVG class uses cached regions for efficiency. However
Coverity caught a mis-use of QCache in FrameSvg::mask(), which could lead to a
use-after-free situation. (CID 1291560)

Basically, any pointer passed into QCache::insert must be assumed to be deleted
after insert() has been called -- we can't then return that pointer to the
caller.

Moreover we were simply returning a pointer to calling code that had been (and
still would be) owned by QCache, which is unsafe as it can be deleted at any
time. The fix in both cases is to make a local copy of the QRegion from out of
the cache and return that.

REVIEW:126411
FIXED-IN:5.18
2015-12-17 21:34:04 -05:00
Martin Klapetek
76186339f6 [libplasma] Add categorized debug output 2015-12-15 16:56:40 -05:00
Martin Klapetek
2df5c4d1eb Add a warning if Plasma fails to load the ScriptEngine
Should help in the future if there are similar problems like the recent
one when Plasma wouldn't load because it failed to load the ScriptEngine
and nobody knew why it fails to load.
2015-12-15 09:49:40 -05:00
Martin Klapetek
54602237fd Read KPluginMetada's property X-Plasma-ComponentTypes as a stringlist
plasma-scriptengine.desktop defines the property "X-Plasma-
ComponentTypes" as Type=QStringList. When reading it using
KPluginMetaData::value(..) it expects a QString back. This
used to work but regressed in kcoreaddons in commit
cfd18cf09b559a050fd6a2680ad4e71eeb950383.Making it read the
property as a stringlist works and is correct and also fixes
Plasma startup.

REVIEW: 126320
2015-12-14 09:04:52 -05:00
Marco Martin
5f92df4799 Let containments override CompactApplet.qml
the CompactApplet file from the shell package
defines the behavior of the poopup applets in
the panel (it implements an internal dialog
and all that jazz)
implementing a simplified systray(both the one
for the phone and a separate one for the desktop),
i noticed that a containment may have different
ideas on how to expand an applet: the systray would
have for instance a single popup dialog and put all
of its applet full representtions in the same Dialog,
this lets containment representation to override
that file (*if* won't get abused, that's the only
thing makes me a bit on the fence about this)
It would make possible also fairly different designs
that have been proposed in the past, such as the bug
sidebar similar to the "charm bar"

Have to keep an eye opened if having the file list
changing with the path may be an issue, but
shouldn't as ChangeableMainScript already does
something similar.

Change-Id: I1c7fda55d6829d3a67f511c91822b131dea85ac1
REVIEW:126244
2015-12-10 23:10:02 +01:00
Marco Martin
2751b72835 mechanism for coronas to load plasmoids from custom folders
applications such as Amarok can look for their plasmoids in
their own data dir in order to not have all mixed up
2015-12-01 17:39:05 +01:00
Nick Shaforostoff
c7c2980f14 qstring optimizations
REVIEW: 126148
2015-11-27 20:03:48 +00:00
Marco Martin
4e143813b4 example without a wallpaper 2015-11-24 12:15:11 +01:00
Marco Martin
1a804c33e2 use qGuiApp instead of qApp 2015-11-20 14:37:17 +01:00
Marco Martin
a9d3d9a81a make event filters static to decrease installed filters on qApp
since seems there are so many event filters installed
on the QApplication installed that may give performanc
 issues, try to use separate, singleton watchers for them
to decrease the amount of eventfilters called

REVIEW:126113
2015-11-20 14:26:16 +01:00
Marco Martin
c8b9b852ef check for slot existence before connecting or disconnecting
since this is a blind connect to a slot that may exist
or not exist, the new syntax can't be used, but check
for the slot existence before attempting a connection

BUG:354751
2015-11-11 11:07:46 +01:00
Martin Gräßlin
286300ad35 Use newer cmake syntax for XCB dependencies 2015-11-09 11:11:06 +01:00
Nick Shaforostoff
db7f198a19 -use QStringLiteral and QLatin1String in the code that is executed multiple times (avoids utf8->utf16 conversions)
-use splitRef when converting parts of qstring to ints to avoid redundant memory allocations
-warnings--: remove redundant ';'

CCMAIL: notmart@gmail.com
2015-11-06 13:39:18 +00:00
l10n daemon script
01f4cf59ea 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"
2015-11-04 17:07:45 +00:00
Marco Martin
c1065ccf39 Theme breeze icons when loaded trough IconItem
This makes IconItem try to load global icons from the theme
with Plasma::Svg as well, making it assign the colors from
the stylesheet if the breeze monochrome icons are treated,
that should be scriptable, from some attempts i did the
script seems to convert them correctly, without any
change in rendering.

This will automatically color monochrome breeze icons only
in plasmashell, and more specifically only those that use
IconItem, not QIconItem (iconitem should probably have an
animation-less mode to be able to be used in taskmanager
and stuff)
perhaps in the future we'll be able somehow to hook all
this stuff in QIconEngine to be able to use it in QWidget
applications, but since QIcon does have any idea where it is,
is not usable yet for things like the fullscreen fixed-dark
gwenview view.

Change-Id: I28e5fedabafbe8ed82a9df7614f8e2af18c6a24d
REVIEW:125657
2015-10-20 11:49:20 +02:00
Marco Martin
84fc7672f6 introduce appletCreated signal
appletCreated is different from appletAdded because it gets
emitted only when the user explicitly creates one, so not in
case of an applet migrating and not during restore
needed by https://git.reviewboard.kde.org/r/125562/

REVIEW:125569
Change-Id: I1db9286beb160391c13f1aca0ac48ed490495ea2
2015-10-13 14:26:53 +02:00
Marco Martin
64fdce2086 Revert "plasma: Fix applet actions might be nullptr"
This reverts commit 4e9b32d80d.

doesn't fix the problem and just introduces a memleak
(the crash is actually about a deleted containment,
so the problem is somewhere else)
CCMAIL:xiangzhai83@gmail.com
2015-10-07 17:19:13 +02:00
Marco Martin
f4c6042b37 if the desktop file has Icon=/foo.svgz use that file from package
restore a feature from Plasma4, the ability for plasmoids to provide
an icon insude their package.
intended for GHNS plasmoids,
already used in the widget explorer, this makes it the default
 plasmoid icon as runtime as well.

Change-Id: I196897eeedbe0c385c2795ab73c278f7c837221d
REVIEW:125336
2015-09-24 20:57:54 +02:00
Marco Martin
c149b1d382 add a "screenshot" file type in packages
Change-Id: I8f6b809ae0e4e768dff48cf21336db6dd40f677e
2015-09-24 11:53:20 +02:00
David Kahles
8a85589afc Remove the documentation of the non-existent parameter "desktop"
REVIEW: 125171
2015-09-12 18:08:03 +02:00
Martin Klapetek
e07778d97b Simplify getting associated apps list in AssociatedApplicationManager
REVIEW: 125105
2015-09-08 12:30:51 -04:00
David Edmundson
fd9a936393 remove superfluous semicolon
Change-Id: Ic272871230de8d004159560aa8cc1d91df5857eb
2015-09-08 16:52:50 +02:00
l10n daemon script
98583160cb 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"
2015-08-28 10:20:30 +00:00
l10n daemon script
c718ba4b48 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"
2015-08-26 10:19:25 +00:00
Leslie Zhai
4e9b32d80d plasma: Fix applet actions might be nullptr
BUG:351777
2015-08-26 17:24:29 +08:00
David Edmundson
7061235418 Handle an invalid metadata in PluginLoader
REVIEW: 124823
2015-08-20 16:10:03 +01:00
Kai Uwe Broulik
6098528cd4 Add X-Plasma-NotificationAreaCategory definition 2015-07-20 14:14:52 +02:00
Bhushan Shah
084d527638 Print useful warning when we can not get valid KPluginInfo
We can not generate proper PluginInfo most likely because metadata was
not valid, printing metadata itself will not be useful and will result
in printing message like,

Could not load plugin info for plugin : "" skipping plugin

Which is 0% useful.
2015-07-16 19:13:44 +05:30
Marco Martin
fef51e71d6 cache naturalsize separately by scalefactor
solves some highdpi issues
saves and reads natural sizes separed by scalefactor
so they don't get mixed up when the scaefactor changes
resulting in wrongly sized items

reviewed-by:David Edmundson <david@davidedmundson.co.uk>
2015-06-24 10:38:53 -07:00
David Edmundson
99da4651c3 Verify KService has valid plugin info before using it
Change-Id: I361bb9f49e9fab108e524e5d321d114fd1fc4aae
REVIEW: 124062
2015-06-14 10:16:54 -07:00
Marco Martin
34935428e8 correctly scale up svgs
scale the natural size as well as sizes
this makes hugh dpi ratios to be more uniformly scaled
2015-06-11 18:01:53 -07:00
Kai Uwe Broulik
d65c0ed1d0 Bind translucent theme to background contrast rather than blur effect
Only the background contrast effect provides real contrast for contents, the blur effect
doesn't improve readability that much; so we now use the translucent theme only when we
have the background contrast effect. This significantly improves readability.

CHANGELOG: An opaque theme is now used when only the blur effect is available
REVIEW: 124039
BUG: 342934
BUG: 348154
2015-06-08 17:30:38 +02:00
Martin Klapetek
37590e2d2b Fix AssociatedApplicationManager lookup when a mimetype has no aliases
QMimeType::aliases() does not return the main mimetype in the returned
list and so when there are no aliases for a mimetype, there would be no
associated application found as it would be querying for empty mimetype.

This now always prepends the current mimetype to the list for which the
apps are queried.

REVIEW: 123779
BUG: 340326
FIXED-IN: 5.11
CHANGELOG: Fix AssociatedApplicationManager lookup when a mimetype has
no aliases

Change-Id: I322b03f2ac17fa4c0eb70fc3354c65a0f7a5e34c
2015-05-13 19:05:09 +02:00
Marco Martin
a7d4e52aed get rid of "Could not load applet" message
is misleading and not correct anymore

Change-Id: I6429d522d92d94661d14d618f20e1c604140a6a9
2015-05-11 17:48:01 +02:00
Marco Martin
f1c0a9a06b capability to load QML kcms in plasmoid config windows
With the same mechanism as plasma 1, add the possibility to load kcms directly
 in the plasmoids config windows. this works only for qml based ones.
the apply enable and trigger is correctly wired between the config dialog
and kcm apis.

Change-Id: I66b5ab2253dcbb5f223b5dcf5616efc9d5aab274
REVIEW:123673
2015-05-08 20:35:45 +02:00
Aleix Pol
ec6afe2a8a Don't use the DataEngineStructure for Applets
Use Plasmoid instead.

REVIEW: 123690
2015-05-08 19:24:38 +02:00
l10n daemon script
662adbb41b 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"
2015-05-08 10:19:36 +00:00
Marco Martin
ea924b1469 port libplasma away from sycoca as much as possible
this ports most of libplasma away from sycoca, using instead
a combination of KPluginLoader and KPackage::PackageLoader instead
(so eventually using their own little caches instead of the
global sycoca cache)
a kservicetypetrader call is left in the loading of
containmentactions since is the only way to make an older
workspace still work, but is only a fallback, so containmentactions
in plasma-workspace can be ported eventually as well

Change-Id: Ie9579c3e01284f6d97043e22d01bbe63d3c3f45a
REVIEW:123626
2015-05-07 16:26:37 +02:00
Sergio Martins
dea859ee60 Fix member initialization order [-Wreorder] 2015-05-03 20:36:59 +01:00
Sebastian Kügler
2b1a487428 Use KPluginLoader to load dataengines
KPluginLoader has all the needed machinery to identify a plugin by its
pluginId. No need to use the query parser here, replace it with a
lambda.

Look for C++ dataengines first. These are much more common, especially
in essential cases. By looking up the plugins through KPluginLoader
first, we can save querying ksycoca.

REVIEW:123297
CHANGELOG:Use KPluginLoader instead of ksycoca for loading C++ dataengines
2015-04-09 01:10:52 +02:00
Marco Martin
a5737b553e fix margin sizing after the imagepath changes
Change-Id: If47f4d538caf93a35b4ef008cbc5339a9ef265a0
2015-04-08 13:44:55 +02:00
Andrius da Costa Ribas
99d968e190 Convert switch/case statements to if/else due to MSVC being unable to recognise e.g. FrameSvg::TopBorder | FrameSvg::LeftBorder as a const expression (error C2051: case expression not constant)
REVIEW: 120877
2015-04-03 16:29:37 -03:00
Marco Martin
285224a2ea don't risk to mix up frames with different pixelratio
BUG:345155
Change-Id: I0b2384831d755e02b944a49259ffeacd0d2fb71e
2015-03-25 17:06:47 +01:00
Martin Klapetek
8bebf82fbf Update the documentation page with current informations
Change-Id: Iffe77b6ca173b2c09c74b8928a5412d2ce098a85
2015-03-24 15:32:33 +01:00
David Edmundson
4490a3b868 Initialise member varaibles
Change-Id: I174738b6f684b21c65df53db24bd5c1c71976c6a
2015-03-24 12:11:11 +01:00
David Edmundson
d9dd89890a Save a lookup in containmentActions
Also fixes an (arguably invalid) coverity warning

Change-Id: I1eebd475131b540517a7964c4ea9ec057a18c26f
2015-03-24 12:05:21 +01:00
Marco Martin
fac1100fff make sure to not emit immutabilityChanged at startup
if the immutability doesn't actuall change at startup,
don't emit immutabilityChanged even tough each applet needs
one ImmutableConstraint at start to correctly initialize
stuff

Change-Id: Id1fd40ffd62c09a2b092d13d7fb4c556cfb34994
2015-03-17 19:13:28 +01:00
Marco Martin
117898f4ed don't install notifyrc
the plasmashell notifyrc is unfortunately installed by frameworksintegration

Change-Id: I50aba5bef79150c3d8d92e9c2c94965daabd5e38
2015-03-17 18:30:45 +01:00
l10n daemon script
5265842028 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"
2015-03-14 10:19:38 +00:00
Marco Martin
80d5a6fdda start timer with invokeMethod
rectSaveTimer is used to event compress the save and sync of the
configuration file that is used as a cache of the rectangles of
svg items (in order to avoid svg renderers creation when possible)
there is exactly one situation where it seems to not work: during
creation of svgitems/framesvgitems, insertintorectcache ends up
being called by another thread than the Theme's qobject thread,
and that is not allowed.

with invokeMethod the timer will be started by the correct thread
REVIEW:122915

Change-Id: I3ff4a4ebd1dfdba4b9b830fe6c08feece19b903e
2015-03-12 15:15:45 +01:00
Marco Martin
148e0022f6 Make Svg,FrameSvg work qith QT_DEVICE_PIXELRATIO
when QT_DEVICE_PIXELRATIO is something different from 1,
the pixmaps generated by Svg will be scaled up to give a proper texture.

This is complementary but not replacing our current approach:
the pixelratio that can be accessed by units is now in relation to the qt pixel ratio,
spacings are also adjusted accordingly (therefore, spaces and sizes won't
need an integer value like pixelratio)

svg introduces also a scaleFactor property (that is pretty much like its old pixelRatio)
basically, scalefactor, will scale both the textures and all the reported sizes,
(old method) pixelratio just scales textures without altering measures
(like qt pixelratio likes)

Change-Id: I304aa0d80abf76abafac239be185dd3b2ab741b7
REVIEW:122673
2015-03-10 18:02:15 +01:00
Marco Martin
993301c80b add missing K_EXPORT_PLASMA_APPLET_WITH_JSON
both old and new notation for compatibility:
same as DataEngine

Change-Id: I96af8f2255a94e1c0bc86e55ebb420de721444eb
2015-03-03 16:35:15 +01:00
Aleix Pol
e9bddef8ee Make it possible to let plasmoids to load scripts outside the plasma package
Adds a X-Plasma-Requires property for the plasmoid metadata files that will
specify the features.
Furthermore, adds a feature called ExternalScripts so that a plasmoid can
request to load files that are outside of the import directories.

REVIEW: 122595
2015-02-25 16:26:23 +01:00
Kai Uwe Broulik
5e53bd4d57 Don't ask KWindowEffects for blur repeatedly since we track it ourselves anyway
It might not have caught up yet when we decide to nuke the cache, resulting in
the translucent graphics staying when disabling blur or switching to XRender.

Changelog: Fix Plasma popups being hard to read tue to translucent background

REVIEW: 122676
BUG: 344179
2015-02-23 21:24:12 +01:00
Marco Martin
e2e7cb1cab remove PlasmaKPackageLoader
use a package of type KPackage/GenericQML for the toolbox instead

Change-Id: I5e559535338f093b3cd3734ef9c3906bb20cf001
2015-02-20 18:08:48 +01:00
Marco Martin
2bbb9dda7f if an inexisting library was specified, fallback
fallback to empty Applet/containment if an inexisting library
was specified in the metadata file.
this fixes old applets with incorrect metadata
BUG:344281

Change-Id: I0efc9dc32dee0e6fe4f3757065004a19f6e01844
2015-02-20 13:37:09 +01:00
Marco Martin
bda055367f use an internal package loader
internal kpackage loader used to load Plasma/generic plasma/plasmoid etc
directly from kpackage

Change-Id: Ibd91b0d18b233291978ac667f7bf768a8bdc3c9b
2015-02-20 09:58:57 +01:00
Marco Martin
462ad8a6ca support for C++ applets
make possible for an applet to be implemented in c++ but still
have the qml package with the usual api, this was supposed to
be supported from the beginning.

if a c++ applet has been loaded, make available the property
plasmoid.nativeInterface to the qml part, exposing the subclasses
Applet instance with all eventual extra propertiels/slots.

if no c++ plugin is present, appletInterface will be dummy/not available

this (besides limiting a bit the qml import rabbit procreation)
makes available some things not available to normal private imports:
* access to applet config() to save more complex things compared to what kconfigxt allows
  or save/load stuff from the c++ part
* access to containment()/corona(), may be useful for containment implementations
* easier port for old very big applets such as comics/weather

Change-Id: I65117660043de3a60ad58c77b086f686683d4d8c
2015-02-17 13:43:33 +01:00
Kai Uwe Broulik
b3f607ec1a Distinguish datacontainer relays by both interval and alignment
This allows being able to change just the alignment, which can happen, since
the order of QML bindings being re-evaluated is non-deterministic

REVIEW: 122593
2015-02-16 18:47:10 +01:00
l10n daemon script
073b83b440 SVN_SILENT made messages (.desktop file) 2015-02-16 10:17:17 +00:00
Kevin Funk
7e302a5236 Use Q_DECL_OVERRIDE where possible
REVIEW: 122542
2015-02-13 13:31:58 +01:00
David Edmundson
084be8e534 Port to kpackage::package
Change-Id: Id52b8d6bf76ab964c02cec9f0bba1dcdf3950d76
2015-02-12 13:05:12 +01:00
David Edmundson
e0f6b76f4b Port from deprecated KConfigLoader API
Change-Id: I9fe88d2b0b16dab02e4e35af3d0e992cec0edb91
2015-02-11 14:52:41 +01:00
David Edmundson
685ee11822 Fix leak in ContainmentActions
Change-Id: I41c9b9c224b36b045034755b07a92f2bdfe9f40e
2015-02-11 14:49:23 +01:00
Vishesh Handa
b81663bd65 Add a X-Plasma-StandAloneApp option to applets
We can use this option to figure out which applets should be exposed as
independent applications.

REVIEW: 122502
2015-02-10 14:43:30 +01:00
l10n daemon script
03bae89ac5 SVN_SILENT made messages (.desktop file) 2015-02-04 08:58:49 +00:00
Marco Martin
e2a6cc9c8e delete the activityId entry as well when deleting
cleanup the activityId entry when the config group is deleted

Change-Id: I1eb7559c3111f058a730a620646bfd3e03af8b5b
2015-02-02 19:04:36 +01:00
Alex Merry
d4ea9ef66d Fix CamelCase header installation.
Installing the Plasma directory (which contains the CamelCase forwarding
headers) breaks on case-insensitive filesystems (eg: Windows) because it
is that directory also contains the lowercase build-time-only forwarding
headers (they are put in the plasma directory). These then overwrite the
real lowercase headers with ones that forward to the source directory.

However, the first argument to ecm_generate_headers is a variable name
containing exactly the CamelCase headers that should be installed,
avoiding this issue rather neatly.

Reviewed-by: Patrick von Reth
2015-01-31 13:01:49 +00:00
Marco Martin
534733558c restore hint-apply-color-scheme support
make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors

BUG:343389
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959
2015-01-29 13:17:39 +01:00
Marco Martin
bdda85a40d restore hint-apply-color-scheme support
make hint-apply-color-scheme work (kiconeffect based coloring),
and make sure the kcolorschemes are reloaded when app palette changes
and the theme follows system colors

BUG:343389
Change-Id: I0a7a7eb0f89ed0948e618f1d608521f235aa1959
2015-01-28 17:54:26 +01:00
l10n daemon script
4b1970cf83 SVN_SILENT made messages (.desktop file) 2015-01-27 11:23:41 +00:00
Marco Martin
9898e1be4f emit immutabilityChanged in all cases it changes
when an applet or cont is deleted, when invisible has systemimmutable as
its immutability (then restored to mutable if restored)
notify correctly the change

BUG:342704
Change-Id: Iea37fd287d6b120e161f5ac7ad4a17a078fec9bb
2015-01-21 15:03:15 +01:00
Marco Martin
237cb24b2d undelete panels when applet gets undeleted
when a deleted applet of a deleted panel
gets undeleted, undetele before the panel itself
that's the safest and most "expected" outcome
BUG:343096

Change-Id: Iece7710028052b2118f590377fd39e3c78279b11
2015-01-21 13:57:45 +01:00
Hrvoje Senjan
1403295db8 Add missing QDataStream and QObject includes
Fixes build with Qt 5.5
2015-01-17 17:48:48 +01:00
Weng Xuetian
f8faf5380a Change string from non-existing %2 to %1.
Change-Id: I52b69a7bd65118c5d0a8dc5bc1649ca0157769d4
CCMAIL:notmart@gmail.com
2015-01-15 13:44:02 +01:00
Marco Martin
7d00d30f44 reset the internal size copy when the theme changes
Change-Id: I1800076e98bc543ffdea3f4c92d5a08f934f7573
2015-01-13 10:50:20 +01:00
Alex Merry
48e9c2f29e Update installation variables. 2015-01-10 17:47:31 +00:00
l10n daemon script
1afbc2c461 SVN_SILENT made messages (.desktop file) 2015-01-02 09:15:04 +00:00
l10n daemon script
6f7a3ae9ea SVN_SILENT made messages (.desktop file) 2014-12-30 10:48:32 +00:00
Marco Martin
dd866b427e Merge "migrate to KPackage" 2014-12-29 14:20:43 +01:00
Marco Martin
a629fe4d8f migrate to KPackage
Plasma::Package internally uses KPackage, being a pure wrapper.
old client code and old packagestructures still work using the wrapper.
old workspace code that is not directly using kpackage continues to work correctly

Change-Id: I05f95e8d05e3b67759973c4009e3753c61b1dcce
2014-12-29 13:56:52 +01:00
Kai Uwe Broulik
b4e1fd5f1c Keep the event filter around so get notified of font changes at runtime
Changelog: Fix labels not picking up changes to font settings at runtime

REVIEW: 121728
BUG: 334818
2014-12-28 23:43:47 +01:00
l10n daemon script
10a94ba7c9 SVN_SILENT made messages (.desktop file) 2014-12-24 08:38:52 +00:00
l10n daemon script
53d694072c SVN_SILENT made messages (.desktop file) 2014-12-19 09:15:56 +00:00
l10n daemon script
f64207f408 SVN_SILENT made messages (.desktop file) 2014-12-14 08:54:42 +00:00
David Edmundson
2afeb22f42 Merge changes Ibb130779,I68521f90,Ica6ba027
* changes:
  Reparse settings when they change
  Use a shared config in tooltip
  Save SVGs only when a theme is unloaded, not on each theme proxy
2014-12-11 12:40:43 +01:00
David Edmundson
f6aa18c884 Save SVGs only when a theme is unloaded, not on each theme proxy
A single Plasma theme will be represented by one ThemePrivate object,
which is exported in multiple Theme objects.

We want to save the cache when that theme stops being used, not each
time an item stops using the theme.

saveSvgElementsCache calls sync() which involves a lot of parsing and
IO. This makes everything a lot faster at no cost.

Change-Id: Ica6ba0273bc99fb8ad8733a1c90db8f1e87c49ea
2014-12-11 01:56:55 +01:00
Kai Uwe Broulik
d5148f87c0 Fix capitalization
REVIEW: 121071
2014-12-09 23:24:01 +01:00
Kai Uwe Broulik
5e17e3fd1c Give undo notifications a title
The "Plasma" (default put in there by the notification applet because it has no title)
is not really descriptive.

REVIEW: 121071
2014-12-09 23:22:57 +01:00
l10n daemon script
d47e417e40 SVN_SILENT made messages (.desktop file) 2014-12-07 08:47:50 +00:00
David Faure
d348816c7d Fix compilation with Qt 5.2.0
(moc was a bit buggy it seems)
2014-12-03 09:49:53 +01:00
Marco Martin
0ca29bc0f2 export a plasma version number in themes
some of the behavior of the theme has changed.
this makes some of the old themes to not work correctly
(like black text on black)
read a version number of the "plasma version this theme has been intended for"
and use it to change the behavior for retrocompatibility
(all themes that don't export this are assumed to be from KDE4)

Change-Id: I4bc20a0c10de9f9a6c3facd63b6c5b6da210039a
2014-12-02 15:05:48 +01:00
l10n daemon script
cf3898f7a9 SVN_SILENT made messages (.desktop file) 2014-12-01 08:51:21 +00:00
l10n daemon script
8415c20760 SVN_SILENT made messages (.desktop file) 2014-11-23 08:53:19 +00:00
l10n daemon script
7c65143e12 SVN_SILENT made messages (.desktop file) 2014-11-19 08:40:19 +00:00
l10n daemon script
0e13fb9833 SVN_SILENT made messages (.desktop file) 2014-11-14 09:03:12 +00:00
l10n daemon script
43049221ab SVN_SILENT made messages (.desktop file) 2014-11-12 08:52:06 +00:00
l10n daemon script
4390aa5536 SVN_SILENT made messages (.desktop file) 2014-11-10 08:26:37 +00:00
l10n daemon script
37a97d41c0 SVN_SILENT made messages (.desktop file) 2014-11-09 08:55:12 +00:00
l10n daemon script
fa21d7b1c5 SVN_SILENT made messages (.desktop file) 2014-11-05 08:37:57 +00:00
l10n daemon script
1a4b23f845 SVN_SILENT made messages (.desktop file) 2014-11-04 10:53:50 +00:00
l10n daemon script
481e796e67 SVN_SILENT made messages (.desktop file) 2014-11-02 21:49:13 +00:00
l10n daemon script
77b0b83a85 SVN_SILENT made messages (.desktop file) 2014-11-02 08:56:23 +00:00
Marco Martin
72b9a37fe9 fix test
Change-Id: Ib7698dfe3880e23355fd1c0acfcc3de2cc7c4d2d
2014-10-31 18:11:16 +01:00
Marco Martin
ad06e7c8a2 minor message fixes
Change-Id: I050b2e70ad1d9a57eb99c0f8fd34a80b76b66736
2014-10-31 17:29:33 +01:00
Marco Martin
cef6b23e74 proper icon in notifications
Change-Id: I10832bf91a7a5a605ae27d6a417931f9462c1b78
2014-10-30 18:12:48 +01:00
Marco Martin
73500516ff track changes in destroyed()
Change-Id: Ibc4dcc64028e1127dd55e7c7d4d73000d2964dab
2014-10-30 18:06:50 +01:00
Marco Martin
f870ea1a11 drop QwaitingDeletionStatus
emit appletRemoved and appletAdded instead, making the graphics representation
(almost) just work

Change-Id: I481dbbb4dbf7d01a121b92511410dfee79b16469
2014-10-30 18:06:50 +01:00
Marco Martin
781d30cfef plasmoid->widget
Change-Id: I531297523a41886229cec163c5f81004fe15e7c0
2014-10-29 11:12:23 +01:00
Marco Martin
4487261d1a use NULLPTR
Change-Id: I5fcf9a16e962dda74f411b71f5276320e8196ac0
2014-10-29 11:09:59 +01:00
Marco Martin
e2f06e9ece restore to the actual previous status
Change-Id: I43b7f5812daffe2b846fbc1f7b57d6db51961358
2014-10-29 11:06:20 +01:00
Marco Martin
30d3ab72d1 pretty header
Change-Id: I08bf321d79e6c6c8bc50e5181472ec2c719e1a3f
2014-10-29 11:03:20 +01:00
Marco Martin
9aea733bb5 deleted->removed
Change-Id: I45102fa7585744943a6b107e68208141712866bc
2014-10-29 10:52:24 +01:00
Marco Martin
d44d194db6 only a minute before real deletion
Change-Id: Ibc90aae44e7013453c8a96a3f22522806cb12ef2
2014-10-28 19:08:03 +01:00
Marco Martin
099a22d9da irreversibly delete on notification close
Change-Id: I3216286a707a1904b6917bfd19c007f99ffa4475
2014-10-28 19:07:53 +01:00
Marco Martin
eee9a90aab remove dead code
Change-Id: Id8daeafa77dabea7253ac5c489ad761ba0c6fdf6
2014-10-28 19:07:43 +01:00
Marco Martin
d901062d9d Plasma instead of PlasmaShell
Change-Id: I19ac45d8ee9d82a7bb7cc466a89db746b5f38784
2014-10-28 19:07:33 +01:00
Marco Martin
2475a2560e really delete awaiting applets on quit
Change-Id: I3b9107f988bde75262f27c1fd7e851b868140ccf
2014-10-28 19:07:09 +01:00
Marco Martin
af6149c9d0 use notifications actions to undo
Change-Id: I4b9abf6047b94b4fc13aad672d1bc8e97203f502
2014-10-28 19:06:55 +01:00
Marco Martin
5252020318 very basic prototype for delete undo
the idea is to just hide applets at first and then offer a really delete and undo buttons

Change-Id: I4d869cb58f5c0fb0163d5d4d6b265af860d8727e
2014-10-28 19:06:42 +01:00
l10n daemon script
150f24b30c SVN_SILENT made messages (.desktop file) 2014-10-27 08:35:46 +00:00
l10n daemon script
4a4e3dc526 SVN_SILENT made messages (.desktop file) 2014-10-23 08:55:08 +00:00
Marco Martin
f278416753 Revert "very basic prototype for delete undo"
This reverts commit f8ba97ae3e.
2014-10-22 17:01:15 +02:00
Marco Martin
f8ba97ae3e very basic prototype for delete undo
the idea is to just hide applets at first and then offer a really delete and undo buttons

Change-Id: I4d869cb58f5c0fb0163d5d4d6b265af860d8727e
2014-10-22 16:59:59 +02:00
l10n daemon script
b65201b735 SVN_SILENT made messages (.desktop file) 2014-10-15 08:33:00 +00:00
Marco Martin
aa7b3ff773 typo
Change-Id: Ia8dd4676cb45166bfc5f5e55b3c30a15f895d39f
2014-10-11 21:04:10 +02:00
Marco Martin
66a1a497ef add a property to tell if fallback happened
add a property in Svg (and framesvgitem) to tell if the current theme
has this image, or if some fallback did happen
useful for items that are better not displayed than showing the potentially different
default theme

Change-Id: Ib914c0e196c5c941d35d9a600cc7d38818fc754f
2014-10-10 17:36:44 +02:00
Martin Klapetek
cbe50c408b Add "..." after "<Applet Name> Settings" to comply with HIG
Reviewed-by: Marco Martin

BUG: 339756
2014-10-07 17:45:10 +02:00
Volker Krause
ca77cad251 Make constants const, saves a few symbols in the .data section. 2014-09-28 12:40:40 +02:00
l10n daemon script
88ccf7be3d SVN_SILENT made messages (.desktop file) 2014-09-22 08:34:39 +00:00
l10n daemon script
f12eb638f0 SVN_SILENT made messages (.desktop file) 2014-09-19 09:02:03 +00:00
Marco Martin
919694a1de get rid of internal ShellPackage
ShellPackage is a plugin in plasma-workspace now, don't duplicate

Change-Id: I77edf63acf6c99314f6062d7ef2f55a129727013
2014-09-15 18:20:34 +02:00
Marco Martin
37b34711d8 make sure applets are sorted by id
As with containment, make sure Containment::applets()
is always sorted by id, to have the least sursprises possible

it adds a test

Change-Id: Ib1aeeff7c70bb6969b32b2fef8557889a43edf09
2014-09-15 17:55:36 +02:00
Marco Martin
a159208d54 Ensure corona::containments() is ordered
the order in which containments were restored used to be quite random:
ensure that's ordered by id this makes the shell startups be more reproduceable
from one to another, if a new containment arrives, ensure it's inserted
maintaining id order

containment::appelts() will need the same treatment

adds a test as well that checks the order is right

Change-Id: Ie1b278e5b83d7e3645f7293bf6d030aa7f43a221
2014-09-15 17:28:38 +02:00
Marco Martin
052a0c32ae base on screen() to see what containment is loading
if a containment's lastScreen is not -1 (and a valid screen)
*and* its activity() is not the current one, its QML
will *not* be loaded, therefore it would dangle blocking
corona::startupCompleted until the activity is selected

Change-Id: I6757d29240a012377e9ff0a22fe16541ea712ee6
2014-09-15 14:49:18 +02:00
Marco Martin
0b0daa2318 ensure empty containment emit uiReady()
Containments with no applets will emit uiReady now

It adds a test as well that checks if this is the case.

There is still a case where the corona doesn't emit startupCompleted()
that's when there is more than one activity, but that, as well the test
will be adressed by another patch on a different part.

Change-Id: I4d83aa612c29fb0f441d11681bc5aba241370bc3
2014-09-13 12:41:24 +02:00
l10n daemon script
edc9eae84b SVN_SILENT made messages (.desktop file) 2014-09-10 08:47:20 +00:00
l10n daemon script
dc61b4d5c2 SVN_SILENT made messages (.desktop file) 2014-09-04 08:36:35 +00:00
l10n daemon script
cf93514991 SVN_SILENT made messages (.desktop file) 2014-09-02 10:43:04 +00:00
Marco Martin
8c8bd49130 Merge branch 'mart/packageFallback'
REVIEW:120029
2014-09-01 20:59:22 +02:00
Marco Martin
6be2e9d46d use non const pointers 2014-09-01 19:23:18 +02:00
Marco Martin
399156bccc fix the sycoca query 2014-09-01 19:01:32 +02:00
Marco Martin
5db7db4ae2 crash-- 2014-09-01 16:26:34 +02:00
Marco Martin
325ea71a2e remove the fallback from the metadata 2014-09-01 16:01:10 +02:00
Marco Martin
5ceb8d1197 add an autotest for fallback
correct a couple of problems the test catched
2014-09-01 15:51:05 +02:00
Marco Martin
55a6095138 use Floyd cycle detection 2014-09-01 15:15:54 +02:00
Marco Martin
21cf68dbd2 set directly the fallback package not its path 2014-09-01 14:54:10 +02:00
Marco Martin
aba4dcb915 introduce setFallbackPackagePath
the fallback package would then be decided by the packagestructure
2014-09-01 14:00:06 +02:00
Nicolás Alvarez
51b77bcd59 Don't use QStringLiteral when concatenating string literals.
QStringLiteral("foo" "bar") is documented not to work on MSVC.
2014-08-30 14:46:36 -03:00
Nicolás Alvarez
8515d0ef09 Fix reference to Types::ImmutabilityType.
I don't know how Types::Types::ImmutabilityType even worked in gcc...
2014-08-30 14:45:50 -03:00
Aaron Seigo
faf75a95e5 ws for readability
REVIEW:119992
2014-08-29 17:24:43 +02:00
Aaron Seigo
cd87344d80 make PackageStructure plugins use the json method as with DataEngines 2014-08-29 17:24:43 +02:00
Aaron Seigo
aa99a4f15c tidy up the data engine plugin loading code 2014-08-29 17:24:43 +02:00
Aaron Seigo
67cab00bf3 remove the unused ContainmentPackage 2014-08-29 17:24:43 +02:00
Marco Martin
f934b3b6d6 make sure to cleanup applet pointers on deletion 2014-08-29 14:53:56 +02:00
Aaron Seigo
d5f156e968 add an interactive console QML definition 2014-08-28 11:52:49 +02:00
l10n daemon script
ce814a5285 SVN_SILENT made messages (.desktop file) 2014-08-28 08:49:15 +00:00
Marco Martin
5b9bb128d8 ckeck for loops or too deep fallback chains 2014-08-27 17:39:32 +02:00
Aaron Seigo
0401da9ec8 give the applet alternatives QML file an entry 2014-08-26 16:26:07 +02:00