mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 13:19:32 -04:00
- moved the chat setting to the section [Chat]
- cleaned some comments of the settings classes git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2940 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3e968b68c3
commit
a8c4b3b107
7 changed files with 23 additions and 43 deletions
|
@ -21,17 +21,13 @@
|
|||
|
||||
#include "rsiface/rspeers.h" //for rsPeers variable
|
||||
#include "rsiface/rsiface.h"
|
||||
#include "rsharesettings.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QClipboard>
|
||||
|
||||
#include <rshare.h>
|
||||
#include "ChatPage.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
#include "RSettings.h"
|
||||
|
||||
/** Constructor */
|
||||
ChatPage::ChatPage(QWidget * parent, Qt::WFlags flags)
|
||||
|
@ -56,13 +52,13 @@ ChatPage::closeEvent (QCloseEvent * event)
|
|||
bool
|
||||
ChatPage::save(QString &errmsg)
|
||||
{
|
||||
RshareSettings settings;
|
||||
RSettings settings(QString("Chat"));
|
||||
|
||||
settings.setValue(QString::fromUtf8("Emoteicons_PrivatChat"), emotePrivatChat());
|
||||
settings.setValue(QString::fromUtf8("Emoteicons_GroupChat"), emoteGroupChat());
|
||||
settings.setValue(QString::fromUtf8("GroupChat_History"), groupchatHistory());
|
||||
settings.setValue(QString::fromUtf8("ChatScreenFont"), fontTempChat.toString());
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -70,7 +66,7 @@ ChatPage::save(QString &errmsg)
|
|||
void
|
||||
ChatPage::load()
|
||||
{
|
||||
RshareSettings settings;
|
||||
RSettings settings(QString("Chat"));
|
||||
|
||||
ui.checkBox_emoteprivchat->setChecked(settings.value(QString::fromUtf8("Emoteicons_PrivatChat"), true).toBool());
|
||||
ui.checkBox_emotegroupchat->setChecked(settings.value(QString::fromUtf8("Emoteicons_GroupChat"), true).toBool());
|
||||
|
|
|
@ -81,7 +81,7 @@ RSettings::defaultValue(const QString &key) const
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
/** Resets all of Vidalia's settings. */
|
||||
/** Resets all settings. */
|
||||
void
|
||||
RSettings::reset()
|
||||
{
|
||||
|
|
|
@ -33,16 +33,16 @@ class RSettings : public QSettings
|
|||
|
||||
public:
|
||||
/** Default constructor. The optional parameter <b>group</b> can be used to
|
||||
* set a prefix that will be prepended to keys specified to VSettings in
|
||||
* set a prefix that will be prepended to keys specified to RSettings in
|
||||
* value() and setValue(). */
|
||||
RSettings(const QString group = QString());
|
||||
|
||||
/** Default constructor. The optional parameter <b>group</b> can be used to
|
||||
* set a prefix that will be prepended to keys specified to VSettings in
|
||||
* set a prefix that will be prepended to keys specified to RSettings in
|
||||
* value() and setValue(). */
|
||||
RSettings(std::string fileName, const QString group = QString());
|
||||
|
||||
/** Resets all of Vidalia's settings. */
|
||||
/** Resets all settings. */
|
||||
static void reset();
|
||||
|
||||
/** Returns the saved value associated with <b>key</b>. If no value has been
|
||||
|
|
|
@ -252,7 +252,7 @@ void RshareSettings::setNotifyFlags(uint flags)
|
|||
setValue(SETTING_NOTIFY_FLAGS, flags);
|
||||
}
|
||||
|
||||
/** Returns true if Vidalia is set to run on system boot. */
|
||||
/** Returns true if RetroShare is set to run on system boot. */
|
||||
bool
|
||||
RshareSettings::runRetroshareOnBoot()
|
||||
{
|
||||
|
@ -268,7 +268,7 @@ RshareSettings::runRetroshareOnBoot()
|
|||
#endif
|
||||
}
|
||||
|
||||
/** If <b>run</b> is set to true, then Vidalia will run on system boot. */
|
||||
/** If <b>run</b> is set to true, then RetroShare will run on system boot. */
|
||||
void
|
||||
RshareSettings::setRunRetroshareOnBoot(bool run)
|
||||
{
|
||||
|
|
|
@ -38,8 +38,7 @@ class QTableWidget;
|
|||
class QToolBar;
|
||||
class QMainWindow;
|
||||
|
||||
/** Handles saving and restoring RShares's settings, such as the
|
||||
* location of Tor, the control port, etc.
|
||||
/** Handles saving and restoring RShares's settings
|
||||
*
|
||||
* NOTE: Qt 4.1 documentation states that constructing a QSettings object is
|
||||
* "very fast", so we shouldn't need to create a global instance of this
|
||||
|
@ -75,7 +74,7 @@ public:
|
|||
/** Returns true if RetroShare's main window should be visible when the
|
||||
* application starts. */
|
||||
bool showMainWindowAtStart();
|
||||
/** Sets whether to show Vidalia's main window when the application starts. */
|
||||
/** Sets whether to show main window when the application starts. */
|
||||
void setShowMainWindowAtStart(bool show);
|
||||
|
||||
/** Returns true if RetroShare should start on system boot. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue