- // TODO don't get these from *.ui anymore... we shouldn't need one
- ui.actionQuit->setIcon(SmallIcon("application-exit"));
- ui.actionSettingsDlg->setIcon(SmallIcon("configure"));
- ui.actionManageViews->setIcon(SmallIcon("view-tree"));
- ui.actionManageViews2->setIcon(SmallIcon("view-tree"));
- ui.actionAboutQt->setIcon(SmallIcon("qt"));
- ui.actionAboutQuassel->setIcon(SmallIcon("quassel"));
- ui.actionConnectCore->setIcon(SmallIcon("network-connect"));
- ui.actionDisconnectCore->setIcon(SmallIcon("network-disconnect"));
- ui.actionCoreInfo->setIcon(SmallIcon("help-about"));
+ ActionCollection *coll = QtUi::actionCollection("General");
+ // File
+ coll->addAction("ConnectCore", new Action(SmallIcon("network-connect"), tr("&Connect to Core..."), coll,
+ this, SLOT(showCoreConnectionDlg())));
+ coll->addAction("DisconnectCore", new Action(SmallIcon("network-disconnect"), tr("&Disconnect from Core"), coll,
+ Client::instance(), SLOT(disconnectFromCore())));
+ coll->addAction("CoreInfo", new Action(SmallIcon("help-about"), tr("Core &Info..."), coll,
+ this, SLOT(showCoreInfoDlg())));
+ coll->addAction("EditNetworks", new Action(SmallIcon("configure"), tr("Edit &Networks..."), coll,
+ this, SLOT(on_actionEditNetworks_triggered())));
+ coll->addAction("Quit", new Action(SmallIcon("application-exit"), tr("&Quit"), coll,
+ qApp, SLOT(quit()), tr("Ctrl+Q")));
+
+ // View
+ coll->addAction("ManageBufferViews", new Action(SmallIcon("view-tree"), tr("&Manage Buffer Views..."), coll,
+ this, SLOT(on_actionManageViews_triggered())));
+ Action *lockAct = coll->addAction("LockDockPositions", new Action(tr("&Lock Dock Positions"), coll));
+ lockAct->setCheckable(true);
+ connect(lockAct, SIGNAL(toggled(bool)), SLOT(on_actionLockDockPositions_toggled(bool)));
+
+ coll->addAction("ToggleSearchBar", new Action(SmallIcon("edit-find"), tr("Show &Search Bar"), coll,
+ 0, 0, tr("Ctrl+F")))->setCheckable(true);
+ coll->addAction("ToggleStatusBar", new Action(tr("Show Status &Bar"), coll,
+ 0, 0))->setCheckable(true);
+
+ // Settings
+ coll->addAction("ConfigureQuassel", new Action(SmallIcon("configure"), tr("&Configure Quassel..."), coll,
+ this, SLOT(showSettingsDlg()), tr("F7")));
+
+ // Help
+ coll->addAction("AboutQuassel", new Action(SmallIcon("quassel"), tr("&About Quassel..."), coll,
+ this, SLOT(showAboutDlg())));
+ coll->addAction("AboutQt", new Action(tr("About &Qt..."), coll,
+ qApp, SLOT(aboutQt())));
+ coll->addAction("DebugNetworkModel", new Action(SmallIcon("tools-report-bug"), tr("Debug &NetworkModel"), coll,
+ this, SLOT(on_actionDebugNetworkModel_triggered())));