13/08/2009
minor uniformity patch for smplayer
One of the things that good Linux applications should have is uniformity. Just like Mac OS X does. All applications should use the same keybindings to perform the same tasks. For example, on _every_ OS X application, in order to quit it you have to press “CMD+Q”, it’s that simple and everybody follows it. Everybody. On Linux though there are some applications that simply don’t care about uniformity. One of these applications is smplayer.
While it is almost standard for Linux applications to quit using Ctrl+Q, smplayer simply doesn’t have this option. It has the option of closing the current video with Ctrl+X but it doesn’t have the simple option of quitting using a keyboard shortcut.
So, the next (oneliner actually) patch does simply what I described above. It makes smplayer quit using “Ctrl+Q”.
The screenshot that shows what the patch does:
smplayer-0.6.8-quit.patch:
--- smplayer-0.6.8/src/baseguiplus.cpp 2009-08-13 16:07:04.000000000 +0300
+++ smplayer-0.6.8/src/baseguiplus.cpp 2009-08-13 16:08:22.000000000 +0300
@@ -67,8 +67,7 @@
tray->setToolTip( "SMPlayer" );
connect( tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
-
- quitAct = new MyAction(this, "quit");
+ quitAct = new MyAction(QKeySequence("Ctrl+Q"), this, "quit");
connect( quitAct, SIGNAL(triggered()), this, SLOT(quit()) );
openMenu->addAction(quitAct);
And a patched ebuild for smplayer-0.6.8 to use this minor patch (only one line is added to the ebuild):
smplayer-0.6.8-r1.ebuild
P.S. Keybindings in smplayer can be set through Preferences, and someone could actually put Ctrl+Q as the quit shortcut but I think that this should be the default setting like most other applications have it. Uniformity matters.
Filed by kargig at 16:19 under Gentoo,Linux
Tags: bug, bugfix, ebuild, Gentoo, Linux, Mac, MacOSX, media player, patch, smplayer
5 Comments | 10,881 views
Yeah, nice.
And how about “Ctrl+F” for opening a file? Seems to be “Ctrl+O” for the rest of the world.
You are probably correct on that as well…but I can slightly push myself to accept ctrl+f for opening files on smplayer because there is no search option available. If there was a search option then ctrl+o for opening and ctrl+f for finding would be mandatory regarding uniformity.
Anyway…if you still want to change opening files on smplayer with ctrl+o here’s another patch to do it:
--- src/basegui.cpp 2009-07-15 02:08:26.000000000 +0300
+++ src/basegui.cpp.new 2009-08-13 19:25:04.000000000 +0300
@@ -285,7 +285,7 @@
void BaseGui::createActions() {
// Menu File
- openFileAct = new MyAction( QKeySequence("Ctrl+F"), this, "open_file" );
+ openFileAct = new MyAction( QKeySequence("Ctrl+O"), this, "open_file" );
connect( openFileAct, SIGNAL(triggered()),
this, SLOT(openFile()) );
Applied in smplayer 0.6.8 in Gentoo, without revbump. Thanks
So you wrote the whole post about the fact that you wrote one patch which changed one line? Great…
If you actually read the post you would notice the word “uniformity” which is used like 10 times. Anyway…