mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
-some icon changes
-Start Minimized settings Checkbox -disabled Help in Preferences -added for BandwidthGraph a function to use down and up from rsiface, does not work correct. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@661 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5c6e558942
commit
4c840b5c7e
@ -44,7 +44,7 @@
|
|||||||
#define SETTING_SHEETNAME "SheetName"
|
#define SETTING_SHEETNAME "SheetName"
|
||||||
|
|
||||||
#define SETTING_DATA_DIRECTORY "DataDirectory"
|
#define SETTING_DATA_DIRECTORY "DataDirectory"
|
||||||
|
#define SETTING_SHOW_MAINWINDOW_AT_START "ShowMainWindowAtStart"
|
||||||
#define SETTING_BWGRAPH_FILTER "StatisticDialog/BWLineFilter"
|
#define SETTING_BWGRAPH_FILTER "StatisticDialog/BWLineFilter"
|
||||||
#define SETTING_BWGRAPH_OPACITY "StatisticDialog/Opacity"
|
#define SETTING_BWGRAPH_OPACITY "StatisticDialog/Opacity"
|
||||||
#define SETTING_BWGRAPH_ALWAYS_ON_TOP "StatisticDialog/AlwaysOnTop"
|
#define SETTING_BWGRAPH_ALWAYS_ON_TOP "StatisticDialog/AlwaysOnTop"
|
||||||
@ -84,6 +84,7 @@ RshareSettings::RshareSettings()
|
|||||||
: QSettings(SETTINGS_FILE, QSettings::IniFormat)
|
: QSettings(SETTINGS_FILE, QSettings::IniFormat)
|
||||||
{
|
{
|
||||||
setDefault(SETTING_STYLE, DEFAULT_STYLE);
|
setDefault(SETTING_STYLE, DEFAULT_STYLE);
|
||||||
|
setDefault(SETTING_SHOW_MAINWINDOW_AT_START, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the default value of <b>key</b> to be <b>val</b>. */
|
/** Sets the default value of <b>key</b> to be <b>val</b>. */
|
||||||
@ -208,7 +209,20 @@ void RshareSettings::setBWGraphAlwaysOnTop(bool alwaysOnTop)
|
|||||||
setValue(SETTING_BWGRAPH_ALWAYS_ON_TOP, alwaysOnTop);
|
setValue(SETTING_BWGRAPH_ALWAYS_ON_TOP, alwaysOnTop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns true if RetroShare's main window should be visible when the
|
||||||
|
* application starts. */
|
||||||
|
bool
|
||||||
|
RshareSettings::showMainWindowAtStart()
|
||||||
|
{
|
||||||
|
return value(SETTING_SHOW_MAINWINDOW_AT_START).toBool();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Sets whether to show RetroShare's main window when the application starts. */
|
||||||
|
void
|
||||||
|
RshareSettings::setShowMainWindowAtStart(bool show)
|
||||||
|
{
|
||||||
|
setValue(SETTING_SHOW_MAINWINDOW_AT_START, show);
|
||||||
|
}
|
||||||
|
|
||||||
/** Saving Generic Widget Size / Location */
|
/** Saving Generic Widget Size / Location */
|
||||||
|
|
||||||
|
@ -83,6 +83,12 @@ public:
|
|||||||
/** Gets the stylesheet */
|
/** Gets the stylesheet */
|
||||||
QString getSheetName();
|
QString getSheetName();
|
||||||
|
|
||||||
|
/** 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. */
|
||||||
|
void setShowMainWindowAtStart(bool show);
|
||||||
|
|
||||||
|
|
||||||
/* Get the destination log file. */
|
/* Get the destination log file. */
|
||||||
QString getLogFile();
|
QString getLogFile();
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
#define IMAGE_SEARCH ":/images/filefind.png"
|
#define IMAGE_SEARCH ":/images/filefind.png"
|
||||||
#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
|
#define IMAGE_TRANSFERS ":/images/ktorrent32.png"
|
||||||
#define IMAGE_LINKS ":/images/knewsticker24.png"
|
#define IMAGE_LINKS ":/images/knewsticker24.png"
|
||||||
#define IMAGE_FILES ":/images/folder_green.png"
|
#define IMAGE_FILES ":/images/fileshare24.png"
|
||||||
#define IMAGE_CHANNELS ":/images/channels.png"
|
#define IMAGE_CHANNELS ":/images/channels.png"
|
||||||
#define IMAGE_PREFERENCES ":/images/settings16.png"
|
#define IMAGE_PREFERENCES ":/images/settings16.png"
|
||||||
#define IMAGE_CHAT ":/images/groupchat.png"
|
#define IMAGE_CHAT ":/images/groupchat.png"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#include "rshare.h"
|
#include "rshare.h"
|
||||||
#include "GeneralDialog.h"
|
#include "GeneralDialog.h"
|
||||||
|
#include <QSystemTrayIcon>
|
||||||
|
|
||||||
/** Constructor */
|
/** Constructor */
|
||||||
GeneralDialog::GeneralDialog(QWidget *parent)
|
GeneralDialog::GeneralDialog(QWidget *parent)
|
||||||
@ -50,6 +50,18 @@ GeneralDialog::GeneralDialog(QWidget *parent)
|
|||||||
//loadStyleSheet("Default");
|
//loadStyleSheet("Default");
|
||||||
loadqss();
|
loadqss();
|
||||||
|
|
||||||
|
if (QSystemTrayIcon::isSystemTrayAvailable()){
|
||||||
|
|
||||||
|
/* Check if we are supposed to show our main window on startup */
|
||||||
|
ui.chkShowOnStartup->setChecked(_settings->showMainWindowAtStart());
|
||||||
|
if (ui.chkShowOnStartup->isChecked())
|
||||||
|
show();
|
||||||
|
} else {
|
||||||
|
/* Don't let people hide the main window, since that's all they have. */
|
||||||
|
ui.chkShowOnStartup->hide();
|
||||||
|
//show();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Destructor */
|
/** Destructor */
|
||||||
@ -70,6 +82,9 @@ GeneralDialog::save(QString &errmsg)
|
|||||||
_settings->setInterfaceStyle(ui.cmboStyle->currentText());
|
_settings->setInterfaceStyle(ui.cmboStyle->currentText());
|
||||||
_settings->setSheetName(ui.styleSheetCombo->currentText());
|
_settings->setSheetName(ui.styleSheetCombo->currentText());
|
||||||
|
|
||||||
|
_settings->setValue(QString::fromUtf8("StartMinimized"), startMinimized());
|
||||||
|
|
||||||
|
|
||||||
/* Set to new style */
|
/* Set to new style */
|
||||||
Rshare::setStyle(ui.cmboStyle->currentText());
|
Rshare::setStyle(ui.cmboStyle->currentText());
|
||||||
return true;
|
return true;
|
||||||
@ -85,6 +100,8 @@ GeneralDialog::load()
|
|||||||
index = ui.cmboStyle->findData(Rshare::style().toLower());
|
index = ui.cmboStyle->findData(Rshare::style().toLower());
|
||||||
ui.cmboStyle->setCurrentIndex(index);
|
ui.cmboStyle->setCurrentIndex(index);
|
||||||
|
|
||||||
|
ui.checkStartMinimized->setChecked(_settings->value(QString::fromUtf8("StartMinimized"), false).toBool());
|
||||||
|
|
||||||
|
|
||||||
ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText(_settings->getSheetName()));
|
ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText(_settings->getSheetName()));
|
||||||
|
|
||||||
@ -132,3 +149,8 @@ void GeneralDialog::loadqss()
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GeneralDialog::startMinimized() const {
|
||||||
|
if(ui.checkStartMinimized->isChecked()) return true;
|
||||||
|
return ui.checkStartMinimized->isChecked();
|
||||||
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "configpage.h"
|
#include "configpage.h"
|
||||||
#include "ui_GeneralDialog.h"
|
#include "ui_GeneralDialog.h"
|
||||||
|
|
||||||
|
|
||||||
class GeneralDialog : public ConfigPage
|
class GeneralDialog : public ConfigPage
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -46,7 +47,7 @@ public:
|
|||||||
bool save(QString &errmsg);
|
bool save(QString &errmsg);
|
||||||
/** Loads the settings for this page */
|
/** Loads the settings for this page */
|
||||||
void load();
|
void load();
|
||||||
|
bool startMinimized() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
|
@ -553,7 +553,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0" >
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
@ -600,7 +600,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0" >
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
@ -688,7 +688,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" stdset="0" >
|
||||||
<size>
|
<size>
|
||||||
<width>181</width>
|
<width>181</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
@ -735,6 +735,51 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>280</y>
|
||||||
|
<width>441</width>
|
||||||
|
<height>80</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title" >
|
||||||
|
<string>System tray</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QCheckBox" name="chkShowOnStartup" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>401</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Show MainWindow at Startup</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QCheckBox" name="checkStartMinimized" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>401</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Start minimized</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>cmboLanguage</tabstop>
|
<tabstop>cmboLanguage</tabstop>
|
||||||
|
@ -61,8 +61,8 @@ PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
|
|||||||
//ui.stackPages->add(new CryptographyDialog(ui.stackPages),
|
//ui.stackPages->add(new CryptographyDialog(ui.stackPages),
|
||||||
// createPageAction(QIcon(IMAGE_CRYPTOGRAPHY), tr("Cryptography"), grp));
|
// createPageAction(QIcon(IMAGE_CRYPTOGRAPHY), tr("Cryptography"), grp));
|
||||||
|
|
||||||
ui.stackPages->add(new LogDialog(ui.stackPages),
|
//ui.stackPages->add(new LogDialog(ui.stackPages),
|
||||||
createPageAction(QIcon(IMAGE_ABOUT), tr("About"), grp));
|
// createPageAction(QIcon(IMAGE_ABOUT), tr("About"), grp));
|
||||||
|
|
||||||
|
|
||||||
/* Create the toolbar */
|
/* Create the toolbar */
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
/* Images for context menu icons */
|
/* Images for context menu icons */
|
||||||
#define IMAGE_DOWNLOAD ":/images/start.png"
|
#define IMAGE_DOWNLOAD ":/images/start.png"
|
||||||
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
#define IMAGE_HASH_BUSY ":/images/settings.png"
|
||||||
#define IMAGE_HASH_DONE ":/images/folder_green.png"
|
#define IMAGE_HASH_DONE ":/images/friendsfolder24.png"
|
||||||
#define IMAGE_MSG ":/images/message-mail.png"
|
#define IMAGE_MSG ":/images/message-mail.png"
|
||||||
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
#define IMAGE_ATTACHMENT ":/images/attachment.png"
|
||||||
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
#define IMAGE_FRIEND ":/images/peers_16x16.png"
|
||||||
|
@ -538,7 +538,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap" >
|
<property name="pixmap" >
|
||||||
<pixmap resource="images.qrc" >:/images/folder_green16.png</pixmap>
|
<pixmap resource="images.qrc" >:/images/fileshare16.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include <rshare.h>
|
#include <rshare.h>
|
||||||
#include <control/bandwidthevent.h>
|
#include <control/bandwidthevent.h>
|
||||||
#include "bwgraph.h"
|
#include "bwgraph.h"
|
||||||
|
#include "rsiface/rsiface.h"
|
||||||
|
|
||||||
|
|
||||||
#define BWGRAPH_LINE_SEND (1u<<0)
|
#define BWGRAPH_LINE_SEND (1u<<0)
|
||||||
#define BWGRAPH_LINE_RECV (1u<<1)
|
#define BWGRAPH_LINE_RECV (1u<<1)
|
||||||
@ -95,6 +97,18 @@ BandwidthGraph::customEvent(QEvent *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
BandwidthGraph::timerEvent( QTimerEvent * )
|
||||||
|
{
|
||||||
|
/* set users/friends/network */
|
||||||
|
float downKb = 0;
|
||||||
|
float upKb = 0;
|
||||||
|
rsicontrol -> ConfigGetDataRates(downKb, upKb);
|
||||||
|
|
||||||
|
updateGraph(downKb,upKb);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/** Binds events to actions. */
|
/** Binds events to actions. */
|
||||||
void
|
void
|
||||||
BandwidthGraph::createActions()
|
BandwidthGraph::createActions()
|
||||||
|
@ -52,6 +52,7 @@ public slots:
|
|||||||
protected:
|
protected:
|
||||||
/** Called to deliver a bandwidth update event from Tor. */
|
/** Called to deliver a bandwidth update event from Tor. */
|
||||||
void customEvent(QEvent *event);
|
void customEvent(QEvent *event);
|
||||||
|
void timerEvent(QTimerEvent*);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/** Adds new data to the graph */
|
/** Adds new data to the graph */
|
||||||
|
@ -93,6 +93,8 @@
|
|||||||
<file>images/filerating3.png</file>
|
<file>images/filerating3.png</file>
|
||||||
<file>images/filerating4.png</file>
|
<file>images/filerating4.png</file>
|
||||||
<file>images/filerating5.png</file>
|
<file>images/filerating5.png</file>
|
||||||
|
<file>images/fileshare16.png</file>
|
||||||
|
<file>images/fileshare24.png</file>
|
||||||
<file>images/find.png</file>
|
<file>images/find.png</file>
|
||||||
<file>images/emoticons/kopete/kopete020.png</file>
|
<file>images/emoticons/kopete/kopete020.png</file>
|
||||||
<file>images/flags/af.png</file>
|
<file>images/flags/af.png</file>
|
||||||
@ -125,6 +127,7 @@
|
|||||||
<file>images/folder_doments.png</file>
|
<file>images/folder_doments.png</file>
|
||||||
<file>images/folder_green.png</file>
|
<file>images/folder_green.png</file>
|
||||||
<file>images/folder_green16.png</file>
|
<file>images/folder_green16.png</file>
|
||||||
|
<file>images/friendsfolder24.png</file>
|
||||||
<file>images/kgames.png</file>
|
<file>images/kgames.png</file>
|
||||||
<file>images/graph-area.png</file>
|
<file>images/graph-area.png</file>
|
||||||
<file>images/graph-line.png</file>
|
<file>images/graph-line.png</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user