Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
kdebase4-workspace
wm-switch-systemsettings.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File wm-switch-systemsettings.diff of Package kdebase4-workspace
Subject: Move the window manager selection UI to 'default applications' control module From: Lubos Lunak Patch-upstream: r847440 Relates: kdebase4-runtime/wm-switch-systemsettings.diff Move the window manager selection UI option (i.e. mainly Compiz switch) to a more prominent and logical place, the 'default applications' control module. Also improve the switching. unchanged: --- ksmserver/kcm/smserverconfigdlg.ui +++ ksmserver/kcm/smserverconfigdlg.ui @@ -6,7 +6,7 @@ <x>0</x> <y>0</y> <width>325</width> - <height>478</height> + <height>433</height> </rect> </property> <property name="windowTitle" > @@ -125,18 +125,6 @@ </widget> </item> <item> - <widget class="QGroupBox" name="windowManagerGroup" > - <property name="title" > - <string>Window Manager</string> - </property> - <layout class="QVBoxLayout" name="verticalLayout" > - <item> - <widget class="QComboBox" name="windowManagerCombo" /> - </item> - </layout> - </widget> - </item> - <item> <widget class="QGroupBox" name="advancedGroup" > <property name="title" > <string>Advanced</string> unchanged: --- ksmserver/kcm/smserverconfigimpl.cpp +++ ksmserver/kcm/smserverconfigimpl.cpp @@ -28,7 +28,6 @@ connect(rebootRadio,SIGNAL(toggled(bool)), SLOT(configChanged())); connect(excludeLineedit,SIGNAL(textChanged(QString)),SLOT(configChanged())); connect(offerShutdownCheck,SIGNAL(toggled(bool)),SLOT(configChanged())); - connect(windowManagerCombo,SIGNAL(activated(int)),SLOT(configChanged())); } SMServerConfigImpl::~SMServerConfigImpl(){ } unchanged: --- ksmserver/kcm/kcmsmserver.cpp +++ ksmserver/kcm/kcmsmserver.cpp @@ -63,8 +63,6 @@ connect(dialog, SIGNAL(changed()), SLOT(changed())); topLayout->addWidget(dialog); - - KGlobal::dirs()->addResourceType( "windowmanagers", "data", "ksmserver/windowmanagers" ); } void SMServerConfig::load() @@ -94,7 +92,6 @@ dialog->logoutRadio->setChecked(true); break; } - loadWMs(c.readEntry("windowManager", "kwin")); dialog->excludeLineedit->setText( c.readEntry("excludeApps")); emit changed(false); @@ -102,8 +99,8 @@ void SMServerConfig::save() { - KConfig *c = new KConfig("ksmserverrc", KConfig::NoGlobals); - KConfigGroup group = c->group("General"); + KConfig c("ksmserverrc", KConfig::NoGlobals); + KConfigGroup group = c.group("General"); group.writeEntry( "confirmLogout", dialog->confirmLogoutCheck->isChecked()); group.writeEntry( "offerShutdown", dialog->offerShutdownCheck->isChecked()); QString s = "restorePreviousLogout"; @@ -119,21 +116,13 @@ dialog->rebootRadio->isChecked() ? int(KWorkSpace::ShutdownTypeReboot) : int(KWorkSpace::ShutdownTypeNone)); - group.writeEntry("windowManager", currentWM()); group.writeEntry("excludeApps", dialog->excludeLineedit->text()); - c->sync(); - delete c; + c.sync(); # if 0 // update the k menu if necessary QDBusInterface kicker("org.kde.kicker", "/kicker", "org.kde.kicker"); kicker.call("configure"); #endif - if( oldwm != currentWM()) - { // TODO switch it already in the session instead and tell ksmserver - KMessageBox::information( this, - i18n( "The new window manager will be used when KDE is started the next time." ), - i18n( "Window manager change" ), "windowmanagerchange" ); - } } void SMServerConfig::defaults() @@ -143,55 +132,7 @@ dialog->offerShutdownCheck->setChecked(true); dialog->sdGroup->setEnabled(true); dialog->logoutRadio->setChecked(true); - dialog->windowManagerCombo->setCurrentIndex( 0 ); dialog->excludeLineedit->clear(); } -void SMServerConfig::loadWMs( const QString& current ) -{ - QString kwinname = i18n( "KWin (KDE default)" ); - dialog->windowManagerCombo->addItem( kwinname ); - dialog->windowManagerCombo->setCurrentIndex( 0 ); - wms[ kwinname ] = "kwin"; - oldwm = "kwin"; - QStringList list = KGlobal::dirs()->findAllResources( "windowmanagers", QString(), KStandardDirs::NoDuplicates ); - QRegExp reg( ".*/([^/\\.]*)\\.[^/\\.]*" ); - foreach( QString wmfile, list ) - { - KDesktopFile file( wmfile ); - if( file.noDisplay()) - continue; - if( !file.tryExec()) - continue; - QString testexec = file.desktopGroup().readEntry( "X-KDE-WindowManagerTestExec" ); - if( !testexec.isEmpty()) - { - KProcess proc; - proc.setShellCommand( testexec ); - if( proc.execute() != 0 ) - continue; - } - QString name = file.readName(); - if( name.isEmpty()) - continue; - if( !reg.exactMatch( wmfile )) - continue; - QString wm = reg.cap( 1 ); - if( wms.values().contains( wm )) - continue; - wms[ name ] = wm; - dialog->windowManagerCombo->addItem( name ); - if( wms[ name ] == current ) // make it selected - { - dialog->windowManagerCombo->setCurrentIndex( dialog->windowManagerCombo->count() - 1 ); - oldwm = wm; - } - } -} - -QString SMServerConfig::currentWM() const -{ - return wms[ dialog->windowManagerCombo->currentText() ]; -} - #include "kcmsmserver.moc" unchanged: --- ksmserver/kcm/kcmsmserver.h +++ ksmserver/kcm/kcmsmserver.h @@ -40,10 +40,6 @@ void defaults(); private: - void loadWMs( const QString& current ); - QString currentWM() const; - QHash< QString, QString > wms; // i18n text -> internal name - QString oldwm; // the original value SMServerConfigImpl* dialog; }; unchanged: --- ksmserver/CMakeLists.txt +++ ksmserver/CMakeLists.txt @@ -1,5 +1,4 @@ add_subdirectory( kcm ) -add_subdirectory( windowmanagers ) add_subdirectory( tests ) include_directories( only in patch2: unchanged: --- ksmserver/server.cpp (revision 854489) +++ ksmserver/server.cpp (revision 854490) @@ -967,3 +967,9 @@ wm = smname.isEmpty() ? cfgwm : smname; wmCommands = cfgWmCommands; } + +void KSMServer::wmChanged() +{ + KGlobal::config()->reparseConfiguration(); + selectWm( "" ); +} only in patch2: unchanged: --- ksmserver/KSMServerInterface.h (revision 854489) +++ ksmserver/KSMServerInterface.h (revision 854490) @@ -41,6 +41,7 @@ Q_SCRIPTABLE void suspendStartup( QString ); Q_SCRIPTABLE void resumeStartup( QString ); + Q_SCRIPTABLE void wmChanged(); }; #endif only in patch2: unchanged: --- ksmserver/org.kde.KSMServerInterface.xml (revision 854489) +++ ksmserver/org.kde.KSMServerInterface.xml (revision 854490) @@ -26,5 +26,6 @@ <method name="resumeStartup"> <arg type="s" direction="in"/> </method> + <method name="wmChanged"/> </interface> </node> only in patch2: unchanged: --- ksmserver/server.h (revision 854489) +++ ksmserver/server.h (revision 854490) @@ -192,6 +192,7 @@ void saveCurrentSession(); void saveCurrentSessionAs( const QString & ); QStringList sessionList(); + void wmChanged(); private: QList<KSMListener*> listener; QList<KSMClient*> clients;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor