/***************************************************************************
- * Copyright (C) 2005-2016 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
connect(Client::messageModel(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),
SLOT(messagesInserted(const QModelIndex &, int, int)));
connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId)));
+ connect(Client::instance(), SIGNAL(showChannelList(NetworkId)), SLOT(showChannelList(NetworkId)));
+ connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showNetworkConfig(NetworkId)), SLOT(showNetworkConfig(NetworkId)));
connect(GraphicalUi::contextMenuActionProvider(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString)));
connect(Client::instance(), SIGNAL(showIgnoreList(QString)), SLOT(showIgnoreList(QString)));
setupActions();
setupBufferWidget();
setupMenus();
- setupTransferWidget();
+ // setupTransferWidget(); not ready yet
setupChatMonitor();
setupTopicWidget();
setupInputWidget();
Client::bufferModel()->synchronizeView(view);
+ dock->setLocked(QtUiSettings().value("LockLayout", false).toBool());
+
dock->setWidget(view);
dock->setVisible(_layoutLoaded); // don't show before state has been restored
void MainWin::showPasswordChangeDlg()
{
- if((Client::coreFeatures() & Quassel::PasswordChange)) {
+ if(Client::isCoreFeatureEnabled(Quassel::Feature::PasswordChange)) {
PasswordChangeDlg dlg(this);
dlg.exec();
}
foreach(VerticalDock *dock, docks) {
dock->showTitle(!lock);
}
+
+ QList<NickListDock *> nickdocks = findChildren<NickListDock *>();
+ foreach(NickListDock *nickdock, nickdocks) {
+ nickdock->setLocked(lock);
+ }
+
+ QList<BufferViewDock *> bufferdocks = findChildren<BufferViewDock *>();
+ foreach(BufferViewDock *bufferdock, bufferdocks) {
+ bufferdock->setLocked(lock);
+ }
+
if (Client::bufferViewManager()) {
foreach(ClientBufferViewConfig *config, Client::bufferViewManager()->clientBufferViewConfigs()) {
config->setLocked(lock);
}
}
+
+ _mainToolBar->setMovable(!lock);
+ _nickToolBar->setMovable(!lock);
+
QtUiSettings().setValue("LockLayout", lock);
}
NickListDock *nickDock = new NickListDock(tr("Nicks"), this);
nickDock->setObjectName("NickDock");
nickDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+ nickDock->setLocked(QtUiSettings().value("LockLayout", false).toBool());
_nickListWidget = new NickListWidget(nickDock);
nickDock->setWidget(_nickListWidget);
_mainToolBar->addAction(coll->action("DisconnectCore"));
}
+ _mainToolBar->setMovable(!QtUiSettings().value("LockLayout", false).toBool());
+
QtUi::toolBarActionProvider()->addActions(_mainToolBar, ToolBarActionProvider::MainToolBar);
_toolbarMenu->addAction(_mainToolBar->toggleViewAction());
_nickToolBar->setWindowTitle(tr("Nick Toolbar"));
_nickToolBar->setVisible(false); //default: not visible
addToolBar(_nickToolBar);
+ _nickToolBar->setMovable(!QtUiSettings().value("LockLayout", false).toBool());
QtUi::toolBarActionProvider()->addActions(_nickToolBar, ToolBarActionProvider::NickToolBar);
_toolbarMenu->addAction(_nickToolBar->toggleViewAction());
}
+void MainWin::showNetworkConfig(NetworkId netId)
+{
+ SettingsPageDlg dlg(new NetworksSettingsPage(this), this);
+ if (netId.isValid())
+ qobject_cast<NetworksSettingsPage *>(dlg.currentPage())->bufferList_Open(netId);
+ dlg.exec();
+}
+
+
void MainWin::showIgnoreList(QString newRule)
{
SettingsPageDlg dlg(new IgnoreListSettingsPage(this), this);
dlg->registerSettingsPage(new NetworksSettingsPage(dlg));
dlg->registerSettingsPage(new AliasesSettingsPage(dlg));
dlg->registerSettingsPage(new IgnoreListSettingsPage(dlg));
- dlg->registerSettingsPage(new DccSettingsPage(dlg));
+ // dlg->registerSettingsPage(new DccSettingsPage(dlg)); not ready yet
// Category: Remote Cores
if (Quassel::runMode() != Quassel::Monolithic) {