Created
May 20, 2013 19:15
-
-
Save Korvox/5614695 to your computer and use it in GitHub Desktop.
Diff patch to kaffeine to put it in the system tray when you have scheduled (or active) recordings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp | |
index f96af22..915515c 100644 | |
--- a/src/mainwindow.cpp | |
+++ b/src/mainwindow.cpp | |
@@ -36,6 +36,8 @@ | |
#include <KTabBar> | |
#include <KToolBar> | |
#include "dvb/dvbtab.h" | |
+#include "dvb/dvbmanager.h" | |
+#include "dvb/dvbrecording.h" | |
#include "playlist/playlisttab.h" | |
#include "configuration.h" | |
#include "configurationdialog.h" | |
@@ -729,3 +731,12 @@ void MainWindow::leaveEvent(QEvent *event) | |
KMainWindow::leaveEvent(event); | |
} | |
+ | |
+bool MainWindow::queryClose() | |
+{ | |
+ if(dvbTab->getManager()->getRecordingModel()->hasRecordings()) { | |
+ hide(); | |
+ return false; | |
+ } | |
+ return true; | |
+} | |
diff --git a/src/mainwindow.h b/src/mainwindow.h | |
index 6b5c0cd..cf74db9 100644 | |
--- a/src/mainwindow.h | |
+++ b/src/mainwindow.h | |
@@ -75,6 +75,7 @@ private: | |
bool event(QEvent *event); | |
void keyPressEvent(QKeyEvent *event); | |
void leaveEvent(QEvent *event); | |
+ bool queryClose(); | |
KActionCollection *collection; | |
KRecentFilesAction *actionOpenRecent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment