2018-12-23 17:49:01 +01:00
|
|
|
/*******************************************************************************
|
|
|
|
* gui/settings/ChannelPage.cpp *
|
|
|
|
* *
|
|
|
|
* Copyright 2006, Crypton <retroshare.project@gmail.com> *
|
|
|
|
* *
|
|
|
|
* This program is free software: you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU Affero General Public License as *
|
|
|
|
* published by the Free Software Foundation, either version 3 of the *
|
|
|
|
* License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Affero General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Affero General Public License *
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
|
|
* *
|
|
|
|
*******************************************************************************/
|
2014-05-08 17:17:48 +00:00
|
|
|
|
|
|
|
#include "ChannelPage.h"
|
|
|
|
#include "rsharesettings.h"
|
2017-02-27 23:13:45 +01:00
|
|
|
#include "util/misc.h"
|
2017-07-04 23:26:57 +02:00
|
|
|
#include "gui/notifyqt.h"
|
2014-05-08 17:17:48 +00:00
|
|
|
|
|
|
|
ChannelPage::ChannelPage(QWidget * parent, Qt::WindowFlags flags)
|
|
|
|
: ConfigPage(parent, flags)
|
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
|
|
|
setAttribute(Qt::WA_QuitOnClose, false);
|
2014-12-23 10:37:35 +00:00
|
|
|
|
|
|
|
/* Initialize GroupFrameSettingsWidget */
|
|
|
|
ui.groupFrameSettingsWidget->setOpenAllInNewTabText(tr("Open each channel in a new tab"));
|
2017-01-31 23:07:59 +01:00
|
|
|
ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Channel) ;
|
2014-05-08 17:17:48 +00:00
|
|
|
|
2018-12-25 19:14:48 +01:00
|
|
|
connect(ui.emoteicon_checkBox,SIGNAL(toggled(bool)),this,SLOT(updateEmotes())) ;
|
|
|
|
|
2014-05-08 17:17:48 +00:00
|
|
|
}
|
|
|
|
|
2017-01-28 18:13:38 +01:00
|
|
|
ChannelPage::~ChannelPage()
|
|
|
|
{
|
2014-05-08 17:17:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Loads the settings for this page */
|
|
|
|
void ChannelPage::load()
|
|
|
|
{
|
2014-07-24 14:54:23 +00:00
|
|
|
ui.groupFrameSettingsWidget->loadSettings(GroupFrameSettings::Channel);
|
2018-12-25 19:14:48 +01:00
|
|
|
|
|
|
|
Settings->beginGroup(QString("ChannelPostsWidget"));
|
|
|
|
whileBlocking(ui.emoteicon_checkBox)->setChecked(Settings->value("Emoteicons_ChannelDecription", true).toBool());
|
|
|
|
Settings->endGroup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void ChannelPage::updateEmotes()
|
|
|
|
{
|
|
|
|
Settings->beginGroup(QString("ChannelPostsWidget"));
|
|
|
|
Settings->setValue("Emoteicons_ChannelDecription", ui.emoteicon_checkBox->isChecked());
|
|
|
|
Settings->endGroup();
|
2014-05-08 17:17:48 +00:00
|
|
|
}
|