Added new settings which will be replace soon as possible Preferences

Changend Quit RetroShare MessageBox with "Yes" and not more with "OK"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1412 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-07-23 17:11:51 +00:00
parent c99e03f376
commit 6abadc6375
36 changed files with 8708 additions and 27 deletions

View file

@ -0,0 +1,90 @@
/****************************************************************
* This file is distributed under the following license:
*
* Copyright (c) 2006-2007, crypton
* Copyright (c) 2006, Matt Edman, Justin Hipple
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
#include "GeneralPage.h"
#include "rshare.h"
#include <util/stringutil.h>
#include <QSystemTrayIcon>
GeneralPage::GeneralPage(QWidget * parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);
setAttribute(Qt::WA_QuitOnClose, false);
setWindowTitle(windowTitle() + QLatin1String(" - General"));
/* Create RshareSettings object */
_settings = new RshareSettings();
/* Hide platform specific features */
#ifndef Q_WS_WIN
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
#endif ´
}
void
GeneralPage::closeEvent (QCloseEvent * event)
{
QWidget::closeEvent(event);
}
/** Saves the changes on this page */
bool
GeneralPage::save(QString &errmsg)
{
_settings->setValue(QString::fromUtf8("StartMinimized"), startMinimized());
_settings->setRunRetroshareOnBoot(
ui.chkRunRetroshareAtSystemStartup->isChecked());
return true;
}
/** Loads the settings for this page */
void
GeneralPage::load()
{
ui.chkRunRetroshareAtSystemStartup->setChecked(
_settings->runRetroshareOnBoot());
ui.checkStartMinimized->setChecked(_settings->value(QString::fromUtf8("StartMinimized"), false).toBool());
}
bool GeneralPage::startMinimized() const {
if(ui.checkStartMinimized->isChecked()) return true;
return ui.checkStartMinimized->isChecked();
}
/** Called when the "show on startup" checkbox is toggled. */
void
GeneralPage::toggleShowOnStartup(bool checked)
{
//RshareSettings _settings;
_settings->setShowMainWindowAtStart(checked);
}