Commit Graph

64 Commits (0c266e760bfe5d3b4f5745b538c93fc363996981)

Author SHA1 Message Date
Vlad Zahorodnii 0c266e760b Replace remaining usages of old connect syntax with new connect syntax
This change replaces the remaining usages of the old connect syntax with
the new connect syntax.

Unfortunately, there are still places where we have to use SIGNAL() and
SLOT() macros, for example the stuff that deals with d-bus business.

Clazy was used to create this change. There were a few cases that needed
manual intervention, the majority of those cases were about resolving
ambiguity caused by overloaded signals.
2020-09-24 09:33:45 +00:00
Vlad Zahorodnii bfb257c9ed kcmkwin/tabbox: Port away from deprecated KTitleWidget::setPixmap()
KTitleWidget::setPixmap(MessageType, ImageAligment) has been deprecated
in favor of KTitleWidget::setIcon() method.
2020-09-09 13:53:26 +00:00
Aleix Pol 8810bf3408 Remove unneeded includes of QDesktopWidget 2020-08-14 16:48:19 +02:00
Vlad Zahorodnii 4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00
Cyril Rossi 3284e19646 KCM KWinTabbox disable widget if property is immutable.
Summary:
Some widget cannot be managed by KCModule, so we have to disable the widget if the property is immutable.
Remove unused parameter in `createConnections()`

Test Plan: Add [$i] right after the key or group in kwinrc, the widget should be disabled.

Reviewers: #kwin, ervin, bport, meven, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28484
2020-04-14 14:08:36 +02:00
Cyril Rossi 51a1e06dfc KCM KWinTabBox manage KCModule states
Summary:
Following D27323, manage KCModule states for reinitialize/defaults/apply

Also, this should solve :

BUG: 414567
BUG: 387160
FIXED-IN: 5.19

Reviewers: #kwin, ervin, bport, meven, zzag

Reviewed By: #kwin, ervin, meven, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27784
2020-04-01 11:01:49 +02:00
Aleix Pol cca0e15b45 Fix compiler warnings
Summary: No need to keep them around for no reason.

Test Plan: Tested the plugins I thought could be affected. Have been using it for a couple of days without problems

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28062
2020-03-17 15:07:52 +01:00
Cyril Rossi c0afbb2cf8 KCM KWinTabBox port to KConfigXT : use generated kcfg settings to load and save config
Reviewers: ervin, bport, meven, #kwin, zzag

Reviewed By: meven, #kwin, zzag

Subscribers: zzag, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27323
2020-02-18 14:11:55 +01:00
Nicolas Fella 0789539a9b Remove some unused includes
Test Plan: Builds

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D25243
2019-11-10 20:26:35 +01:00
Vlad Zagorodniy 09f2d95a9c Don't use deprecated QDesktopWidget
Summary:
QApplication::desktop() is deprecated. It is advised to use
QGuiApplication::screens() instead.

Reviewers: #kwin, apol

Reviewed By: apol

Subscribers: apol, davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D22379
2019-07-10 22:50:41 +03:00
Nate Graham 9a59e3fb6c [KCMs] move GHNS buttons to the normal location
Summary:
All other KCMs have their {nav Get New [things]...} buttons in the bottom-right corner. This patch adjusts KWin's KCMs to adopt the same convention there too.

With this patch, all KCMs will have their GHNS buttons in the same location.

Closes T9954

Test Plan:
{F6375278}

{F6375277}

{F6375276}

{F6375275}

Reviewers: #kwin, #vdg, zzag

Reviewed By: #kwin, zzag

Subscribers: Codezela, kwin, kde-doc-english

Tags: #kwin, #documentation

Maniphest Tasks: T9954

Differential Revision: https://phabricator.kde.org/D16537
2018-10-31 07:29:22 -06:00
David Edmundson ce32b031f5 [kcmkwin/kwindesktop] Fix global shortcut's display name for kwin changing
Summary:
KGlobalAcceld stores actions grouped by ID and a single display name.
When an action with a given id changes, the display names change for all
actions in that
group.

The KCM sets the ID to "kwin" but does not explicitly set a display
name. This means it is automatically deduced which will be kcmshell or
systemsettings.

The end result is all kwin shortcuts get renamed in system setting's
global shortcuts UI until kwin is restarted.

This patch explicitly sets the dispay name.

BUG: 400248
Fixed-in: 5.15.0

Test Plan:
Changed virtual desktops
Checked global shortcut settings still listed kwin as kwin

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16418
2018-10-30 21:16:20 +00:00
David Edmundson a3cff85e7a Remove Qt module declarations in includes
Summary:
Test Plan: Compiles

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D13359
2018-06-05 18:07:23 +01:00
Marco Martin 405518c41d use proper packagestructures
Summary:
as the plasmapkg2 utility is dead, scripts and tabboxes couldn't
be installed anymore, as plasmapkg2 was launched with an hardcoded
package type (and had a bunch of custom code for it)
and no packagestructure for the relevant package types existed.

the port of scripts and tabboxes to kpackage in kwin is quite
incomplete and somewhat strange (given the fact that was started by
looking manually for the file as it couldn't link to libplasma)

this makes things a bit better as now scripts and tabboxes have an actual
package structure, making it installable by kpackagetool5.
in the future, the port should be completed and replace all the manual lookup
of files with package::filePath as it should work now given that valid
structures exist

BUG:374766

Test Plan:
tabbox plugins and kwin scripts can be installed from knewstuff
again and can be successfully loaded

Reviewers: #plasma, graesslin, subdiff

Reviewed By: #plasma, graesslin

Subscribers: graesslin, plasma-devel, kwin, #kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D4202
2017-01-20 15:34:56 +01:00
Martina Flöser 4d669b1912 Port Plasma::Package to KPackage
Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3814
2016-12-26 17:41:06 +01:00
Nick Shaforostoff 3a8d7d866a optimize string operations
-use qstringliteral only when necessary (i.e. not in concat or comparison)
-use qbytearray instead of qstring when dealing with latin1 input and output (glplatform)
-use qstringref to extract numbers from strings (glplatform)
-define qt_use_qstringbuilder to optimize all string concatenations
-anidata: use ctor init lists, add windowType member initialization

REVIEW: 125933
2015-11-05 14:14:06 +00:00
Sebastian Kügler 69fccf9c28 Fix loading of effect config plugins
X-KDE-ParentComponents is a list, so we have to check if this list
contains the plugin, not do a string comparison. It seems the
queryparser has become a bit stricter in this case. This query should be
fixed anyway, however, and it fixes a fairly important bug in the effect
system.

REVIEW:122821
2015-03-06 12:22:05 +01:00
Martin Gräßlin 26cf3195be [kcmkwin/tabbox] Find all layouts in lnf package
First try to locate all look-and-feel packages and check whether
they provide a WindowSwitcher. If they do they are inserted in
the list with the Package name being the user visible name.
So the good old sidebar is now called "Breeze".

REVIEW: 120914
2014-11-24 10:39:26 +01:00
Martin Gräßlin 0eaf41df85 [kcmkwin/tabbox] Reconfigure Effects after saving configuration
After saving the configuration the settings for CoverSwitch or FlipSwitch
might have changed. Thus call a reconfigure on them.
2014-05-22 15:36:17 +02:00
Martin Gräßlin 1a36364a05 [kwin/tabbox] New default window switcher layout is sidebar
CCMAIL: plasma-devel@kde.org
2014-05-22 09:00:42 +02:00
Martin Gräßlin 336a870f5e [kcmkwin] Fix locating the effect configurations
No longer in kf5/ prefix.
2014-04-28 14:06:18 +02:00
Martin Gräßlin 7fcecc616c Drop "kwin4_effect_" prefix for BuiltIn Effects
This removes all the hacks to add kwin4_effect_ to the name of the Effect
and adjusts the desktop files of the effect configuration's parent
component.

Note: the scripted effects still start with kwin4_effect_ prefix.

REVIEW: 117367
2014-04-28 13:52:50 +02:00
Martin Gräßlin 4da220adef [kcmkwin/tabbox] Use BuiltInEffects to find CoverSwitch and FlipSwitch
Instead of using the KServiceTypeTrader we use the BuiltInEffects to get
the name of CoverSwitch and FlipSwitch.

Showing the configuration dialog is migrated to KPluginTrader which fixes
the showing of the dialog.
2014-04-28 13:51:30 +02:00
Martin Gräßlin 18a37d7ee8 [kwin] Fix includes of kde4support headers
* drop unused headers
* use QExplicitlySharedDataPointer instead of KSharedPointer
* drop KDE/ from includes
2014-03-18 14:34:36 +01:00
Martin Gräßlin 642f643dff [kwin/kcmtabbox] Port away from kde4_add_ui_files 2014-03-18 11:51:35 +01:00
Martin Gräßlin 930a6b5e05 Ensure the KDE4Support KNS headers are not included
This should hopefully unbreak the Jenkins build.
2014-01-15 20:32:40 +01:00
Matteo De Carlo aad36da80b Replace NULL with nullptr in kcmkwin
Replacing all NULL to nullptr in all the files in kcmkwin folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 114803
2014-01-08 10:30:38 +01:00
Martin Gräßlin 058a5da2dd [kcm-kwintabbox] Adjust Preview to the new Switcher API
Needs to implement a dummy switcher item. As the root item of the
switchers are no longer QQuickItem derived it cannot use a QQuickView.
Instead a component gets created and the switcher is just shown on the
primary screen. It's a more appropriate preview now which is not
put into a dialog window.

To make it more realistic (and to be able to dismiss it) the preview
grabs keyboard and mouse and closes itself if escape, return, enter or
space is pressed.

As well clicking outside the preview window closes the preview.
2013-12-12 11:19:16 +01:00
Aleix Pol f8468b4043 Drop KDE4Support in kde-workspace/kwin
REVIEW: 114316
2013-12-05 20:24:02 +01:00
Martin Gräßlin db89652175 [kcmtabbox] Preview goes QtQuick
QQuickView instead of a QDeclarativeView. As background a white element
is used.
2013-10-01 07:15:11 +02:00
Martin Gräßlin 06033f1263 [kcmtabbox] Fix includes 2013-09-30 15:13:14 +02:00
Martin Gräßlin 5c23434b6d [kcmtabbox] Adjust to new API
* no componentData()
* no insertCatalog()
2013-09-30 15:11:34 +02:00
Martin Gräßlin a560147d70 [kcmtabbox] KIcon -> QIcon::fromTheme 2013-09-30 15:09:07 +02:00
Martin Gräßlin 3a54d6bd42 [kcmtabbox] Adjust to new global shortcut handling
* KAction -> QAction
* init of KActionCollection
2013-09-30 15:07:49 +02:00
Anselmo L. S. Melo 00d507b7ff Porting kcmkwin to Qt5/KF5: QStandardPaths
REVIEW: 111975
2013-08-13 17:55:49 -03:00
Sebastian Kügler 08a53e6a11 Remove K_EXPORT_PLUGIN macros
Include .moc file in configs_builtins.cpp, and reenable the build of the
configs.

REVIEW:111940
2013-08-08 13:47:25 +02:00
Martin Gräßlin badc7a2bc4 Remove show outline from TabBox
It's an option doing pretty much the same as the highlight of selected
window option. But it is known to conflict especially with some Plasma
themes.

BUG: 310935
FIXED-IN: 4.11
REVIEW: 110140
2013-04-24 10:02:57 +02:00
Martin Gräßlin 98a04893a6 Use mgraesslin@kde.org for my mail address in Copyright and AboutData 2013-03-12 13:17:53 +01:00
Martin Gräßlin 5a33974bca Merge branch 'KDE/4.9'
Conflicts:
	plasma/desktop/shell/activitymanager/package/contents/ui/ActivityDelegate.qml
2012-10-24 20:40:07 +02:00
Martin Gräßlin 8176c91b2f Enable GHNS for Window Switcher
Thanks to the new category on kde-look.org we can now show the GHNS
button inside the KCM.

BUG: 297636
FIXED-IN: 4.9.3
REVIEW: 106991
2012-10-24 20:36:05 +02:00
Martin Gräßlin 4782325c4a Remove outdated options from TabBoxConfig
Since the QML port the LayoutMode had been hardcoded to vertical
layout making it a completely useless code-path.

MinWidth/Height are nowadays completely controlled by the QML
theme. They were not read anywhere except in the kcm, but there
not even bound to a ui element.

The selectedItemLayoutName is also not used anymore with the
new themes.
2012-08-10 16:57:25 +02:00
Thomas Lübking 15793ea75c cleanup commented code from 380a739cf83d4459245d4f51bac90819e7b10d24 - afaics there's nothing to change in the core ... 2012-06-01 16:48:13 +02:00
Martin Gräßlin ea5c84dd35 GHNS support for Window Switcher Layouts
Next to the preview/configure button a GHNS button is included
as a simple button with icon only to not break the layout.

Currently the button is not shown as the category on kde-look
has not yet been created yet.

CCBUG: 297636
REVIEW: 104894
2012-05-17 21:18:29 +02:00
Thomas Lübking c8927395ab rework kcmtabbox
BUG: 297639
FIXED-IN:4.9
REVIEW: 104525
2012-05-17 11:41:38 +02:00
Ghislain MARY c66c78f1d2 Key Bindings for Switching between Windows of current Application
Additional TabBox Mode which allows to switch between all open
windows of the current selected application. By default Alt+tilde
is used which is on qwerty just one key above tab. For non-qwerty
layouts the shortcut is unfortunately not convenient.

REVIEW: 104730
FEATURE: 299308
FIXED-IN: 4.9.0
2012-05-10 09:53:10 +02:00
Martin Gräßlin 55480be88b Remove Present Windows from TabBox KCM
Present Windows is nowadays a layout so it should no longer
appear in the effects replacement list.
2012-03-25 11:54:32 +02:00
Stefano Avallone 76c00aa189 Refactor checks for inclusion of TabBoxClients in the client list
REVIEW: 104025
2012-03-05 20:26:35 +01:00
Stefano Avallone 2008982069 Add a Minimized combo box to TabBox
This allows to select whether TabBox should exclude minimized windows,
or only show minimized windows or just don't care about minimized windows.
This is the default and the behavior as it used to be.

Signed-off-by: Stefano Avallone <stavallo@unina.it>

REVIEW: 103698
2012-01-27 07:03:33 +01:00
Martin Gräßlin 2dfc1b0fcd Remove TabBoxConfig::SelectedItemViewPosition - not used anymore
Thanks to updating class diagrams to highlight what I should remove.
2012-01-19 19:45:47 +01:00