mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-16 10:30:01 -04: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
12 changed files with 119 additions and 13 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "rshare.h"
|
||||
#include "GeneralDialog.h"
|
||||
|
||||
#include <QSystemTrayIcon>
|
||||
|
||||
/** Constructor */
|
||||
GeneralDialog::GeneralDialog(QWidget *parent)
|
||||
|
@ -49,7 +49,19 @@ GeneralDialog::GeneralDialog(QWidget *parent)
|
|||
ui.styleSheetCombo->setCurrentIndex(ui.styleSheetCombo->findText("Default"));
|
||||
//loadStyleSheet("Default");
|
||||
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 */
|
||||
|
@ -69,6 +81,9 @@ GeneralDialog::save(QString &errmsg)
|
|||
_settings->setLanguageCode(languageCode);
|
||||
_settings->setInterfaceStyle(ui.cmboStyle->currentText());
|
||||
_settings->setSheetName(ui.styleSheetCombo->currentText());
|
||||
|
||||
_settings->setValue(QString::fromUtf8("StartMinimized"), startMinimized());
|
||||
|
||||
|
||||
/* Set to new style */
|
||||
Rshare::setStyle(ui.cmboStyle->currentText());
|
||||
|
@ -85,6 +100,8 @@ GeneralDialog::load()
|
|||
index = ui.cmboStyle->findData(Rshare::style().toLower());
|
||||
ui.cmboStyle->setCurrentIndex(index);
|
||||
|
||||
ui.checkStartMinimized->setChecked(_settings->value(QString::fromUtf8("StartMinimized"), false).toBool());
|
||||
|
||||
|
||||
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 "ui_GeneralDialog.h"
|
||||
|
||||
|
||||
class GeneralDialog : public ConfigPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -46,7 +47,7 @@ public:
|
|||
bool save(QString &errmsg);
|
||||
/** Loads the settings for this page */
|
||||
void load();
|
||||
|
||||
bool startMinimized() const;
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ p, li { white-space: pre-wrap; }
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
|
@ -600,7 +600,7 @@ p, li { white-space: pre-wrap; }
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>16</height>
|
||||
|
@ -688,7 +688,7 @@ p, li { white-space: pre-wrap; }
|
|||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<size>
|
||||
<width>181</width>
|
||||
<height>20</height>
|
||||
|
@ -735,6 +735,51 @@ p, li { white-space: pre-wrap; }
|
|||
</property>
|
||||
</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>
|
||||
<tabstops>
|
||||
<tabstop>cmboLanguage</tabstop>
|
||||
|
|
|
@ -61,8 +61,8 @@ PreferencesWindow::PreferencesWindow(QWidget *parent, Qt::WFlags flags)
|
|||
//ui.stackPages->add(new CryptographyDialog(ui.stackPages),
|
||||
// createPageAction(QIcon(IMAGE_CRYPTOGRAPHY), tr("Cryptography"), grp));
|
||||
|
||||
ui.stackPages->add(new LogDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_ABOUT), tr("About"), grp));
|
||||
//ui.stackPages->add(new LogDialog(ui.stackPages),
|
||||
// createPageAction(QIcon(IMAGE_ABOUT), tr("About"), grp));
|
||||
|
||||
|
||||
/* Create the toolbar */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue