more activities cleanup

This commit is contained in:
Ivailo Monev 2014-12-09 14:08:29 +00:00
parent 3d36cf07f2
commit 8ad1d7182d
5 changed files with 1 additions and 84 deletions

View file

@ -911,11 +911,6 @@ void EffectsHandlerImpl::setShowingDesktop(bool showing)
Workspace::self()->setShowingDesktop(showing);
}
QString EffectsHandlerImpl::currentActivity() const
{
return QString();
}
int EffectsHandlerImpl::currentDesktop() const
{
return VirtualDesktopManager::self()->current();

View file

@ -85,7 +85,6 @@ public:
virtual void windowToScreen(EffectWindow* w, int screen);
virtual void setShowingDesktop(bool showing);
virtual QString currentActivity() const;
virtual int currentDesktop() const;
virtual int numberOfDesktops() const;
virtual void setCurrentDesktop(int desktop);

View file

@ -123,10 +123,6 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
connect(ui[i]->currentDesktop, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->otherDesktops, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->filterActivities, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->currentActivity, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->otherActivities, SIGNAL(clicked(bool)), SLOT(changed()));
connect(ui[i]->filterScreens, SIGNAL(clicked(bool)), SLOT(changed()));
if (QApplication::desktop()->screenCount() < 2) {
ui[i]->filterScreens->hide();
@ -348,9 +344,6 @@ void KWinTabBoxConfig::defaults()
CONFIGURE(filterDesktops, Desktop, !=, AllDesktopsClients);
CONFIGURE(currentDesktop, Desktop, ==, OnlyCurrentDesktopClients);
CONFIGURE(otherDesktops, Desktop, ==, ExcludeCurrentDesktopClients);
CONFIGURE(filterActivities, Activities, !=, AllActivitiesClients);
CONFIGURE(currentActivity, Activities, ==, OnlyCurrentActivityClients);
CONFIGURE(otherActivities, Activities, ==, ExcludeCurrentActivityClients);
CONFIGURE(filterScreens, MultiScreen, !=, IgnoreMultiScreen);
CONFIGURE(currentScreen, MultiScreen, ==, OnlyCurrentScreenClients);
CONFIGURE(otherScreens, MultiScreen, ==, ExcludeCurrentScreenClients);
@ -404,9 +397,6 @@ void KWinTabBoxConfig::updateUiFromConfig(KWinTabBoxConfigForm* ui, const KWin::
CONFIGURE(filterDesktops, clientDesktop, !=, AllDesktopsClients);
CONFIGURE(currentDesktop, clientDesktop, ==, OnlyCurrentDesktopClients);
CONFIGURE(otherDesktops, clientDesktop, ==, ExcludeCurrentDesktopClients);
CONFIGURE(filterActivities, clientActivities, !=, AllActivitiesClients);
CONFIGURE(currentActivity, clientActivities, ==, OnlyCurrentActivityClients);
CONFIGURE(otherActivities, clientActivities, ==, ExcludeCurrentActivityClients);
CONFIGURE(filterScreens, clientMultiScreen, !=, IgnoreMultiScreen);
CONFIGURE(currentScreen, clientMultiScreen, ==, OnlyCurrentScreenClients);
CONFIGURE(otherScreens, clientMultiScreen, ==, ExcludeCurrentScreenClients);
@ -431,10 +421,6 @@ void KWinTabBoxConfig::updateConfigFromUi(const KWin::KWinTabBoxConfigForm* ui,
config.setClientDesktopMode(ui->currentDesktop->isChecked() ? TabBoxConfig::OnlyCurrentDesktopClients : TabBoxConfig::ExcludeCurrentDesktopClients);
else
config.setClientDesktopMode(TabBoxConfig::AllDesktopsClients);
if (ui->filterActivities->isChecked())
config.setClientActivitiesMode(ui->currentActivity->isChecked() ? TabBoxConfig::OnlyCurrentActivityClients : TabBoxConfig::ExcludeCurrentActivityClients);
else
config.setClientActivitiesMode(TabBoxConfig::AllActivitiesClients);
if (ui->filterScreens->isChecked())
config.setClientMultiScreenMode(ui->currentScreen->isChecked() ? TabBoxConfig::OnlyCurrentScreenClients : TabBoxConfig::ExcludeCurrentScreenClients);
else

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>630</width>
<height>418</height>
<height>351</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,1,2">
@ -159,16 +159,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="filterActivities">
<property name="text">
<string>Activities</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="activityFilter" native="true">
<property name="enabled">
@ -178,36 +168,6 @@
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>24</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QRadioButton" name="currentActivity">
<property name="text">
<string>Current activity</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="otherActivities">
<property name="text">
<string>All other activities</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -600,9 +560,6 @@
<tabstop>filterDesktops</tabstop>
<tabstop>currentDesktop</tabstop>
<tabstop>otherDesktops</tabstop>
<tabstop>filterActivities</tabstop>
<tabstop>currentActivity</tabstop>
<tabstop>otherActivities</tabstop>
<tabstop>filterScreens</tabstop>
<tabstop>currentScreen</tabstop>
<tabstop>otherScreens</tabstop>
@ -628,22 +585,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>filterActivities</sender>
<signal>toggled(bool)</signal>
<receiver>activityFilter</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>543</x>
<y>222</y>
</hint>
<hint type="destinationlabel">
<x>701</x>
<y>247</y>
</hint>
</hints>
</connection>
<connection>
<sender>filterScreens</sender>
<signal>toggled(bool)</signal>

View file

@ -412,7 +412,6 @@ TabBox::TabBox(QObject *parent)
m_defaultConfig = TabBoxConfig();
m_defaultConfig.setTabBoxMode(TabBoxConfig::ClientTabBox);
m_defaultConfig.setClientDesktopMode(TabBoxConfig::OnlyCurrentDesktopClients);
m_defaultConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients);
m_defaultConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications);
m_defaultConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus);
m_defaultConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
@ -422,7 +421,6 @@ TabBox::TabBox(QObject *parent)
m_alternativeConfig = TabBoxConfig();
m_alternativeConfig.setTabBoxMode(TabBoxConfig::ClientTabBox);
m_alternativeConfig.setClientDesktopMode(TabBoxConfig::AllDesktopsClients);
m_alternativeConfig.setClientActivitiesMode(TabBoxConfig::OnlyCurrentActivityClients);
m_alternativeConfig.setClientApplicationsMode(TabBoxConfig::AllWindowsAllApplications);
m_alternativeConfig.setClientMinimizedMode(TabBoxConfig::IgnoreMinimizedStatus);
m_alternativeConfig.setShowDesktopMode(TabBoxConfig::DoNotShowDesktopClient);
@ -738,8 +736,6 @@ void TabBox::loadConfig(const KConfigGroup& config, TabBoxConfig& tabBoxConfig)
{
tabBoxConfig.setClientDesktopMode(TabBoxConfig::ClientDesktopMode(
config.readEntry<int>("DesktopMode", TabBoxConfig::defaultDesktopMode())));
tabBoxConfig.setClientActivitiesMode(TabBoxConfig::ClientActivitiesMode(
config.readEntry<int>("ActivitiesMode", TabBoxConfig::defaultActivitiesMode())));
tabBoxConfig.setClientApplicationsMode(TabBoxConfig::ClientApplicationsMode(
config.readEntry<int>("ApplicationsMode", TabBoxConfig::defaultApplicationsMode())));
tabBoxConfig.setClientMinimizedMode(TabBoxConfig::ClientMinimizedMode(