OSDN Git Service

kcontrol: remove display KCM
authorIvailo Monev <xakepa10@gmail.com>
Sun, 30 Jul 2023 04:24:41 +0000 (07:24 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 30 Jul 2023 04:26:09 +0000 (07:26 +0300)
it is essentially container for other modules and all but the randr
module are not valid (not maintained as part of Katana)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
22 files changed:
kcontrol/CMakeLists.txt
kcontrol/hardware/CMakeLists.txt [deleted file]
kcontrol/hardware/display/CMakeLists.txt [deleted file]
kcontrol/hardware/display/Messages.sh [deleted file]
kcontrol/hardware/display/display.cpp [deleted file]
kcontrol/hardware/display/display.desktop [deleted file]
kcontrol/hardware/display/display.h [deleted file]
kcontrol/joystick/CMakeLists.txt [moved from kcontrol/hardware/joystick/CMakeLists.txt with 100% similarity]
kcontrol/joystick/Messages.sh [moved from kcontrol/hardware/joystick/Messages.sh with 100% similarity]
kcontrol/joystick/caldialog.cpp [moved from kcontrol/hardware/joystick/caldialog.cpp with 100% similarity]
kcontrol/joystick/caldialog.h [moved from kcontrol/hardware/joystick/caldialog.h with 100% similarity]
kcontrol/joystick/joydevice.cpp [moved from kcontrol/hardware/joystick/joydevice.cpp with 100% similarity]
kcontrol/joystick/joydevice.h [moved from kcontrol/hardware/joystick/joydevice.h with 100% similarity]
kcontrol/joystick/joystick.cpp [moved from kcontrol/hardware/joystick/joystick.cpp with 100% similarity]
kcontrol/joystick/joystick.desktop [moved from kcontrol/hardware/joystick/joystick.desktop with 100% similarity]
kcontrol/joystick/joystick.h [moved from kcontrol/hardware/joystick/joystick.h with 100% similarity]
kcontrol/joystick/joywidget.cpp [moved from kcontrol/hardware/joystick/joywidget.cpp with 100% similarity]
kcontrol/joystick/joywidget.h [moved from kcontrol/hardware/joystick/joywidget.h with 100% similarity]
kcontrol/joystick/poswidget.cpp [moved from kcontrol/hardware/joystick/poswidget.cpp with 100% similarity]
kcontrol/joystick/poswidget.h [moved from kcontrol/hardware/joystick/poswidget.h with 100% similarity]
kcontrol/randr/krandrtray.cpp
kcontrol/randr/module/randrmonitor.cpp

index f67eb93..0832b62 100644 (file)
@@ -37,7 +37,6 @@ add_subdirectory( kdebug )
 add_subdirectory( kmetainfo )
 add_subdirectory( kpasswdstore )
 
-add_subdirectory( hardware )
 add_subdirectory( desktoppaths )
 
 if(FONTCONFIG_FOUND AND FREETYPE_FOUND)
@@ -46,3 +45,8 @@ endif()
 
 add_subdirectory( ebrowsing )
 add_subdirectory( kio )
+
+if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+    # this one doesn't seem to be very portable, Alex
+    add_subdirectory(joystick)
+endif()
\ No newline at end of file
diff --git a/kcontrol/hardware/CMakeLists.txt b/kcontrol/hardware/CMakeLists.txt
deleted file mode 100644 (file)
index ff8a995..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-add_subdirectory(display)
-
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    # this one doesn't seem to be very portable, Alex
-    add_subdirectory(joystick)
-endif()
diff --git a/kcontrol/hardware/display/CMakeLists.txt b/kcontrol/hardware/display/CMakeLists.txt
deleted file mode 100644 (file)
index a82f9a9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-########### next target ###############
-
-kde4_add_plugin(kcm_display display.cpp)
-
-target_link_libraries(kcm_display
-    KDE4::kcmutils
-    ${QT_QTGUI_LIBRARY}
-    KDE4::kdeui
-)
-
-install(
-    TARGETS kcm_display
-    DESTINATION ${KDE4_PLUGIN_INSTALL_DIR}
-)
-
-########### install files ###############
-
-install(
-    FILES display.desktop
-    DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
-)
diff --git a/kcontrol/hardware/display/Messages.sh b/kcontrol/hardware/display/Messages.sh
deleted file mode 100644 (file)
index e920158..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-$XGETTEXT *.cpp -o $podir/display.pot
diff --git a/kcontrol/hardware/display/display.cpp b/kcontrol/hardware/display/display.cpp
deleted file mode 100644 (file)
index d5068b1..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2003-2004 Nadeem Hasan <nhasan@kde.org>
-
-   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; see the file COPYING.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include <QApplication>
-#include <QTabWidget>
-#include <QVBoxLayout>
-#include <QDesktopWidget>
-
-#include <kcmoduleloader.h>
-#include <klocale.h>
-#include <kdialog.h>
-
-#include "display.h"
-#include <KPluginFactory>
-#include <KPluginLoader>
-
-K_PLUGIN_FACTORY(DisplayFactory,
-        registerPlugin<KCMDisplay>();
-        )
-K_EXPORT_PLUGIN(DisplayFactory("display"))
-
-KCMDisplay::KCMDisplay( QWidget *parent, const QVariantList & )
-    : KCModule( DisplayFactory::componentData(), parent )
-    , m_changed(false)
-{
-  m_tabs = new QTabWidget( this );
-
-  addTab( "randr", i18n( "Size && Orientation" ) );
-  addTab( "nvidiadisplay", i18n( "Graphics Adaptor" ) );
-  addTab( "nvidia3d", i18n( "3D Options" ) );
-  addTab( "kgamma", i18n( "Monitor Gamma" ) );
-  if ( QApplication::desktop()->isVirtualDesktop() )
-    addTab( "xinerama", i18n( "Multiple Monitors" ) );
-  addTab( "energy", i18n( "Power Control" ) );
-
-  QVBoxLayout *top = new QVBoxLayout( this );
-  top->setMargin( 0 );
-  top->setSpacing( KDialog::spacingHint() );
-  top->addWidget( m_tabs );
-
-  setButtons( Apply );
-  load();
-}
-
-void KCMDisplay::addTab( const QString &name, const QString &label )
-{
-  QWidget *page = new QWidget( m_tabs );
-  QVBoxLayout *top = new QVBoxLayout( page );
-  top->setMargin( KDialog::marginHint() );
-
-  KCModule *kcm = KCModuleLoader::loadModule( name, KCModuleLoader::None,page );
-
-  if ( kcm )
-  {
-    top->addWidget( kcm );
-    m_tabs->addTab( page, label );
-
-    connect( kcm, SIGNAL(changed(bool)), SLOT(moduleChanged(bool)) );
-    m_modules.insert(kcm, false);
-  }
-  else
-    delete page;
-}
-
-void KCMDisplay::load()
-{
-  for (QMap<KCModule*, bool>::ConstIterator it = m_modules.constBegin(); it != m_modules.constEnd(); ++it)
-    it.key()->load();
-}
-
-void KCMDisplay::save()
-{
-  for (QMap<KCModule*, bool>::Iterator it = m_modules.begin(); it != m_modules.end(); ++it)
-    if (it.value())
-      it.key()->save();
-}
-
-void KCMDisplay::moduleChanged( bool isChanged )
-{
-  QMap<KCModule*, bool>::Iterator currentModule = m_modules.find(static_cast<KCModule*>(const_cast<QObject*>(sender())));
-  Q_ASSERT(currentModule != m_modules.end());
-  if (currentModule.value() == isChanged)
-    return;
-
-  currentModule.value() = isChanged;
-
-  bool c = false;
-
-  for (QMap<KCModule*, bool>::ConstIterator it = m_modules.constBegin(); it != m_modules.constEnd(); ++it) {
-    if (it.value()) {
-      c = true;
-      break;
-    }
-  }
-
-  if (m_changed != c) {
-    m_changed = c;
-    emit changed(c);
-  }
-}
-
-#include "moc_display.cpp"
diff --git a/kcontrol/hardware/display/display.desktop b/kcontrol/hardware/display/display.desktop
deleted file mode 100644 (file)
index 5b434ce..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-[Desktop Entry]
-Exec=kcmshell4 display
-Icon=preferences-desktop-display
-Type=Service
-X-KDE-ServiceTypes=KCModule
-
-X-KDE-Library=kcm_display
-X-KDE-ParentApp=kcontrol
-
-Name=Display
-Name[af]=Skerm
-Name[ar]=العرض
-Name[ast]=Pantalla
-Name[be]=Экран
-Name[be@latin]=Ekran
-Name[bg]=Екран
-Name[bn]=ডিসপ্লে
-Name[bn_IN]=প্রদর্শন
-Name[br]=Diskwel
-Name[bs]=Ekran
-Name[ca]=Pantalla
-Name[ca@valencia]=Pantalla
-Name[cs]=Obrazovka
-Name[csb]=Ekran
-Name[cy]= Arddangos
-Name[da]=Skærm
-Name[de]=Anzeige
-Name[el]=Οθόνη
-Name[en_GB]=Display
-Name[eo]=Vidigilo
-Name[es]=Pantalla
-Name[et]=Monitor
-Name[eu]=Pantaila
-Name[fa]=نمایش
-Name[fi]=Näyttö
-Name[fy]=Byldskerm
-Name[ga]=Scáileán
-Name[gl]=Pantalla
-Name[gu]=ડિસ્પ્લે
-Name[he]=תצוגה
-Name[hi]=प्रदर्शक
-Name[hne]=प्रदर्सक
-Name[hr]=Zaslon
-Name[hsb]=Wobrazowka
-Name[hu]=Megjelenítés
-Name[ia]=Monstrator
-Name[id]=Tampilan
-Name[is]=Skjár
-Name[ka]=ჩვენება
-Name[kk]=Дисплей
-Name[km]=ការ​បង្ហាញ
-Name[kn]=ಪ್ರದರ್ಶಕ
-Name[ko]=표시
-Name[ku]=Dîmender
-Name[lt]=Ekranas
-Name[lv]=Ekrāns
-Name[mai]=देखाबू
-Name[mk]=Приказ
-Name[ml]=പ്രദര്‍ശനം
-Name[mr]=डिस्प्ले
-Name[ms]=Paparan
-Name[nb]=Bildeskjerm
-Name[nds]=Schirm
-Name[ne]=प्रदर्शन गर्नुहोस्
-Name[nl]=Beeldscherm
-Name[oc]=Visualizar
-Name[or]=ପ୍ରଦର୍ଶକ
-Name[pa]=ਡਿਸਪਲੇਅ
-Name[pl]=Wyświetlanie
-Name[pt]=Ecrã
-Name[pt_BR]=Tela
-Name[ro]=Afișare
-Name[ru]=Экран
-Name[se]=Šearbma
-Name[si]=සංදර්ශනය
-Name[sk]=Obrazovka
-Name[sl]=Zaslon
-Name[sr]=Екран
-Name[sr@ijekavian]=Екран
-Name[sr@ijekavianlatin]=Ekran
-Name[sr@latin]=Ekran
-Name[sv]=Bildskärm
-Name[ta]=காட்சி
-Name[te]=ప్రదర్శన
-Name[tg]=Экран
-Name[th]=การแสดงผล
-Name[tr]=Ekran
-Name[ug]=كۆرسەت
-Name[uk]=Дисплей
-Name[uz]=Displey
-Name[uz@cyrillic]=Дисплей
-Name[vi]=Màn hình
-Name[wa]=Håynaedje
-Name[x-test]=xxDisplayxx
-Name[zh_CN]=显示
-Name[zh_TW]=顯示
-Comment=Display Settings
-Comment[af]=Skerm Instellings
-Comment[ar]=إعدادات العرض
-Comment[ast]=Preferencies de la pantalla
-Comment[be]=Настаўленні экрану
-Comment[be@latin]=Nałady ekrana
-Comment[bg]=Настройки на екрана
-Comment[bn]=ডিসপ্লে সেটিংস
-Comment[bn_IN]=প্রদর্শন সংক্রান্ত বৈশিষ্ট্য
-Comment[br]=Kefluniañ an diskwel
-Comment[bs]=Postavke ekrana
-Comment[ca]=Arranjament de la pantalla
-Comment[ca@valencia]=Arranjament de la pantalla
-Comment[cs]=Nastavení obrazovky
-Comment[csb]=Ùstôw ekranu
-Comment[cy]=Gosodiadau Arddangos
-Comment[da]=Skærmindstillinger
-Comment[de]=Anzeige-Einstellungen
-Comment[el]=Ρυθμίσεις οθόνης
-Comment[en_GB]=Display Settings
-Comment[eo]=Vidigila agordo
-Comment[es]=Preferencias de la pantalla
-Comment[et]=Monitoride seadistused
-Comment[eu]=Pantailaren ezarpenak
-Comment[fa]=نمایش تنظیمات
-Comment[fi]=Näytön asetukset
-Comment[fr]=Configuration de l'affichage
-Comment[fy]=Byldskerm ynstellings
-Comment[ga]=Socruithe an Scáileáin
-Comment[gl]=Configuración da pantalla
-Comment[gu]=ડિસ્પ્લે ગોઠવણીઓ
-Comment[he]=הגדרות תצוגה
-Comment[hi]=प्रकटन विन्यास
-Comment[hne]=देखइया सेटिंग
-Comment[hr]=Postavke zaslona
-Comment[hsb]=Nastajenja za wobrazowku
-Comment[hu]=Megjelenési beállítások
-Comment[ia]=Monstra preferentias
-Comment[id]=Pengaturan Tampilan
-Comment[is]=Stillingar skjás
-Comment[it]=Impostazioni dello schermo
-Comment[ja]=ディスプレイの設定
-Comment[ka]=დისპლეის კონფიგურირება
-Comment[kk]=Дисплей баптаулары
-Comment[km]=កំណត់​ការ​បង្ហាញ
-Comment[kn]=ಪ್ರದರ್ಶಕದ ಸಂಯೋಜನೆಗಳು
-Comment[ko]=디스플레이 설정
-Comment[ku]=Mîhengên Dîmenderê
-Comment[lt]=Ekrano parametrai
-Comment[lv]=Ekrāna parametri
-Comment[mai]=जमावट देखाबू
-Comment[mk]=Поставувања на приказот
-Comment[ml]=പ്രദര്‍ശനത്തിന്റെ സജ്ജീകരണങ്ങള്‍
-Comment[mr]=डिस्प्ले संयोजना
-Comment[ms]=Seting Paparan
-Comment[nb]=Skjerminnstillinger
-Comment[nds]=Dorstellen inrichten
-Comment[ne]=सेटिङ प्रदर्शन गर्नुहोस्
-Comment[nl]=Beeldscherminstellingen
-Comment[nn]=Skjerminnstillingar
-Comment[or]=ପ୍ରଦର୍ଶକ ସଂରଚନା
-Comment[pa]=ਡਿਸਪਲੇਅ ਸੈਟਿੰਗ
-Comment[pl]=Ustawienia ekranu
-Comment[pt]=Configuração do ecrã
-Comment[pt_BR]=Configurações da tela
-Comment[ro]=Configurări afișare
-Comment[ru]=Настройка экрана
-Comment[se]=Šearbmaheivehusat
-Comment[si]=සංදර්ශන සැකසුම්
-Comment[sk]=Nastavenie obrazovky
-Comment[sl]=Nastavitve zaslona
-Comment[sr]=Поставке екрана
-Comment[sr@ijekavian]=Поставке екрана
-Comment[sr@ijekavianlatin]=Postavke ekrana
-Comment[sr@latin]=Postavke ekrana
-Comment[sv]=Anpassa bildskärm
-Comment[ta]=அமைப்புகளை காட்டு
-Comment[te]=ప్రదర్శన అమరికలు
-Comment[tg]=Танзимоти экран
-Comment[th]=ตั้งค่าต่าง ๆ ของการแสดงผล
-Comment[tr]=Ekran Ayarları
-Comment[ug]=كۆرۈنمە يۈز تەڭشىكى
-Comment[uk]=Налаштування дисплея
-Comment[uz]=Displeyning moslamalari
-Comment[uz@cyrillic]=Дисплейнинг мосламалари
-Comment[vi]=Thiết lập hiển thị
-Comment[wa]=Apontiaedjes do Håynaedje
-Comment[x-test]=xxDisplay Settingsxx
-Comment[zh_CN]=显示设置
-Comment[zh_TW]=顯示設定
-Categories=Qt;KDE;X-KDE-settings-hardware;
diff --git a/kcontrol/hardware/display/display.h b/kcontrol/hardware/display/display.h
deleted file mode 100644 (file)
index 82afb31..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of the KDE project
-   Copyright (C) 2003 Nadeem Hasan <nhasan@kde.org>
-
-   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; see the file COPYING.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef DISPLAY_H
-#define DISPLAY_H
-
-#include <kcmodule.h>
-
-#include <QTabWidget>
-
-class KCMDisplay : public KCModule
-{
-  Q_OBJECT
-
-  public:
-    KCMDisplay( QWidget *parent, const QVariantList & );
-    void load();
-    void save();
-
-  private Q_SLOTS:
-    void moduleChanged(bool isChanged);
-
-  private:
-    void addTab( const QString &name, const QString &label );
-
-    QTabWidget *m_tabs;
-    QMap<KCModule*, bool> m_modules;
-    bool m_changed;
-};
-
-#endif // DISPLAY_H
-
index 106d6ae..aa9ca71 100644 (file)
@@ -434,7 +434,7 @@ void KRandRSystemTray::slotPrefs()
         KCMultiDialog *kcm = new KCMultiDialog( associatedWidget() );
         kcm->setFaceType( KCMultiDialog::Plain );
         kcm->setWindowTitle( i18n( "Configure Display" ) );
-        kcm->addModule( "display" );
+        kcm->addModule( "randr" );
         kcm->setAttribute(Qt::WA_DeleteOnClose);
         m_kcm = kcm;
     } else if (KWindowSystem::activeWindow() == m_kcm.data()->winId()) {
index c2a7ef1..72f5a33 100644 (file)
@@ -168,7 +168,7 @@ void RandrMonitorModule::processX11Event( XEvent* e )
 
 void RandrMonitorModule::showKcm()
 {
-    KToolInvocation::kdeinitExec("kcmshell4", QStringList() << "display");
+    KToolInvocation::kdeinitExec("kcmshell4", QStringList() << "randr");
 }
 
 void RandrMonitorModule::tryAutoConfig()
@@ -298,7 +298,7 @@ void RandrMonitorModule::switchDisplay()
         return;
     }
     // no idea what to do here
-    KToolInvocation::kdeinitExec( "kcmshell4", QStringList() << "display" );
+    KToolInvocation::kdeinitExec( "kcmshell4", QStringList() << "randr" );
 }
 
 void RandrMonitorModule::resumedFromSuspend()