Browse Source

- COSMETIC: Use alternating row colors in transfer list (set in program preferences)

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
6f6e453ae4
  1. 1
      Changelog
  2. 2
      src/GUI.cpp
  3. 3
      src/options_imp.cpp
  4. 5
      src/preferences.h
  5. 195
      src/ui/options.ui

1
Changelog

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
- FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only)
- FEATURE: Torrent files/folders can be renamed
- COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
- COSMETIC: Use alternating row colors in transfer list (set in program preferences)
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
- FEATURE: Added program option to disable splash screen

2
src/GUI.cpp

@ -724,7 +724,7 @@ void GUI::loadPreferences(bool configure_session) { @@ -724,7 +724,7 @@ void GUI::loadPreferences(bool configure_session) {
}
unsigned int new_refreshInterval = Preferences::getRefreshInterval();
transferList->setRefreshInterval(new_refreshInterval);
transferList->setAlternatingRowColors(Preferences::useAlternatingRowColors());
// Queueing System
if(Preferences::isQueueingSystemEnabled()) {
if(!configure_session || !BTSession->isQueueingEnabled()) {

3
src/options_imp.cpp

@ -181,6 +181,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ @@ -181,6 +181,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(checkConfirmExit, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkSpeedInTitle, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(spinRefreshInterval, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
connect(checkAltRowColors, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkNoSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkCloseToSystray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
connect(checkMinimizeToSysTray, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
@ -360,6 +361,7 @@ void options_imp::saveOptions(){ @@ -360,6 +361,7 @@ void options_imp::saveOptions(){
settings.setValue(QString::fromUtf8("ExitConfirm"), confirmOnExit());
settings.setValue(QString::fromUtf8("SpeedInTitleBar"), speedInTitleBar());
settings.setValue(QString::fromUtf8("RefreshInterval"), getRefreshInterval());
settings.setValue(QString::fromUtf8("AlternatingRowColors"), checkAltRowColors->isChecked());
settings.setValue(QString::fromUtf8("SystrayEnabled"), systrayIntegration());
settings.setValue(QString::fromUtf8("CloseToTray"), closeToTray());
settings.setValue(QString::fromUtf8("MinimizeToTray"), minimizeToTray());
@ -565,6 +567,7 @@ void options_imp::loadOptions(){ @@ -565,6 +567,7 @@ void options_imp::loadOptions(){
checkConfirmExit->setChecked(Preferences::confirmOnExit());
checkSpeedInTitle->setChecked(Preferences::speedInTitleBar());
spinRefreshInterval->setValue(Preferences::getRefreshInterval());
checkAltRowColors->setChecked(Preferences::useAlternatingRowColors());
checkNoSystray->setChecked(!Preferences::systrayIntegration());
checkDisplayToolbar->setChecked(Preferences::isToolbarDisplayed());
checkNoSplash->setChecked(Preferences::isSlashScreenDisabled());

5
src/preferences.h

@ -64,6 +64,11 @@ public: @@ -64,6 +64,11 @@ public:
return settings.value(QString::fromUtf8("Preferences/General/RefreshInterval"), 1500).toUInt();
}
static bool useAlternatingRowColors() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/General/AlternatingRowColors"), true).toBool();
}
static bool systrayIntegration() {
QSettings settings("qBittorrent", "qBittorrent");
return settings.value(QString::fromUtf8("Preferences/General/SystrayEnabled"), true).toBool();

195
src/ui/options.ui

@ -235,15 +235,15 @@ @@ -235,15 +235,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>620</width>
<height>495</height>
<width>602</width>
<height>590</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QGroupBox" name="UISettingsBox">
<property name="title">
<string>User interface settings</string>
<string>User interface</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
@ -271,6 +271,22 @@ @@ -271,6 +271,22 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_i18n_info_2">
<property name="font">
<font>
<pointsize>8</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>(Requires restart)</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -286,22 +302,6 @@ @@ -286,22 +302,6 @@
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lbl_i18n_info_2">
<property name="font">
<font>
<pointsize>8</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>&lt;b&gt;Note:&lt;/b&gt; Changes will be applied after qBittorrent is restarted.</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout">
<item>
@ -389,12 +389,18 @@ @@ -389,12 +389,18 @@
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Transfer list</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_27">
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Transfer list refresh interval:</string>
<string>Refresh interval:</string>
</property>
</widget>
</item>
@ -434,59 +440,15 @@ @@ -434,59 +440,15 @@
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QGroupBox" name="systrayBox">
<property name="title">
<string>System tray icon</string>
</property>
<layout class="QVBoxLayout">
<item>
<widget class="QCheckBox" name="checkNoSystray">
<widget class="QCheckBox" name="checkAltRowColors">
<property name="text">
<string>Disable system tray icon</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkCloseToSystray">
<property name="text">
<string comment="i.e: The systray tray icon will still be visible when closing the main window.">Close to tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkMinimizeToSysTray">
<property name="text">
<string>Minimize to tray</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkStartMinimized">
<property name="text">
<string>Start minimized</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkSystrayBalloons">
<property name="text">
<string>Show notification balloons in tray</string>
<string extracomment="In transfer list, one every two rows will have grey background.">Use alternating row colors</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QGroupBox" name="ActDblClickBox">
<property name="sizePolicy">
@ -495,8 +457,17 @@ @@ -495,8 +457,17 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">QGroupBox::title {
font-weight: normal;
margin-left: -2px;
}
QGroupBox {
border-width: 0;
}</string>
</property>
<property name="title">
<string comment="Action executed when doucle-clicking on an item in transfer (download/upload) list">Action on double click</string>
<string comment="Action executed when doucle-clicking on an item in transfer (download/upload) list">Action on double click:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
@ -544,10 +515,6 @@ @@ -544,10 +515,6 @@
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="_5">
<item>
<widget class="QLabel" name="lblUploadList">
<property name="text">
@ -569,53 +536,67 @@ @@ -569,53 +536,67 @@
</item>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QGroupBox" name="systrayBox">
<property name="title">
<string>System tray icon</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
<layout class="QVBoxLayout">
<item>
<widget class="QCheckBox" name="checkNoSystray">
<property name="text">
<string>Disable system tray icon</string>
</property>
</spacer>
</widget>
</item>
</layout>
<item>
<widget class="QCheckBox" name="checkCloseToSystray">
<property name="text">
<string comment="i.e: The systray tray icon will still be visible when closing the main window.">Close to tray</string>
</property>
</widget>
</item>
</layout>
<item>
<widget class="QCheckBox" name="checkMinimizeToSysTray">
<property name="text">
<string>Minimize to tray</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
<widget class="QCheckBox" name="checkStartMinimized">
<property name="text">
<string>Start minimized</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkSystrayBalloons">
<property name="text">
<string>Show notification balloons in tray</string>
</property>
</spacer>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
@ -637,7 +618,7 @@ @@ -637,7 +618,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-27</y>
<y>0</y>
<width>644</width>
<height>504</height>
</rect>
@ -2625,8 +2606,8 @@ QGroupBox { @@ -2625,8 +2606,8 @@ QGroupBox {
<rect>
<x>0</x>
<y>0</y>
<width>452</width>
<height>192</height>
<width>620</width>
<height>495</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_24">

Loading…
Cancel
Save