Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
qt4-gui: Move accounts to top level of system menu
Browse files Browse the repository at this point in the history
The account manager should be easy to find as it's probably one of the
first things a new user needs to use.
  • Loading branch information
flynd committed May 4, 2012
1 parent 461a984 commit 867ad7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 4 additions & 5 deletions qt4-gui/src/core/systemmenu.cpp
Expand Up @@ -73,8 +73,6 @@ SystemMenu::SystemMenu(QWidget* parent)
myOwnerAdmMenu = new QMenu(tr("S&ystem Functions"), this);
myOwnerAdmMenu->addAction(tr("&View System Messages..."), gLicqGui, SLOT(showAllOwnerEvents()));
myOwnerAdmMenu->addSeparator();
myOwnerAdmSeparator = myOwnerAdmMenu->addSeparator();
myAccountManagerAction = myOwnerAdmMenu->addAction(tr("&Account Manager..."), this, SLOT(showOwnerManagerDlg()));

// Sub menu User Functions
myUserAdmMenu = new QMenu(tr("User &Functions"), this);
Expand Down Expand Up @@ -173,6 +171,7 @@ SystemMenu::SystemMenu(QWidget* parent)
myShowEmptyGroupsAction = addAction(tr("Sh&ow Empty Groups"), Config::ContactList::instance(), SLOT(setShowEmptyGroups(bool)));
myShowEmptyGroupsAction->setCheckable(true);
myOptionsAction = addAction(tr("S&ettings..."), this, SLOT(showSettingsDlg()));
myAccountManagerAction = addAction(tr("&Accounts..."), this, SLOT(showOwnerManagerDlg()));
myKeyManagerAction = addAction(tr("GPG &Key Manager..."), this, SLOT(showGPGKeyManager()));
if (!Licq::gDaemon.haveGpgSupport())
myKeyManagerAction->setVisible(false);
Expand Down Expand Up @@ -317,7 +316,7 @@ void SystemMenu::addOwner(const Licq::UserId& userId)
protocol->capabilities(), this);
QMenu* ownerAdmin = newOwner->getOwnerAdmMenu();
QMenu* ownerStatus = newOwner->getStatusMenu();
myOwnerAdmMenu->insertMenu(myOwnerAdmSeparator, ownerAdmin);
myOwnerAdmMenu->addMenu(ownerAdmin);
myStatusMenu->insertMenu(myStatusSeparator, ownerStatus);

if (myOwnerData.size() < 1)
Expand All @@ -327,7 +326,7 @@ void SystemMenu::addOwner(const Licq::UserId& userId)
ownerAdmin->menuAction()->setVisible(false);

foreach (QAction* a, ownerAdmin->actions())
myOwnerAdmMenu->insertAction(myOwnerAdmSeparator, a);
myOwnerAdmMenu->addAction(a);
}

if (myOwnerData.size() == 1)
Expand Down Expand Up @@ -371,7 +370,7 @@ void SystemMenu::removeOwner(const Licq::UserId& userId)
QMenu* lastOwnerAdm = lastOwner->getOwnerAdmMenu();
lastOwnerAdm->menuAction()->setVisible(false);
foreach (QAction* a, lastOwnerAdm->actions())
myOwnerAdmMenu->insertAction(myOwnerAdmSeparator, a);
myOwnerAdmMenu->addAction(a);
}
}

Expand Down
5 changes: 1 addition & 4 deletions qt4-gui/src/core/systemmenu.h
Expand Up @@ -156,13 +156,11 @@ private slots:
QAction* myShowOfflineAction;
QAction* myShowEmptyGroupsAction;
QAction* myOptionsAction;
QAction* myAccountManagerAction;
QAction* myKeyManagerAction;
QAction* mySaveOptionsAction;
QAction* myShutdownAction;

// Actions on system menu
QAction* myAccountManagerAction;

// Actions on user menu
QAction* myAddGroupAction;
QAction* myUserSearchAction;
Expand Down Expand Up @@ -201,7 +199,6 @@ private slots:
QActionGroup* myUserGroupActions;
QActionGroup* myFollowMeActions;

QAction* myOwnerAdmSeparator;
QAction* myGroupSeparator;
QAction* myStatusSeparator;
QAction* myIcqFollowMeSeparator;
Expand Down

0 comments on commit 867ad7f

Please sign in to comment.