summaryrefslogtreecommitdiffstats
path: root/src/app/actions.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-06-13 22:45:28 +0900
committerMichele Calgaro <[email protected]>2020-06-13 22:45:28 +0900
commit5f44f7b187093ef290315b7f8766b540a31de35f (patch)
tree27ffb7b218199ca04f240c390c52426c65f45dce /src/app/actions.cpp
downloadcodeine-5f44f7b187093ef290315b7f8766b540a31de35f.tar.gz
codeine-5f44f7b187093ef290315b7f8766b540a31de35f.zip
Initial code import from debian snapshot
https://snapshot.debian.org/package/codeine/1.0.1-3.dfsg-3.1/ Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/app/actions.cpp')
-rw-r--r--src/app/actions.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/app/actions.cpp b/src/app/actions.cpp
new file mode 100644
index 0000000..a767a2c
--- /dev/null
+++ b/src/app/actions.cpp
@@ -0,0 +1,27 @@
+// Copyright 2005 Max Howell ([email protected])
+// See COPYING file for licensing information
+
+#include "actions.h"
+#include "debug.h"
+#include "mxcl.library.h"
+#include <qtoolbutton.h>
+#include "xineEngine.h"
+
+namespace Codeine
+{
+ PlayAction::PlayAction( QObject *receiver, const char *slot, KActionCollection *ac )
+ : KToggleAction( i18n("Play"), "player_play", Qt::Key_Space, receiver, slot, ac, "play" )
+ {}
+
+ void
+ PlayAction::setChecked( bool b )
+ {
+ if( videoWindow()->state() == Engine::Empty && sender() && QCString(sender()->className()) == "KToolBarButton" ) {
+ // clicking play when empty means open PlayMediaDialog, but we have to uncheck the toolbar button
+ // as KDElibs sets that checked automatically..
+ ((QToolButton*)sender())->setOn( false );
+ }
+ else
+ KToggleAction::setChecked( b );
+ }
+}