KIPC is gone, dbus signals replace it.

The API has been cleaned up too: the signals moved from kapp to kglobalsettings
[which now provides a singleton], as well as most of the gui-settings-related code.

svn path=/trunk/KDE/kdebase/workspace/; revision=582977
This commit is contained in:
David Faure 2006-09-11 08:25:29 +00:00
parent 1b9baf8447
commit d65f3d93d1
2 changed files with 18 additions and 19 deletions

View file

@ -28,7 +28,6 @@ License. See the file "COPYING" for the exact licensing terms.
#include <kglobalaccel.h>
#include <QDesktopWidget>
#include <QToolButton>
#include <kipc.h>
#include <kactioncollection.h>
#include <kaction.h>
#include <QtDBus/QtDBus>
@ -52,6 +51,7 @@ License. See the file "COPYING" for the exact licensing terms.
#include <stdio.h>
#include <kauthorized.h>
#include <ktoolinvocation.h>
#include <kglobalsettings.h>
namespace KWinInternal
{
@ -319,11 +319,12 @@ void Workspace::init()
SLOT(slotReconfigure()));
connect( &updateToolWindowsTimer, SIGNAL( timeout()), this, SLOT( slotUpdateToolWindows()));
connect(kapp, SIGNAL(appearanceChanged()), this,
connect(KGlobalSettings::self(), SIGNAL(appearanceChanged()), this,
SLOT(slotReconfigure()));
connect(kapp, SIGNAL(settingsChanged(int)), this,
connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), this,
SLOT(slotSettingsChanged(int)));
connect(kapp, SIGNAL( kipcMessage( int, int )), this, SLOT( kipcMessage( int, int )));
connect(KGlobalSettings::self(), SIGNAL(blockShortcuts(int)), this,
SLOT(slotBlockShortcuts(int)));
active_client = NULL;
rootInfo->setActiveWindow( None );
@ -856,7 +857,7 @@ void Workspace::reconfigure()
void Workspace::slotSettingsChanged(int category)
{
kDebug(1212) << "Workspace::slotSettingsChanged()" << endl;
if( category == (int) KApplication::SETTINGS_SHORTCUTS )
if( category == KGlobalSettings::SETTINGS_SHORTCUTS )
readShortcuts();
}
@ -2466,21 +2467,19 @@ void Workspace::disableGlobalShortcutsForClient( bool disable )
{
if( disable )
pending_dfc = true;
KIPC::sendMessageAll( KIPC::BlockShortcuts, disable );
KGlobalSettings::self()->emitChange( KGlobalSettings::BlockShortcuts, disable );
// kwin will get the kipc message too
}
}
void Workspace::disableGlobalShortcuts( bool disable )
{
KIPC::sendMessageAll( KIPC::BlockShortcuts, disable );
KGlobalSettings::self()->emitChange( KGlobalSettings::BlockShortcuts, disable );
// kwin will get the kipc message too
}
void Workspace::kipcMessage( int id, int data )
void Workspace::slotBlockShortcuts( int data )
{
if( id != KIPC::BlockShortcuts )
return;
if( pending_dfc && data )
{
global_shortcuts_disabled_for_client = true;

View file

@ -233,7 +233,7 @@ class Workspace : public QObject, public KDecorationDefines
void sendPingToWindow( Window w, Time timestamp ); // called from Client::pingWindow()
void sendTakeActivity( Client* c, Time timestamp, long flags ); // called from Client::takeActivity()
// only called from Client::destroyClient() or Client::releaseWindow()
void removeClient( Client*, allowed_t );
void setActiveClient( Client*, allowed_t );
@ -247,7 +247,7 @@ class Workspace : public QObject, public KDecorationDefines
void focusToNull(); // SELI public?
enum FocusChainChange { FocusChainMakeFirst, FocusChainMakeLast, FocusChainUpdate };
void updateFocusChains( Client* c, FocusChainChange change );
bool forcedGlobalMouseGrab() const;
void clientShortcutUpdated( Client* c );
bool shortcutAvailable( const KShortcut& cut, Client* ignore = NULL ) const;
@ -274,7 +274,7 @@ class Workspace : public QObject, public KDecorationDefines
void cancelDelayFocus();
void requestDelayFocus( Client* );
void toggleTopDockShadows(bool on);
public slots:
@ -390,7 +390,7 @@ class Workspace : public QObject, public KDecorationDefines
void setupWindowShortcutDone( bool );
void updateClientArea();
private slots:
void desktopPopupAboutToShow();
void clientPopupAboutToShow();
@ -405,12 +405,12 @@ class Workspace : public QObject, public KDecorationDefines
void gotTemporaryRulesMessage( const QString& );
void cleanupTemporaryRules();
void writeWindowRules();
void kipcMessage( int id, int data );
void slotBlockShortcuts(int data);
// kompmgr
void setPopupClientOpacity(int v);
void resetClientOpacity();
void setTransButtonText(int value);
// end
// end
protected:
bool keyPressMouseEmulation( XKeyEvent& ev );
@ -490,7 +490,7 @@ class Workspace : public QObject, public KDecorationDefines
void raiseElectricBorders();
// ------------------
void helperDialog( const QString& message, const Client* c );
void calcDesktopLayout(int &x, int &y) const;
@ -542,7 +542,7 @@ class Workspace : public QObject, public KDecorationDefines
ClientList global_focus_chain; // this one is only for things like tabbox's MRU
ClientList should_get_focus; // last is most recent
ClientList attention_chain;
bool showing_desktop;
ClientList showing_desktop_clients;
int block_showing_desktop;
@ -654,7 +654,7 @@ class Workspace : public QObject, public KDecorationDefines
Window null_focus_window;
bool forced_global_mouse_grab;
friend class StackingUpdatesBlocker;
//kompmgr
QSlider *transSlider;
QPushButton *transButton;