From 24eea94d0abf1bfe55e9366d2f5885f740fa5c46 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sun, 4 Nov 2007 12:35:51 +0000 Subject: [PATCH] Move desktop kcm module to kwin as requested by David svn path=/trunk/KDE/kdebase/workspace/; revision=732648 --- kcmkwin/CMakeLists.txt | 2 +- kcmkwin/kwindesktop/CMakeLists.txt | 15 ++ kcmkwin/kwindesktop/Messages.sh | 2 + kcmkwin/kwindesktop/desktop.cpp | 275 ++++++++++++++++++++++++++++ kcmkwin/kwindesktop/desktop.desktop | 200 ++++++++++++++++++++ kcmkwin/kwindesktop/desktop.h | 60 ++++++ 6 files changed, 553 insertions(+), 1 deletion(-) create mode 100644 kcmkwin/kwindesktop/CMakeLists.txt create mode 100644 kcmkwin/kwindesktop/Messages.sh create mode 100644 kcmkwin/kwindesktop/desktop.cpp create mode 100644 kcmkwin/kwindesktop/desktop.desktop create mode 100644 kcmkwin/kwindesktop/desktop.h diff --git a/kcmkwin/CMakeLists.txt b/kcmkwin/CMakeLists.txt index 9396282cd9..4b17ed9b52 100644 --- a/kcmkwin/CMakeLists.txt +++ b/kcmkwin/CMakeLists.txt @@ -3,4 +3,4 @@ add_subdirectory( kwinoptions ) add_subdirectory( kwindecoration ) add_subdirectory( kwinrules ) add_subdirectory( kwincompositing ) - +add_subdirectory( kwindesktop ) diff --git a/kcmkwin/kwindesktop/CMakeLists.txt b/kcmkwin/kwindesktop/CMakeLists.txt new file mode 100644 index 0000000000..c75499524f --- /dev/null +++ b/kcmkwin/kwindesktop/CMakeLists.txt @@ -0,0 +1,15 @@ + +########### next target ############### + +set(kcm_kwindesktop_PART_SRCS desktop.cpp) + +kde4_add_plugin(kcm_kwindesktop ${kcm_kwindesktop_PART_SRCS}) + +target_link_libraries(kcm_kwindesktop ${KDE4_KDE3SUPPORT_LIBS} ${KDE4_KUTILS_LIBS} ) + +install(TARGETS kcm_kwindesktop DESTINATION ${PLUGIN_INSTALL_DIR} ) + + +########### install files ############### +install( FILES desktop.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) + diff --git a/kcmkwin/kwindesktop/Messages.sh b/kcmkwin/kwindesktop/Messages.sh new file mode 100644 index 0000000000..782cec8596 --- /dev/null +++ b/kcmkwin/kwindesktop/Messages.sh @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +$XGETTEXT *.cpp -o $podir/kcm_kwindesktop.pot diff --git a/kcmkwin/kwindesktop/desktop.cpp b/kcmkwin/kwindesktop/desktop.cpp new file mode 100644 index 0000000000..be29eee692 --- /dev/null +++ b/kcmkwin/kwindesktop/desktop.cpp @@ -0,0 +1,275 @@ +// -*- c-basic-offset: 2 -*- +/** + * Copyright (c) 2000 Matthias Elter + * + * 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. + */ + +// Own +#include "desktop.h" + +// Qt +#include +#include +#include +#include +#include +#include +#include + +#ifdef Q_WS_X11 +#include +#endif + +// KDE +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +K_PLUGIN_FACTORY(KWinKcmFactory, + registerPlugin(); + ) +K_EXPORT_PLUGIN(KWinKcmFactory("kcm_kwindesktop")) + +#if 0 +#include "kdesktop_interface.h" +#endif + +// I'm using lineedits by intention as it makes sence to be able +// to see all desktop names at the same time. It also makes sense to +// be able to TAB through those line edits fast. So don't send me mails +// asking why I did not implement a more intelligent/smaller GUI. + +KDesktopConfig::KDesktopConfig(QWidget *parent, const QVariantList &) + : KCModule(KWinKcmFactory::componentData(), parent) +{ + + setQuickHelp( i18n("

Multiple Desktops

In this module, you can configure how many virtual desktops you want and how these should be labeled.")); + + Q_ASSERT(maxDesktops % 2 == 0); + + QVBoxLayout *layout = new QVBoxLayout(this); + layout->setMargin(0); + layout->setSpacing(KDialog::spacingHint()); + + // number group + Q3GroupBox *number_group = new Q3GroupBox(this); + + QHBoxLayout *lay = new QHBoxLayout(number_group); + lay->setMargin(KDialog::marginHint()); + lay->setSpacing(KDialog::spacingHint()); + + QLabel *label = new QLabel(i18n("N&umber of desktops: "), number_group); + _numInput = new KIntNumInput(4, number_group); + _numInput->setRange(1, maxDesktops, 1, true); + connect(_numInput, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int))); + connect(_numInput, SIGNAL(valueChanged(int)), SLOT( changed() )); + label->setBuddy( _numInput ); + QString wtstr = i18n( "Here you can set how many virtual desktops you want on your KDE desktop. Move the slider to change the value." ); + label->setWhatsThis( wtstr ); + _numInput->setWhatsThis( wtstr ); + + lay->addWidget(label); + lay->addWidget(_numInput); + lay->setStretchFactor( _numInput, 2 ); + + layout->addWidget(number_group); + + // name group + Q3GroupBox *name_group = new Q3GroupBox(i18n("Desktop &Names"), this); + + name_group->setColumnLayout(4, Qt::Horizontal); + + for(int i = 0; i < (maxDesktops/2); i++) + { + _nameLabel[i] = new QLabel(i18n("Desktop %1:", i+1), name_group); + _nameInput[i] = new KLineEdit(name_group); + _nameLabel[i+(maxDesktops/2)] = new QLabel(i18n("Desktop %1:", i+(maxDesktops/2)+1), name_group); + _nameInput[i+(maxDesktops/2)] = new KLineEdit(name_group); + _nameLabel[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) ); + _nameInput[i]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+1 ) ); + _nameLabel[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) ); + _nameInput[i+(maxDesktops/2)]->setWhatsThis( i18n( "Here you can enter the name for desktop %1", i+(maxDesktops/2)+1 ) ); + + connect(_nameInput[i], SIGNAL(textChanged(const QString&)), + SLOT( changed() )); + connect(_nameInput[i+(maxDesktops/2)], SIGNAL(textChanged(const QString&)), + SLOT( changed() )); + } + + for(int i = 1; i < maxDesktops; i++) + setTabOrder( _nameInput[i-1], _nameInput[i] ); + + layout->addWidget(name_group); + +#if 0 + _wheelOption = new QCheckBox(i18n("Mouse wheel over desktop background switches desktop"), this); + connect(_wheelOption,SIGNAL(toggled(bool)), SLOT( changed() )); + + layout->addWidget(_wheelOption); +#endif + layout->addStretch(1); + + // Begin check for immutable +#ifdef Q_WS_X11 + int kwin_screen_number = DefaultScreen(QX11Info::display()); +#else + int kwin_screen_number = 0; +#endif + + KSharedConfig::Ptr config = KSharedConfig::openConfig( "kwinrc" ); + + QByteArray groupname; + if (kwin_screen_number == 0) + groupname = "Desktops"; + else + groupname = "Desktops-screen-" + QByteArray::number ( kwin_screen_number ); + + if (config->isGroupImmutable(groupname)) + { + name_group->setEnabled(false); + number_group->setEnabled(false); + } + else + { + KConfigGroup cfgGroup(config.data(), groupname); + if (cfgGroup.isEntryImmutable("Number")) + { + number_group->setEnabled(false); + } + } + // End check for immutable + + load(); +} + +void KDesktopConfig::load() +{ +#ifdef Q_WS_X11 + // get number of desktops + NETRootInfo info( QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames ); + int n = info.numberOfDesktops(); + + _numInput->setValue(n); + + for(int i = 1; i <= maxDesktops; i++) + { + QString name = QString::fromUtf8(info.desktopName(i)); + _nameInput[i-1]->setText(name); + } + + for(int i = 1; i <= maxDesktops; i++) + _nameInput[i-1]->setEnabled(i <= n); + emit changed(false); + +#if 0 + KSharedConfig::Ptr desktopConfig = KSharedConfig::openConfig("kdesktoprc", KConfig::NoGlobals); + desktopConfig->setGroup("Mouse Buttons"); + _wheelOption->setChecked(desktopConfig->readEntry("WheelSwitchesWorkspace", false)); + + _wheelOptionImmutable = desktopConfig->isEntryImmutable("WheelSwitchesWorkspace"); + + if (_wheelOptionImmutable || n<2) + _wheelOption->setEnabled(false); +#endif +#else + _numInput->setValue(1); +#endif +} + +void KDesktopConfig::save() +{ +#ifdef Q_WS_X11 + NETRootInfo info( QX11Info::display(), NET::NumberOfDesktops | NET::DesktopNames ); + // set desktop names + for(int i = 1; i <= maxDesktops; i++) + { + info.setDesktopName(i, (_nameInput[i-1]->text()).toUtf8()); + info.activate(); + } + // set number of desktops + info.setNumberOfDesktops(_numInput->value()); + info.activate(); + + XSync(QX11Info::display(), false); + +#if 0 + KSharedConfig::Ptr desktopConfig = KSharedConfig::openConfig("kdesktoprc"); + desktopConfig->setGroup("Mouse Buttons"); + desktopConfig->writeEntry("WheelSwitchesWorkspace", _wheelOption->isChecked()); + + // Tell kdesktop about the new config file + int konq_screen_number = 0; + if (QX11Info::display()) + konq_screen_number = DefaultScreen(QX11Info::display()); + + QByteArray appname; + if (konq_screen_number == 0) + appname = "org.kde.kdesktop"; + else + appname = "org.kde.kdesktop-screen-" + QByteArray::number( konq_screen_number ); + + org::kde::kdesktop::Desktop desktop(appname, "/Desktop", QDBusConnection::sessionBus()); + desktop.configure(); +#endif + + emit changed(false); +#endif +} + +void KDesktopConfig::defaults() +{ + int n = 4; + _numInput->setValue(n); + + for(int i = 0; i < maxDesktops; i++) + _nameInput[i]->setText(i18n("Desktop %1", i+1)); + + for(int i = 0; i < maxDesktops; i++) + _nameInput[i]->setEnabled(i < n); + +#if 0 + _wheelOption->setChecked(false); + if (!_wheelOptionImmutable) + _wheelOption->setEnabled(true); +#endif + + emit changed(false); +} + +void KDesktopConfig::slotValueChanged(int n) +{ + for(int i = 0; i < maxDesktops; i++) + { + _nameInput[i]->setEnabled(i < n); + if(itext().isEmpty()) + _nameInput[i]->setText(i18n("Desktop %1", i+1)); + } +#if 0 + if (!_wheelOptionImmutable) + _wheelOption->setEnabled(n>1); +#endif + emit changed(true); +} + +#include "desktop.moc" + diff --git a/kcmkwin/kwindesktop/desktop.desktop b/kcmkwin/kwindesktop/desktop.desktop new file mode 100644 index 0000000000..304330612b --- /dev/null +++ b/kcmkwin/kwindesktop/desktop.desktop @@ -0,0 +1,200 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Service +ServiceTypes=KCModule +DocPath=kcontrol/desktop/index.html#desktop-number +Icon=desktop +Exec=kcmshell4 desktop + +X-KDE-Library=kcm_kwindesktop +X-KDE-ParentApp=kcontrol + +Name=Multiple Desktops +Name[af]=Veelvuldige Werkskerms +Name[ar]=أسطح مكتب متعددة +Name[be]=Некалькі працоўных сталоў +Name[bg]=Работни плотове +Name[br]=Lies burev +Name[ca]=Múltiples escriptoris +Name[cs]=Virtuální plochy +Name[csb]=Wiele pùltów +Name[cy]=Penbyrddau Lluosol +Name[da]=Flere desktoppe +Name[de]=Virtuelle Arbeitsflächen +Name[el]=Πολλαπλές επιφάνειες εργασίας +Name[eo]=Pluraj tabuloj +Name[es]=Varios escritorios +Name[et]=Virtuaalsed töölauad +Name[eu]=Mahaigain anitz +Name[fa]=رومیزیهای چندگانه +Name[fi]=Virtuaalityöpöydät +Name[fr]=Bureaux multiples +Name[fy]=Firtuele buroblêden +Name[ga]=Deasca Iomadúla +Name[gl]=Múltiples Escritórios +Name[he]=שולחנות עבודה מרובים +Name[hr]=Višestruke radne površine +Name[hu]=Virtuális munkaasztalok +Name[is]=Sýndarskjáborð +Name[it]=Desktop multipli +Name[ja]=デスクトップの数 +Name[ka]=მრავალ დაფიანი რეჟიმი +Name[kk]=Виртуалды үстелдер +Name[km]=ផ្ទៃតុ​ច្រើន +Name[ko]=다중 데스크톱 +Name[lt]=Daugelis darbastalių +Name[lv]=Vairākas Darbvirsmas +Name[mk]=Повеќе површини +Name[ms]=Berbilang Desktop +Name[nb]=Flere skrivebord +Name[nds]=Mehr as een Schriefdisch +Name[ne]=बहुँविध डेस्कटप +Name[nl]=Virtuele bureaubladen +Name[nn]=Fleire skrivebord +Name[pa]=ਬਹੁ ਡੈਸਕਟਾਪ +Name[pl]=Wiele pulpitów +Name[pt]=Ecrãs Múltiplos +Name[pt_BR]=Múltiplas Áreas de Trabalho +Name[ro]=Ecrane multiple +Name[ru]=Виртуальные рабочие столы +Name[se]=Máŋggaid čállinbeavddi +Name[sl]=Več namizij +Name[sr]=Вишеструке радне површине +Name[sr@latin]=Višestruke radne površine +Name[sv]=Flera skrivbord +Name[ta]=பலவகையான மேல்மேசைகள் +Name[tg]=Мизи кориҳои виртуалӣ +Name[th]=หลายพื้นที่ทำงาน +Name[tr]=Çoklu Masaüstü +Name[uk]=Віртуальні стільниці +Name[uz]=Бир нечта иш столлари +Name[vi]=Đa màn hình nền +Name[wa]=Multi-scribannes +Name[x-test]=xxMultiple Desktopsxx +Name[xh]=Desktops Ezininzi +Name[zh_CN]=多个桌面 +Name[zh_TW]=多重桌面 + +Comment=You can configure how many virtual desktops there are. +Comment[af]=Jy kan opstel hoeveel virtuele werkskerms daar is. +Comment[be]=Тут вы можаце змяніць колькасць віртуальных стальніц. +Comment[bg]=Настройване на работните плотове +Comment[br]=Amañ e c'hellit kefluniañ pet burev galloudel ez eus. +Comment[ca]=Podeu configurar quants escriptoris virtuals hi ha d'haver-hi. +Comment[cs]=Zde je možné nastavit, kolik si přejete virtuálních ploch. +Comment[csb]=Kònfigùracëjô wielënë wirtualnëch pùltów. +Comment[cy]=Gallwch ffurfweddu faint o benbyrddau sydd ar gael +Comment[da]=Her kan du indstille hvor mange virtuelle desktoppe der er. +Comment[de]=Hier können Sie die Zahl der virtuellen Arbeitsflächen festlegen +Comment[el]=Μπορείτε να ρυθμίσετε πόσες εικονικές επιφάνειες εργασίας θα υπάρχουν. +Comment[eo]=Ĉi tie vi povas agordi kiom da virtualaj tabuloj jen estas. +Comment[es]=Configuración del número de escritorios virtuales. +Comment[et]=Virtuaalsete töölaudade arvu seadistamine +Comment[eu]=Mahaigain birtualen kopurua konfigura dezakezu. +Comment[fa]=می‌توانید پیکربندی کنید چند رومیزی مجازی وجود دارد. +Comment[fi]=Voit määritelle virtuaalityöpöytien määrän. +Comment[fr]=Configuration du nombre de bureaux virtuels +Comment[fy]=Hjir kinne jo fêststelle hoefolle firtuele buroblêden jo brûke wolle. +Comment[ga]=Is féidir leat líon na ndeasc fíorúil a chumrú. +Comment[gl]=Pode configurar aqui cantos escritórios virtuais quere empregar. +Comment[he]=שינוי מספר שולחנות העבודה הווירטואליים +Comment[hr]=Konfiguriranje broja virtualnih radnih površina +Comment[hu]=A virtuális munkaasztalok számának beállítása +Comment[is]=Hér getur þú stillt hversu mörg sýndaskjáborðin eru. +Comment[it]=Configura quanti desktop virtuali vuoi avere. +Comment[ja]=仮想デスクトップの数を設定 +Comment[ka]=თქვენ შეგიძლიათ ვირტუალური სამუშაო მაგიდების რაოდენობის კონფიგურაცია +Comment[kk]=Керек виртуалды үстелдер санын орнату. +Comment[km]=អ្នក​អាច​កំណត់​រចនា​សម្ព័ន្ធ​ឲ្យ​មាន​ផ្ទៃតុ​និម្មិត​ច្រើន ។ +Comment[ko]=다중 데스크톱의 개수 설정 +Comment[lt]=Čia galite nustatyti kiek menamų darbastalių naudoti +Comment[lv]=Jūs varat konfigurēt cik daudz virtuālo darbvirsmu ir. +Comment[mk]=Може да конфигурирате колку виртуелни работни површини ќе има. +Comment[ms]=Anda boleh konfigur berapa banyak desktop maya yang ada. +Comment[nb]=Velg hvor mange virtuelle skrivebord du vil ha. +Comment[nds]=Du kannst hier instellen, wo vele virtuelle Schriefdischen dat gifft +Comment[ne]=तपाईँले त्यहाँ भएका अवास्तविक डेस्कटप कन्फिगर गर्न सक्नुहुन्छ । +Comment[nl]=U kunt hier bepalen hoeveel virtuele bureaubladen u wilt gebruiken. +Comment[nn]=Vel kor mange virtuelle skrivebord du vil ha. +Comment[pa]=ਤੁਸੀਂ ਸੰਰਚਿਤ ਕਰ ਸਕਦੇ ਹੋ ਕਿ ਕਿੰਨੇ ਫਰਜ਼ੀ ਵੇਹੜੇ ਵੇਖਾਏ ਜਾਣ। +Comment[pl]=Konfiguracja liczby wirtualnych pulpitów. +Comment[pt]=O utilizador pode configurar quantos ecrãs virtuais existem. +Comment[pt_BR]=Você pode configurar quantas áreas de trabalho virtuais existem. +Comment[ro]=Puteţi configura câte ecrane virtuale există. +Comment[ru]=Настройка количества виртуальных рабочих столов +Comment[se]=Sáhtát heivehit galle virtuella čállinbeavddi dus galgá leat. +Comment[sl]=Tu lahko nastavite število navideznih namizij. +Comment[sr]=Овде можете подесити колико ће бити виртуелних радних површина. +Comment[sr@latin]=Ovde možete podesiti koliko će biti virtuelnih radnih površina. +Comment[sv]=Anpassa antalet virtuella skrivbord +Comment[ta]=மெய்நிகர் மேல்மேசைகளின் எண்ணிக்கையை வடிவமைக்கலாம். +Comment[tg]=Инҷо метавонед таъдоди мизи кориҳои миҷозии худро таъин кунед. +Comment[th]=คุณสามารถปรับแต่งจำนวนของพื้นที่ทำงานเสมือนได้ที่นี่ +Comment[tr]=Kaç görsel masaüstüne sahip olacağınızı buradan yapılandırabilirsiniz. +Comment[uk]=Налаштування кількості віртуальних стільниць. +Comment[uz]=Бу ерда виртуал иш столларнинг сонини мослашингиз мумкин +Comment[vi]=Bạn có khả năng đặt số màn hình nền ảo ở đây +Comment[wa]=Vos ploz apontyî cobén di forveyous scribannes i gn a. +Comment[x-test]=xxYou can configure how many virtual desktops there are.xx +Comment[xh]=Ungaqwalasela ukuba zizakubangakanani ii desktops ezingabonakaliyo. +Comment[zh_CN]=您可以在这里配置虚拟桌面的数量。 +Comment[zh_TW]=您可以在這裡設定要有多少個虛擬桌面。 +Keywords=desktop,desktops,number,virtual desktop +Keywords[be]=Працоўны стол,Працоўныя сталы,Колькасць,Віртуальны працоўны стол,Віртуальныя працоўныя сталы,desktop,desktops,number,virtual desktop +Keywords[bg]=Keywords=работен, плот, брой, виртуален, desktop, number, virtual desktop +Keywords[br]=burev,burevioù,niver,burev galloudel +Keywords[ca]=escriptori,escriptoris,número,escriptori virtual +Keywords[cs]=Pracovní plocha,Počet,Virtuální plocha,Plocha +Keywords[csb]=desktop,biurkò,biurka,pùlt,pùltë,wielëna,wirtualné biurkò,wirtualny pùlt +Keywords[cy]=penbwrdd, penbyrddau,rhif,penbwrdd rhith +Keywords[da]=desktop,desktoppe,antal,virtuelt desktop +Keywords[de]=Arbeitsfläche,Desktop,Anzahl,Virtuelle Arbeitsfläche +Keywords[el]=επιφάνεια εργασίας,επιφάνειες εργασίας,αριθμός,εικονική επιφάνεια εργασίας +Keywords[eo]=tabulo,tabuloj,nombro,virtuala tabulo +Keywords[es]=escritorio,escritorios,número,escritorio virtual +Keywords[et]=töölaud,töölauad,arv,virtuaalne töölaud +Keywords[eu]=mahaigaina, mahaigainak,zenbakia,mahaigain birtuala +Keywords[fa]=رومیزی، رومیزیها، تعداد، رومیزی مجازی +Keywords[fi]=työpöytä,työpöydät,lukumäärä,virtuaalityöpöytä +Keywords[fr]=bureau,bureaux,numéro,bureaux virtuels +Keywords[fy]=desktop,buroblêd,buroblêden,namme fan buroblêd,nûmmer,buroblêdtelling,firtuele buroblêden +Keywords[ga]=deasc,deasca,uimhir,deasc fhíorúil +Keywords[gl]=escritório,escritórios,número,escritório virtual +Keywords[he]=שולחן עבודה,שולחנות עבודה,מספר,שולחן עבודה וירטואלי, desktop,desktops,number,virtual desktop +Keywords[hr]=desktop,desktops,number,virtual desktop,radna površina,broj,virtualna radna površina +Keywords[hu]=munkaasztal,munkaasztalok,szám,virtuális munkaasztal +Keywords[is]=skjáborð,nafn,heiti,númer,fjöldi +Keywords[it]=desktop,nome desktop,numero di desktop,desktop virtuali +Keywords[ja]=デスクトップ,数,仮想デスクトップ +Keywords[ka]=სამუშაო მაგიდა,სამუშაო მაგიდები,რიცხვი,ვირტუალური სამუშაო მაგიდა +Keywords[km]=ផ្ទៃតុ ផ្ទៃតុ លេខ ផ្ទៃតុ​និម្មិត +Keywords[ko]=Desktops,Name,Number of Desktops,Desktopcount,데스크톱,이름,데스크톱 번호,데스크탑 개수 +Keywords[lt]=desktop,desktops,darbastaliai,number,skaičius,menamas darbastalis +Keywords[lv]=Darbvirsma,Darbavirsmas,Skaits,virtuālā darbvirsma +Keywords[mk]=desktop,desktops,number,virtual desktop,работна површина,површина,работни површини,површини,број,виртуелна површина +Keywords[ms]=desktop,desktop,bilangan,desktop maya +Keywords[nb]=Skrivebord,antall,virtuelt skrivebord +Keywords[nds]=Schriefdisch,Schriefdischen,Tall,virtuelle Schriefdischen +Keywords[ne]=डेस्कटप, डेस्कटपहरू, सङ्ख्या, अवास्तविक डेस्कटप +Keywords[nl]=desktop,bureaublad,bureaubladen,naam van bureaublad,nummer,bureaubladtelling,virtuele bureaubladen +Keywords[nn]=skrivebord,nummer,virtuelt skrivebord +Keywords[pa]=desktop,desktops,number,virtual desktop,ਵੇਹੜੇ,ਗਿਣਤੀ +Keywords[pl]=desktop,biurko,biurka,pulpit,pulpity,numer,wirtualne biurko,wirtualny pulpit +Keywords[pt]=ecrã,ambiente de trabalho,número,ecrã virtual +Keywords[pt_BR]=área de trabalho,áreas de trabalho,número,área de trabalho virtual +Keywords[ro]=ecran,număr,ecran virtual,afişare,monitor +Keywords[se]=čállinbeavdi,čállinbeavddit,nummir,virtuella čállinbeavdi +Keywords[sl]=namizje,ime,številka,število namizij,navidezno +Keywords[sr]=desktop,desktops,number,virtual desktop,радна површина,број,виртуелна радна површина +Keywords[sr@latin]=desktop,desktops,number,virtual desktop,radna površina,broj,virtuelna radna površina +Keywords[sv]=skrivbord,antal skrivbord,antal,virtuellt skrivbord +Keywords[ta]=மேல்மேசை, மேல்மேசைகள்,எண்ணிக்கை,மெய்நிகர் மேல்மேசை +Keywords[th]=พื้นที่ทำงาน,พื้นที่ทำงานหลายพื้นที่,จำนวน,พื้นที่ทำงานเสมือน +Keywords[tr]=masaüstü,isim,masaüstü sayısı,sanal masaüstü +Keywords[uk]=стільниця,стільниці,номер,віртуальна стільниця +Keywords[uz]=иш столи,иш столлари,сон,виртуал иш столи +Keywords[vi]=màn hình nền,các màn hình nền,số,màn hình nền ảo +Keywords[wa]=sicribanne,scribanne,sicribannes,scribannes,forveyou scribanne +Keywords[x-test]=xxdesktop,desktops,number,virtual desktopxx +Keywords[zh_CN]=desktop,desktops,number,virtual desktop,桌面,数量,虚拟桌面 +Keywords[zh_TW]=desktop,number,virtual desktop,桌面,編號,虛擬桌面 diff --git a/kcmkwin/kwindesktop/desktop.h b/kcmkwin/kwindesktop/desktop.h new file mode 100644 index 0000000000..275d561bd4 --- /dev/null +++ b/kcmkwin/kwindesktop/desktop.h @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2000 Matthias Elter + * + * 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 __desktop_h__ +#define __desktop_h__ + +#include + +class QLabel; +class QCheckBox; +class KLineEdit; +class KIntNumInput; +class QStringList; + +#ifdef Q_WS_X11 + +// if you change this, update also the number of keyboard shortcuts in kwin/kwinbindings.cpp +static const int maxDesktops = 20; + +class KDesktopConfig : public KCModule +{ + Q_OBJECT + + public: + KDesktopConfig(QWidget *parent, const QVariantList &args); + + void load(); + void save(); + void defaults(); + + protected Q_SLOTS: + void slotValueChanged(int); + + private: + KIntNumInput *_numInput; + QLabel *_nameLabel[maxDesktops]; + KLineEdit *_nameInput[maxDesktops]; +#if 0 + QCheckBox *_wheelOption; + bool _wheelOptionImmutable; +#endif +}; + +#endif // Q_WS_X11 +#endif