From 771c60c914e55fac8edfed9601d73fcd1d905abc Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Sun, 30 Oct 2011 14:32:19 +0800 Subject: [PATCH] Rename members and methods related with the "switch-profile" action --- src/SessionController.cpp | 20 ++++++++++---------- src/SessionController.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index 57ba6f726..98cd62a52 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -88,7 +88,7 @@ SessionController::SessionController(Session* session , TerminalDisplay* view, Q , _findPreviousAction(0) , _urlFilterUpdateRequired(false) , _codecAction(0) - , _changeProfileMenu(0) + , _switchProfileMenu(0) , _listenForScreenWindowUpdates(false) , _preventClose(false) { @@ -537,25 +537,25 @@ void SessionController::setupActions() action->setText(i18n("Configure Current Profile...")); action->setIcon(KIcon("document-properties") ); - _changeProfileMenu = new KActionMenu(i18n("Switch Profile"), _view); - collection->addAction("switch-profile", _changeProfileMenu); - connect(_changeProfileMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(prepareChangeProfileMenu())); + _switchProfileMenu = new KActionMenu(i18n("Switch Profile"), _view); + collection->addAction("switch-profile", _switchProfileMenu); + connect(_switchProfileMenu->menu(), SIGNAL(aboutToShow()), this, SLOT(prepareSwitchProfileMenu())); } -void SessionController::changeProfile(Profile::Ptr profile) +void SessionController::switchProfile(Profile::Ptr profile) { SessionManager::instance()->setSessionProfile(_session,profile); } -void SessionController::prepareChangeProfileMenu() +void SessionController::prepareSwitchProfileMenu() { - if (_changeProfileMenu->menu()->isEmpty()) { + if (_switchProfileMenu->menu()->isEmpty()) { _profileList = new ProfileList(false,this); - connect(_profileList, SIGNAL(profileSelected(Profile::Ptr)), this, SLOT(changeProfile(Profile::Ptr))); + connect(_profileList, SIGNAL(profileSelected(Profile::Ptr)), this, SLOT(switchProfile(Profile::Ptr))); } - _changeProfileMenu->menu()->clear(); - _changeProfileMenu->menu()->addActions(_profileList->actions()); + _switchProfileMenu->menu()->clear(); + _switchProfileMenu->menu()->addActions(_profileList->actions()); } void SessionController::updateCodecAction() { diff --git a/src/SessionController.h b/src/SessionController.h index 63b846caf..ecf6a81f4 100644 --- a/src/SessionController.h +++ b/src/SessionController.h @@ -205,10 +205,10 @@ private slots: void monitorActivity(bool monitor); void monitorSilence(bool monitor); void renameSession(); - void changeProfile(Profile::Ptr profile); + void switchProfile(Profile::Ptr profile); // other - void prepareChangeProfileMenu(); + void prepareSwitchProfileMenu(); void updateCodecAction(); void showDisplayContextMenu(const QPoint& position); void sessionStateChanged(int state); @@ -281,7 +281,7 @@ private: KCodecAction* _codecAction; - KActionMenu* _changeProfileMenu; + KActionMenu* _switchProfileMenu; bool _listenForScreenWindowUpdates; bool _preventClose;