Commit 148a9d15 authored by Benjamin Port's avatar Benjamin Port

Delete windows runner, now part of KWin as a dbus runner

parent cb47835d
......@@ -19,7 +19,6 @@ endif()
if(NOT WIN32)
add_subdirectory(powerdevil)
add_subdirectory(sessions)
add_subdirectory(windows)
add_subdirectory(kill)
endif()
#
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_runner_windows\")
set(krunner_windows_SRCS
windowsrunner.cpp
)
add_library(krunner_windows MODULE ${krunner_windows_SRCS})
kcoreaddons_desktop_to_json(krunner_windows plasma-runner-windows.desktop)
target_link_libraries(krunner_windows Qt5::Widgets KF5::WindowSystem KF5::I18n KF5::Runner)
configure_file(config-windowsrunner.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-windowsrunner.h)
if(HAVE_X11)
target_link_libraries(krunner_windows ${X11_LIBRARIES} XCB::XCB )
target_link_libraries(krunner_windows Qt5::X11Extras)
endif()
install(TARGETS krunner_windows DESTINATION "${KDE_INSTALL_PLUGINDIR}/kf5/krunner" )
#! /usr/bin/env bash
$XGETTEXT *.cpp -o $podir/plasma_runner_windows.pot
/* Define if you have X11 at all */
#cmakedefine01 HAVE_X11
[Desktop Entry]
# ctxt: plasma runner
Name=Windows
Name[ar]=النوافذ
Name[ast]=Ventanes
Name[az]=Pəncərələr
Name[bg]=Прозорци
Name[bn]=উইণ্ডো
Name[bs]=Prozori
Name[ca]=Finestres
Name[ca@valencia]=Finestres
Name[cs]=Okna
Name[csb]=Òkna
Name[da]=Vinduer
Name[de]=Fenster
Name[el]=Παράθυρα
Name[en_GB]=Windows
Name[eo]=Fenestroj
Name[es]=Ventanas
Name[et]=Aknad
Name[eu]=Leihoak
Name[fa]=پنجره‌ها
Name[fi]=Ikkunat
Name[fr]=Fenêtres
Name[fy]=Finsters
Name[ga]=Fuinneoga
Name[gl]=Xanelas
Name[gu]=વિન્ડોઝ
Name[he]=חלונות
Name[hi]=विंडोज़
Name[hr]=Prozori
Name[hu]=Ablakok
Name[ia]=Fenestras
Name[id]=Windows
Name[is]=Gluggar
Name[it]=Finestre
Name[ja]=ウィンドウ
Name[kk]=Терезелер
Name[km]=បង្អួច
Name[kn]=ಕಿಟಕಿಗಳು
Name[ko]=창
Name[lt]=Langai
Name[lv]=Logi
Name[mk]=Прозорци
Name[ml]=ജാലകങ്ങള്‍
Name[mr]=चौकटी
Name[nb]=Vinduer
Name[nds]=Finstern
Name[nl]=Vensters
Name[nn]=Vindauge
Name[pa]=ਵਿੰਡੋਆਂ
Name[pl]=Okna
Name[pt]=Janelas
Name[pt_BR]=Janelas
Name[ro]=Ferestre
Name[ru]=Окна
Name[si]=කවුළු
Name[sk]=Okná
Name[sl]=Okna
Name[sr]=прозори
Name[sr@ijekavian]=прозори
Name[sr@ijekavianlatin]=prozori
Name[sr@latin]=prozori
Name[sv]=Fönster
Name[th]=หน้าต่างต่าง ๆ
Name[tr]=Pencereler
Name[ug]=كۆزنەكلەر
Name[uk]=Вікна
Name[vi]=Cửa sổ
Name[wa]=Finiesses
Name[x-test]=xxWindowsxx
Name[zh_CN]=窗口
Name[zh_TW]=視窗
Comment=List windows and desktops and switch them
Comment[ar]=اسرد النوافذ وأسطح المكتب وبدّل بينها
Comment[az]=Pəncərələrin, İş Masalarının siyahısı və onlar arası keçid
Comment[bg]=Показване и превключване на прозорци и работни плотове
Comment[bs]=Nabrajanje i prebacivanje između prozora i površî
Comment[ca]=Llista finestres i escriptoris, i canvia entre ells
Comment[ca@valencia]=Llista finestres i escriptoris i canvia entre ells
Comment[cs]=Seznam oken a ploch k přepínání
Comment[da]=Oplist vinduer og skriveborde og skift mellem dem
Comment[de]=Listet Fenster und Arbeitsflächen auf und wechselt zwischen ihnen.
Comment[el]=Εμφάνιση λίστας παραθύρων και επιφανειών εργασίας για εναλλαγή
Comment[en_GB]=List windows and desktops and switch them
Comment[eo]=Listi fenestrojn kaj labortablojn kaj ŝanĝi ilin
Comment[es]=Lista ventanas y escritorios y cambia entre ellos
Comment[et]=Akende ja töölauade näitamine võimalusega neile lülituda
Comment[eu]=Zerrendatu leihoak eta mahaigainak, eta batetik bestera aldatu
Comment[fi]=Luettele ikkunat ja työpöydät ja vaihda niitä
Comment[fr]=Liste les fenêtres / bureaux et passe de l'un à l'autre
Comment[fy]=Sommet finsters en buroblêden en wikselt har
Comment[ga]=Taispeáin fuinneoga agus deasca agus athraigh eatarthu
Comment[gl]=Lista as xanelas e escritorio e salta entre eles
Comment[he]=משמש להצגת חלונות ושולחנות עבודה ולהחלפה ביניהם
Comment[hr]=Popis prozora i radnih površina za laku promjenu među njima
Comment[hu]=Kilistázza az ablakokat és asztalokat, és vált rájuk
Comment[ia]=Lista fenestras e scriptorios e commuta los
Comment[id]=Daftar window dan desktop dan alihkan mereka
Comment[is]=Telur upp glugga og skjáborð og skiptir á milli þeirra
Comment[it]=Elenca e passa tra le finestre ed i desktop
Comment[ja]=ウィンドウとデスクトップの一覧表示と切り替えを行います
Comment[kk]=Бар терезе мен үстелдерді ұсынып оларға ауысу
Comment[km]=រាយ​​បង្អួច និង​ផ្ទៃតុ​ ហើយ​ប្ដូរ​ពួកវា
Comment[kn]=ವಿಂಡೊ ಹಾಗು ಗಣಕತೆರೆಗಳನ್ನು ಪಟ್ಟಿಮಾಡು ಹಾಗು ಅವುಗಳನ್ನು ಬದಲಾಯಿಸು
Comment[ko]=창 및 바탕 화면 목록을 보여 주고 전환합니다
Comment[lt]=Išvardyti langus ir darbalaukius bei perjungti į juos
Comment[lv]=Parāda logus un darbvirsmas un pārslēdz tos
Comment[mk]=Приказ на прозорци и раб. површини и преминување меѓу нив
Comment[ml]=ജാലകങ്ങളും പണിയിടങ്ങളും പട്ടികയായി കണ്ടു് പരസ്പരം മാറുക
Comment[mr]=वेगळ्या चौकट व डेस्कटॉप वर जाण्यासाठी यादी दर्शवा व बदला
Comment[nb]=List vinduer og skrivebord og bytt mellom dem
Comment[nds]=Finstern un Schriefdischen oplisten un wesseln
Comment[nl]=Toon vensters en bureaubladen en schakel ze om
Comment[nn]=Vis vindauge og skrivebord, og byt mellom dei
Comment[pa]=ਵਿੰਡੋ ਅਤੇ ਡੈਸਕਟਾਪ ਦੀ ਲਿਸਟ ਅਤੇ ਉਹਨਾਂ ਵਿੱਚ ਬਦਲੋ
Comment[pl]=Wypisuje okna i pulpity oraz przełącza pomiędzy nimi
Comment[pt]=Listar as janelas e ecrãs e mudar entre eles
Comment[pt_BR]=Lista as janelas e áreas de trabalho e alterna entre elas
Comment[ro]=Enumeră ferestre și birouri și le comută
Comment[ru]=Список окон и рабочих столов с возможностью переключения между ними
Comment[si]=කවුළු හා වැඩතල ලැයිස්තුගත කර ඒවා මාරුකරන්න
Comment[sk]=Zoznam okien a plôch a ich prepínanie
Comment[sl]=Seznam oken in namizij ter preklop med njimi
Comment[sr]=Набрајање и пребацивање између прозора и површи̂
Comment[sr@ijekavian]=Набрајање и пребацивање између прозора и површи̂
Comment[sr@ijekavianlatin]=Nabrajanje i prebacivanje između prozora i površî
Comment[sr@latin]=Nabrajanje i prebacivanje između prozora i površî
Comment[sv]=Lista fönster och skrivbord, och byt mellan dem
Comment[th]=รายการหน้าต่างและพื้นที่ทำงานต่าง ๆ ที่สามารถสลับไปใช้งานได้
Comment[tr]=Pencereleri ve masaüstlerini listele ve seç
Comment[ug]=ھەممە كۆزنەكلەر ۋە ئۈستەلئۈستى تىزىمىنى كۆرسىتىپ، ئۇلارنى ئالماشتۇرىدۇ
Comment[uk]=Показує список вікон і стільниць і перемикає їх
Comment[vi]=Liệt kê các cửa sổ và bàn làm việc và chuyển giữa chúng
Comment[wa]=Fé l' djivêye des fniesses eyet des scribannes eyet passer d' n' onk a l' ôte
Comment[x-test]=xxList windows and desktops and switch themxx
Comment[zh_CN]=列出所有窗口和桌面,并可供切换
Comment[zh_TW]=列出視窗與桌面並切換
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
Icon=preferences-system-windows
X-KDE-PluginInfo-Author=Martin Gräßlin
X-KDE-PluginInfo-Email=kde@martin-graesslin.com
X-KDE-PluginInfo-Name=windows
X-KDE-PluginInfo-Version=1.0
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
X-Plasma-AdvertiseSingleRunnerQueryMode=true
This diff is collapsed.
/***************************************************************************
* Copyright 2009 by Martin Gräßlin <kde@martin-graesslin.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#ifndef WINDOWSRUNNER_H
#define WINDOWSRUNNER_H
#include <KRunner/AbstractRunner>
#include <QMutex>
class KWindowInfo;
class WindowsRunner : public Plasma::AbstractRunner
{
Q_OBJECT
public:
WindowsRunner(QObject* parent, const QVariantList &args);
~WindowsRunner() override;
void match(Plasma::RunnerContext& context) override;
void run(const Plasma::RunnerContext& context, const Plasma::QueryMatch& match) override;
private Q_SLOTS:
void prepareForMatchSession();
void matchSessionComplete();
void gatherInfo();
private:
enum WindowAction {
ActivateAction,
CloseAction,
MinimizeAction,
MaximizeAction,
FullscreenAction,
ShadeAction,
KeepAboveAction,
KeepBelowAction
};
Plasma::QueryMatch desktopMatch(int desktop, qreal relevance = 1.0);
Plasma::QueryMatch windowMatch(const KWindowInfo& info, WindowAction action, qreal relevance = 1.0,
Plasma::QueryMatch::Type type = Plasma::QueryMatch::ExactMatch);
bool actionSupported(const KWindowInfo& info, WindowAction action);
QHash<WId, KWindowInfo> m_windows; // protected by m_mutex
QHash<WId, QIcon> m_icons; // protected by m_mutex
QStringList m_desktopNames; // protected by m_mutex
QMutex m_mutex;
bool m_inSession : 1; // only used in the main thread
};
#endif // WINDOWSRUNNER_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment