mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 17:53:08 -07:00
- Cleanup systray code
This commit is contained in:
parent
e93fab40fe
commit
10c40c6485
5 changed files with 50 additions and 51 deletions
|
@ -53,7 +53,7 @@
|
|||
#define SEARCHHISTORY_MAXSIZE 50
|
||||
|
||||
/*SEARCH ENGINE START*/
|
||||
SearchEngine::SearchEngine(bittorrent *BTSession, QSystemTrayIcon *myTrayIcon, bool systrayIntegration) : QWidget(), BTSession(BTSession), myTrayIcon(myTrayIcon), systrayIntegration(systrayIntegration){
|
||||
SearchEngine::SearchEngine(bittorrent *BTSession, QSystemTrayIcon *systrayIcon) : QWidget(), BTSession(BTSession), systrayIcon(systrayIcon) {
|
||||
setupUi(this);
|
||||
// new qCompleter to the search pattern
|
||||
startSearchHistory();
|
||||
|
@ -428,8 +428,8 @@ void SearchEngine::updateNova() {
|
|||
void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
bool useNotificationBalloons = settings.value("Preferences/General/NotificationBaloons", true).toBool();
|
||||
if(systrayIntegration && useNotificationBalloons) {
|
||||
myTrayIcon->showMessage(tr("Search Engine"), tr("Search has finished"), QSystemTrayIcon::Information, TIME_TRAY_BALLOON);
|
||||
if(systrayIcon && useNotificationBalloons) {
|
||||
systrayIcon->showMessage(tr("Search Engine"), tr("Search has finished"), QSystemTrayIcon::Information, TIME_TRAY_BALLOON);
|
||||
}
|
||||
if(exitcode){
|
||||
search_status->setText(tr("An error occured during search..."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue