Browse Source

- Implemented "Close to systray"

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
78aef3c3bc
  1. 1
      Changelog
  2. 1
      TODO
  3. 5
      src/GUI.cpp
  4. 22
      src/options.ui
  5. 7
      src/options_imp.cpp
  6. 1
      src/options_imp.h

1
Changelog

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
- FEATURE: Improved the way parameters are passed between qBT instances (socket)
- FEATURE: User is warned when hard drive becomes full and downloads are paused
- FEATURE: Number of complete/incomplete sources are now displayed in download list for each torrent
- FEATURE: Implemented close to systray
- BUGFIX: Two torrents can now have the same name although they are different
- BUGFIX: Fixed download from url that would fail sometimes
- BUGFIX: Save directory was reset to default when filtering files in torrent

1
TODO

@ -42,5 +42,4 @@ @@ -42,5 +42,4 @@
- UPnP support
// In v0.9.0
- Implement close to systray
- Wait for libtorrent v0.12 official release

5
src/GUI.cpp

@ -862,6 +862,11 @@ void GUI::showAbout(){ @@ -862,6 +862,11 @@ void GUI::showAbout(){
// Called when we close the program
void GUI::closeEvent(QCloseEvent *e){
if(options->getGoToSysTrayOnExitingWindow() && !this->isHidden()){
hide();
e->ignore();
return;
}
if(options->getConfirmOnExit()){
if(QMessageBox::question(this,
tr("Are you sure you want to quit? -- qBittorrent"),

22
src/options.ui

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>506</width>
<height>491</height>
<height>508</height>
</rect>
</property>
<property name="minimumSize" >
@ -640,6 +640,19 @@ @@ -640,6 +640,19 @@
</item>
</layout>
</item>
<item>
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3" >
@ -1256,6 +1269,13 @@ @@ -1256,6 +1269,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_closeToSysTray" >
<property name="text" >
<string>Go to systray when closing main window</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>

7
src/options_imp.cpp

@ -141,6 +141,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ @@ -141,6 +141,7 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(checkAdditionDialog, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(txt_savePath, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
connect(check_goToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(check_closeToSysTray, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(clearFinished_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(confirmExit_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(preview_program, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
@ -219,6 +220,7 @@ void options_imp::saveOptions(){ @@ -219,6 +220,7 @@ void options_imp::saveOptions(){
settings.setValue("ConfirmOnExit", getConfirmOnExit());
settings.setValue("ClearFinishedDownloads", getClearFinishedOnExit());
settings.setValue("GoToSystray", getGoToSysTrayOnMinimizingWindow());
settings.setValue("GoToSystrayOnExit", getGoToSysTrayOnExitingWindow());
settings.endGroup();
settings.setValue("PreviewProgram", getPreviewProgram());
// End Misc options
@ -394,6 +396,7 @@ void options_imp::loadOptions(){ @@ -394,6 +396,7 @@ void options_imp::loadOptions(){
confirmExit_checkBox->setChecked(settings.value("ConfirmOnExit", true).toBool());
clearFinished_checkBox->setChecked(settings.value("ClearFinishedDownloads", true).toBool());
check_goToSysTray->setChecked(settings.value("GoToSystray", true).toBool());
check_closeToSysTray->setChecked(settings.value("GoToSystrayOnExit", true).toBool());
settings.endGroup();
preview_program->setText(settings.value("PreviewProgram", QString()).toString());
// End Misc options
@ -437,6 +440,10 @@ bool options_imp::getGoToSysTrayOnMinimizingWindow() const{ @@ -437,6 +440,10 @@ bool options_imp::getGoToSysTrayOnMinimizingWindow() const{
return check_goToSysTray->isChecked();
}
bool options_imp::getGoToSysTrayOnExitingWindow() const{
return check_closeToSysTray->isChecked();
}
bool options_imp::getConfirmOnExit() const{
return confirmExit_checkBox->isChecked();
}

1
src/options_imp.h

@ -71,6 +71,7 @@ class options_imp : public QDialog, private Ui::Dialog{ @@ -71,6 +71,7 @@ class options_imp : public QDialog, private Ui::Dialog{
QString getSavePath() const;
bool getClearFinishedOnExit() const;
bool getGoToSysTrayOnMinimizingWindow() const;
bool getGoToSysTrayOnExitingWindow() const;
bool getConfirmOnExit() const;
QString getPreviewProgram() const;
bool getUseOSDAlways() const;

Loading…
Cancel
Save