Browse Source

Still simplifying program options

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
08a08e4b24
  1. 10
      src/deletionconfirmationdlg.h
  2. 2541
      src/options_imp.cpp
  3. 64
      src/ui/confirmdeletiondlg.ui
  4. 63
      src/ui/options.ui

10
src/deletionconfirmationdlg.h

@ -44,6 +44,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
setupUi(this); setupUi(this);
move(misc::screenCenter(this)); move(misc::screenCenter(this));
checkPermDelete->setChecked(Preferences::deleteTorrentFilesAsDefault()); checkPermDelete->setChecked(Preferences::deleteTorrentFilesAsDefault());
connect(checkPermDelete, SIGNAL(clicked()), this, SLOT(updateRememberButtonState()));
buttonBox->setFocus(); buttonBox->setFocus();
} }
@ -60,6 +61,15 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
return false; return false;
} }
private slots:
void updateRememberButtonState() {
rememberBtn->setEnabled(checkPermDelete->isChecked() != Preferences::deleteTorrentFilesAsDefault());
}
void on_rememberBtn_clicked() {
Preferences::setDeleteTorrentFilesAsDefault(checkPermDelete->isChecked());
rememberBtn->setEnabled(false);
}
}; };
#endif // DELETIONCONFIRMATIONDLG_H #endif // DELETIONCONFIRMATIONDLG_H

2541
src/options_imp.cpp

File diff suppressed because it is too large Load Diff

64
src/ui/confirmdeletiondlg.ui

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>399</width> <width>463</width>
<height>143</height> <height>152</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -60,22 +60,49 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QCheckBox" name="checkPermDelete"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="sizePolicy"> <item>
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <widget class="QToolButton" name="rememberBtn">
<horstretch>0</horstretch> <property name="enabled">
<verstretch>0</verstretch> <bool>false</bool>
</sizepolicy> </property>
</property> <property name="toolTip">
<property name="font"> <string>Remember choice</string>
<font> </property>
<italic>true</italic> <property name="text">
</font> <string notr="true"/>
</property> </property>
<property name="text"> <property name="icon">
<string>Delete the files on the hard disk as well</string> <iconset resource="../icons.qrc">
</property> <normaloff>:/Icons/oxygen/encrypted.png</normaloff>:/Icons/oxygen/encrypted.png</iconset>
</widget> </property>
<property name="iconSize">
<size>
<width>20</width>
<height>18</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkPermDelete">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Also delete the files on the hard disk</string>
</property>
</widget>
</item>
</layout>
</item> </item>
<item> <item>
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QDialogButtonBox" name="buttonBox">
@ -97,7 +124,6 @@
</widget> </widget>
<resources> <resources>
<include location="../icons.qrc"/> <include location="../icons.qrc"/>
<include location="icons.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>

63
src/ui/options.ui

@ -240,16 +240,16 @@
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>-24</y>
<width>524</width> <width>506</width>
<height>406</height> <height>430</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_9"> <layout class="QVBoxLayout" name="verticalLayout_9">
<item> <item>
<widget class="QGroupBox" name="UISettingsBox"> <widget class="QGroupBox" name="UISettingsBox">
<property name="title"> <property name="title">
<string>User interface</string> <string>Visual Appearance</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_8"> <layout class="QVBoxLayout" name="verticalLayout_8">
<property name="bottomMargin"> <property name="bottomMargin">
@ -338,20 +338,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QCheckBox" name="checkNoSplash">
<property name="text">
<string>Disable splash screen</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkDeleteTorrentFiles">
<property name="text">
<string>On torrent deletion, also delete files on hard disk as a default</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -475,40 +461,47 @@
<item> <item>
<widget class="QGroupBox" name="systrayBox"> <widget class="QGroupBox" name="systrayBox">
<property name="title"> <property name="title">
<string>System tray icon</string> <string>Desktop</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_12">
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item row="0" column="0"> <item>
<widget class="QCheckBox" name="checkNoSystray"> <widget class="QCheckBox" name="checkShowSplash">
<property name="text"> <property name="text">
<string>Disable system tray icon</string> <string>Show splash screen on start up</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QCheckBox" name="checkMinimizeToSysTray"> <widget class="QCheckBox" name="checkStartMinimized">
<property name="text"> <property name="text">
<string>Minimize to tray</string> <string>Start qBittorrent minimized</string>
</property> </property>
<property name="checked"> </widget>
<bool>false</bool> </item>
<item>
<widget class="QCheckBox" name="checkShowSystray">
<property name="text">
<string>Show qBittorrent icon in notification area</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item>
<widget class="QCheckBox" name="checkCloseToSystray"> <widget class="QCheckBox" name="checkMinimizeToSysTray">
<property name="text"> <property name="text">
<string comment="i.e: The systray tray icon will still be visible when closing the main window.">Close to tray</string> <string>Minimize qBittorrent to notification area</string>
</property>
<property name="checked">
<bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item>
<widget class="QCheckBox" name="checkStartMinimized"> <widget class="QCheckBox" name="checkCloseToSystray">
<property name="text"> <property name="text">
<string>Start minimized</string> <string comment="i.e: The systray tray icon will still be visible when closing the main window.">Close qBittorrent to notification area</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -3089,10 +3082,8 @@ QGroupBox {
<tabstop>tabOption</tabstop> <tabstop>tabOption</tabstop>
<tabstop>comboI18n</tabstop> <tabstop>comboI18n</tabstop>
<tabstop>comboStyle</tabstop> <tabstop>comboStyle</tabstop>
<tabstop>checkNoSystray</tabstop>
<tabstop>checkCloseToSystray</tabstop> <tabstop>checkCloseToSystray</tabstop>
<tabstop>checkMinimizeToSysTray</tabstop> <tabstop>checkMinimizeToSysTray</tabstop>
<tabstop>checkStartMinimized</tabstop>
<tabstop>textSavePath</tabstop> <tabstop>textSavePath</tabstop>
<tabstop>browseSaveDirButton</tabstop> <tabstop>browseSaveDirButton</tabstop>
<tabstop>checkPreallocateAll</tabstop> <tabstop>checkPreallocateAll</tabstop>

Loading…
Cancel
Save