more activities cleanup

This commit is contained in:
Ivailo Monev 2014-12-09 14:18:26 +00:00
parent 8ad1d7182d
commit 043401aa1f
2 changed files with 1 additions and 69 deletions

View file

@ -88,7 +88,6 @@ UserActionsMenu::UserActionsMenu(QObject *parent)
, m_menu(NULL)
, m_desktopMenu(NULL)
, m_screenMenu(NULL)
, m_activityMenu(NULL)
, m_addTabsMenu(NULL)
, m_switchToTabMenu(NULL)
#ifdef KWIN_BUILD_SCRIPTING
@ -391,7 +390,6 @@ void UserActionsMenu::discard()
m_menu = NULL;
m_desktopMenu = NULL;
m_screenMenu = NULL;
m_activityMenu = NULL;
m_switchToTabMenu = NULL;
m_addTabsMenu = NULL;
#ifdef KWIN_BUILD_SCRIPTING
@ -461,10 +459,6 @@ void UserActionsMenu::menuAboutToShow()
#endif
}
void UserActionsMenu::showHideActivityMenu()
{
}
void UserActionsMenu::selectPopupClientTab(QAction* action)
{
if (!(!m_client.isNull() && m_client.data()->tabGroup()) || !action->data().isValid())
@ -598,26 +592,8 @@ void UserActionsMenu::initScreenPopup()
QAction *action = m_screenMenu->menuAction();
// set it as the first item after desktop
m_menu->insertAction(m_activityMenu ? m_activityMenu->menuAction() : m_minimizeOperation, action);
action->setText(i18n("Move To &Screen"));
}
void UserActionsMenu::initActivityPopup()
{
if (m_activityMenu)
return;
m_activityMenu = new QMenu(m_menu);
m_activityMenu->setFont(KGlobalSettings::menuFont());
connect(m_activityMenu, SIGNAL(triggered(QAction*)),
this, SLOT(slotToggleOnActivity(QAction*)));
connect(m_activityMenu, SIGNAL(aboutToShow()),
this, SLOT(activityPopupAboutToShow()));
QAction *action = m_activityMenu->menuAction();
// set it as the first item
m_menu->insertAction(m_minimizeOperation, action);
action->setText(i18n("Ac&tivities")); //FIXME is that a good string?
action->setText(i18n("Move To &Screen"));
}
void UserActionsMenu::desktopPopupAboutToShow()
@ -684,13 +660,6 @@ void UserActionsMenu::screenPopupAboutToShow()
}
}
void UserActionsMenu::activityPopupAboutToShow()
{
if (!m_activityMenu)
return;
}
void UserActionsMenu::slotWindowOperation(QAction *action)
{
if (!action->data().isValid())
@ -753,10 +722,6 @@ void UserActionsMenu::slotSendToScreen(QAction *action)
Workspace::self()->sendClientToScreen(m_client.data(), screen);
}
void UserActionsMenu::slotToggleOnActivity(QAction *action)
{
}
//****************************************
// ShortcutDialog
//****************************************

View file

@ -95,18 +95,6 @@ public:
**/
void show(const QRect &pos, const QWeakPointer<Client> &client);
public slots:
/**
* Delayed initialization of the activity menu.
*
* The call to retrieve the current list of activities is performed in a thread and this
* slot is invoked once the list has been fetched. Only task of this method is to decide
* whether to show the activity menu and to invoke the initialization of it.
*
* @see initActivityPopup
**/
void showHideActivityMenu();
private slots:
/**
* The menu will become visible soon.
@ -144,11 +132,6 @@ private slots:
* the Client.
**/
void screenPopupAboutToShow();
/**
* Adjusts the activity popup to the current values and the location of
* the Client.
**/
void activityPopupAboutToShow();
/**
* Sends the client to desktop \a desk
*
@ -161,12 +144,6 @@ private slots:
* @param action Invoked Action containing the Screen as data element
**/
void slotSendToScreen(QAction *action);
/**
* Toggles whether the Client is on the \a activity
*
* @param action Invoked Action containing the Id of the Activity to toggle the Client on
**/
void slotToggleOnActivity(QAction *action);
/**
* Performs a window operation.
*
@ -191,12 +168,6 @@ private:
* Creates the Move To Screen sub-menu.
**/
void initScreenPopup();
/**
* Creates activity popup.
* I'm going with checkable ones instead of "copy to" and "move to" menus; I *think* it's an easier way.
* Oh, and an 'all' option too of course
**/
void initActivityPopup();
/**
* Creates the Window Tabbing related menus.
**/
@ -220,10 +191,6 @@ private:
* The move to screen sub menu.
**/
QMenu* m_screenMenu;
/**
* The activities sub menu.
**/
QMenu* m_activityMenu;
/**
* Menu to add the group to other group.
**/