2018-12-23 11:49:01 -05: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 13:17:48 -04:00
|
|
|
|
|
|
|
#include "ChannelPage.h"
|
|
|
|
#include "rsharesettings.h"
|
2017-02-27 17:13:45 -05:00
|
|
|
#include "util/misc.h"
|
2017-07-04 17:26:57 -04:00
|
|
|
#include "gui/notifyqt.h"
|
2014-05-08 13:17:48 -04:00
|
|
|
|
|
|
|
ChannelPage::ChannelPage(QWidget * parent, Qt::WindowFlags flags)
|
|
|
|
: ConfigPage(parent, flags)
|
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
|
|
|
setAttribute(Qt::WA_QuitOnClose, false);
|
2014-12-23 05:37:35 -05:00
|
|
|
|
|
|
|
/* Initialize GroupFrameSettingsWidget */
|
|
|
|
ui.groupFrameSettingsWidget->setOpenAllInNewTabText(tr("Open each channel in a new tab"));
|
2017-01-31 17:07:59 -05:00
|
|
|
ui.groupFrameSettingsWidget->setType(GroupFrameSettings::Channel) ;
|
2014-05-08 13:17:48 -04:00
|
|
|
|
2018-12-25 13:14:48 -05:00
|
|
|
connect(ui.emoteicon_checkBox,SIGNAL(toggled(bool)),this,SLOT(updateEmotes())) ;
|
|
|
|
|
2014-05-08 13:17:48 -04:00
|
|
|
}
|
|
|
|
|
2017-01-28 12:13:38 -05:00
|
|
|
ChannelPage::~ChannelPage()
|
|
|
|
{
|
2014-05-08 13:17:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/** Loads the settings for this page */
|
|
|
|
void ChannelPage::load()
|
|
|
|
{
|
2014-07-24 10:54:23 -04:00
|
|
|
ui.groupFrameSettingsWidget->loadSettings(GroupFrameSettings::Channel);
|
2018-12-25 13:14:48 -05: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 13:17:48 -04:00
|
|
|
}
|