From 16a025d9072e3e26323d8f3ee555114a6fc34a73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 13 Mar 2011 14:04:02 +0100 Subject: [PATCH] Remove dynamic desktop layout This has never been implemented properly. There is only the boolean indicating that the desktop layout is dynamic but it is nowhere set or used. So better remove it. --- effects.cpp | 5 ----- effects.h | 1 - libkwineffects/kwineffects.h | 4 ---- workspace.cpp | 1 - workspace.h | 20 -------------------- 5 files changed, 31 deletions(-) diff --git a/effects.cpp b/effects.cpp index 190be25ad8..0cc7577e92 100644 --- a/effects.cpp +++ b/effects.cpp @@ -677,11 +677,6 @@ int EffectsHandlerImpl::desktopToLeft(int desktop, bool wrap) const return Workspace::self()->desktopToLeft(desktop, wrap); } -bool EffectsHandlerImpl::isDesktopLayoutDynamic() const -{ - return Workspace::self()->isDesktopLayoutDynamic(); -} - QString EffectsHandlerImpl::desktopName(int desktop) const { return Workspace::self()->desktopName(desktop); diff --git a/effects.h b/effects.h index e1478203d5..5857ebc059 100644 --- a/effects.h +++ b/effects.h @@ -83,7 +83,6 @@ public: virtual int desktopToRight(int desktop = 0, bool wrap = true) const; virtual int desktopBelow(int desktop = 0, bool wrap = true) const; virtual int desktopToLeft(int desktop = 0, bool wrap = true) const; - virtual bool isDesktopLayoutDynamic() const; virtual QString desktopName(int desktop) const; virtual bool optionRollOverDesktops() const; diff --git a/libkwineffects/kwineffects.h b/libkwineffects/kwineffects.h index 838f73e58f..89c2be7eed 100644 --- a/libkwineffects/kwineffects.h +++ b/libkwineffects/kwineffects.h @@ -663,10 +663,6 @@ public: * right of the layout if @a wrap is set. If @a id is not set use the current one. */ virtual int desktopToLeft(int desktop = 0, bool wrap = true) const = 0; - /** - * @returns Whether or not the desktop layout is allowed to be modified by the user. - */ - virtual bool isDesktopLayoutDynamic() const = 0; virtual QString desktopName(int desktop) const = 0; virtual bool optionRollOverDesktops() const = 0; diff --git a/workspace.cpp b/workspace.cpp index 56f00bfb2c..e63305de18 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -100,7 +100,6 @@ Workspace::Workspace(bool restore) , desktopGridSize_(1, 2) // Default to two rows , desktopGrid_(new int[2]) , currentDesktop_(0) - , desktopLayoutDynamicity_(false) , tilingEnabled_(false) // Unsorted , active_popup(NULL) diff --git a/workspace.h b/workspace.h index 62c195a906..3f6ad49e64 100644 --- a/workspace.h +++ b/workspace.h @@ -310,15 +310,6 @@ public: */ int desktopToLeft(int id = 0, bool wrap = true) const; - /** - * @returns Whether or not the layout is allowed to be modified by the user. - */ - bool isDesktopLayoutDynamic() const; - /** - * Sets whether or not this layout can be modified by the user. - */ - void setDesktopLayoutDynamicity(bool dynamicity); - private: int desktopCount_; QSize desktopGridSize_; @@ -326,7 +317,6 @@ private: int currentDesktop_; QString activity_; QStringList allActivities_; - bool desktopLayoutDynamicity_; KActivityController activityController_; @@ -1309,16 +1299,6 @@ inline int Workspace::desktopAtCoords(QPoint coords) const return desktopGrid_[coords.y() * desktopGridSize_.width() + coords.x()]; } -inline bool Workspace::isDesktopLayoutDynamic() const -{ - return desktopLayoutDynamicity_; -} - -inline void Workspace::setDesktopLayoutDynamicity(bool dynamicity) -{ - desktopLayoutDynamicity_ = dynamicity; -} - //--------------------------------------------------------- // Unsorted