[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:25 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=66997ae
The following commit has been merged in the master branch:
commit 66997aeddaaa7cd88d0b76879bc3168a01852c53
Author: Aleix Pol <aleixpol at kde.org>
Date: Mon Aug 13 15:32:50 2012 +0200
Let the plasmoid appear properly if instanciated from plasma
And without being shown in the Taskbar and Pager
REVIEW: 105997
BUG: 302440
---
plasmoid/declarative-plugin/CMakeLists.txt | 1 +
.../declarative-plugin/hidewindowcomponent.cpp | 16 +++++++-----
.../declarative-plugin/hidewindowcomponent.h | 30 ++++++++++------------
plasmoid/declarative-plugin/qml-plugins.cpp | 2 ++
.../org.kde.ktp-chatplasmoid/contents/ui/main.qml | 8 ++++--
5 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/plasmoid/declarative-plugin/CMakeLists.txt b/plasmoid/declarative-plugin/CMakeLists.txt
index 413692c..48ba8a7 100644
--- a/plasmoid/declarative-plugin/CMakeLists.txt
+++ b/plasmoid/declarative-plugin/CMakeLists.txt
@@ -8,6 +8,7 @@ set(ktpchatqmlplugin_SRCS
conversation-target.cpp
conversations-model.cpp
conversation-que-manager.cpp
+ hidewindowcomponent.cpp
)
include_directories(
diff --git a/lib/abstract-message-filter.cpp b/plasmoid/declarative-plugin/hidewindowcomponent.cpp
similarity index 69%
copy from lib/abstract-message-filter.cpp
copy to plasmoid/declarative-plugin/hidewindowcomponent.cpp
index 2a3a897..2cf2796 100644
--- a/lib/abstract-message-filter.cpp
+++ b/plasmoid/declarative-plugin/hidewindowcomponent.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Lasath Fernando <kde at lasath.org>
+ Copyright (C) 2012 Aleix Pol Gonzalez <aleixpol at blue-systems.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,13 +16,15 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "abstract-message-filter.h"
+#include "hidewindowcomponent.h"
+#include <kwindowsystem.h>
+#include <QDebug>
-AbstractMessageFilter::AbstractMessageFilter(QObject* parent)
+HideWindowComponent::HideWindowComponent(QObject* parent)
: QObject(parent)
-{
-}
+{}
-AbstractMessageFilter::~AbstractMessageFilter()
+void HideWindowComponent::hideWindowFromTaskbar(qulonglong winId)
{
-}
\ No newline at end of file
+ KWindowSystem::setState(winId, NET::SkipTaskbar | NET::SkipPager);
+}
diff --git a/lib/filters.h b/plasmoid/declarative-plugin/hidewindowcomponent.h
similarity index 61%
copy from lib/filters.h
copy to plasmoid/declarative-plugin/hidewindowcomponent.h
index 4e96ae0..b408022 100644
--- a/lib/filters.h
+++ b/plasmoid/declarative-plugin/hidewindowcomponent.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012 Lasath Fernando <kde at lasath.org>
+ Copyright (C) 2012 Aleix Pol Gonzalez <aleixpol at blue-systems.com>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -16,25 +16,23 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef FILTERS_H
-#define FILTERS_H
-
-#include "abstract-message-filter.h"
+#ifndef HIDEWINDOWCOMPONENT_H
+#define HIDEWINDOWCOMPONENT_H
#include <QObject>
-class UrlFilter : public AbstractMessageFilter
-{
-public:
- explicit UrlFilter(QObject *parent = 0);
- void filterMessage(Message &message);
-};
+/**
+ * Plasma is not exposing such a feature to make its dialogs hidden from the taskbar,
+ * that's why we added that weird object
+ */
-class EscapeFilter : public AbstractMessageFilter
+class HideWindowComponent : public QObject
{
-public:
- explicit EscapeFilter(QObject *parent = 0);
- virtual void filterMessage(Message& message);
+ Q_OBJECT
+ public:
+ explicit HideWindowComponent(QObject* parent = 0);
+
+ Q_SCRIPTABLE void hideWindowFromTaskbar(qulonglong winId);
};
-#endif
+#endif // HIDEWINDOWCOMPONENT_H
diff --git a/plasmoid/declarative-plugin/qml-plugins.cpp b/plasmoid/declarative-plugin/qml-plugins.cpp
index c788c4e..23a4291 100644
--- a/plasmoid/declarative-plugin/qml-plugins.cpp
+++ b/plasmoid/declarative-plugin/qml-plugins.cpp
@@ -26,6 +26,7 @@
#include "telepathy-text-observer.h"
#include "conversations-model.h"
#include "conversation-target.h"
+#include "hidewindowcomponent.h"
void QmlPlugins::registerTypes(const char *uri)
{
@@ -33,6 +34,7 @@ void QmlPlugins::registerTypes(const char *uri)
// can be given to ChatWidget.qml
qmlRegisterType<TelepathyTextObserver> (uri, 0, 1, "TelepathyTextObserver");
qmlRegisterType<Conversation>(uri, 0, 1, "Conversation");
+ qmlRegisterType<HideWindowComponent>(uri, 0, 1, "HideWindowComponent");
//needed for MessageType enum
qmlRegisterUncreatableType<MessagesModel>(uri, 0, 1, "MessagesModel",
diff --git a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
index ffdd42e..2d60a57 100644
--- a/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
+++ b/plasmoid/org.kde.ktp-chatplasmoid/contents/ui/main.qml
@@ -38,6 +38,10 @@ ListView {
id: handler
}
+ HideWindowComponent {
+ id: windowHide
+ }
+
highlight: Item {
ExtraComponents.QIconItem {
anchors {
@@ -67,8 +71,7 @@ ListView {
//FIXME: put in a loader to not slow down the model
PlasmaCore.Dialog {
id: dialog
- //Set as a Tool window to bypass the taskbar
- windowFlags: Qt.WindowStaysOnTopHint | Qt.Tool
+ windowFlags: Qt.WindowStaysOnTopHint
visible: base.currentIndex==index
mainItem: ChatWidget {
@@ -83,6 +86,7 @@ ListView {
onVisibleChanged: {
if(visible) {
+ windowHide.hideWindowFromTaskbar(dialog.windowId)
var point = dialog.popupPosition(convButton, Qt.AlignBottom);
console.log("Showing dialog at (" + point.x + "," + point.y + ")");
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list