[X2Go-Commits] [mteleplayer] 01/01: Changes to stuff that brings the window to the "front"/"top" when file is loaded...

git-admin at x2go.org git-admin at x2go.org
Fri Jun 27 14:11:29 CEST 2014


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository mteleplayer.

commit 30c45f6c3d18b3d69647c3917749d5932dc01fc8
Author: gznget <opensource at gznianguan.com>
Date:   Fri Jun 27 09:59:19 2014 +0200

    Changes to stuff that brings the window to the "front"/"top" when file is loaded...
---
 serverside/bin/mteleplayer |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/serverside/bin/mteleplayer b/serverside/bin/mteleplayer
index 94dbcbd..70cf9ec 100755
--- a/serverside/bin/mteleplayer
+++ b/serverside/bin/mteleplayer
@@ -484,7 +484,7 @@ sub handleTheLocalSocket {
         } elsif ($saneData =~ /^ENQUEUEDMEDIA\|([0-9a-zA-Z]{24,64})\|([A-Z]{3,4})\|.*$/) {
           # Do something here to add this to the playlist in the GUI....
           # but for now we're just going to start playing the new file...
-          actOnEnqueuedMEDIA($1,$2);
+          actOnEnqueuedMEDIA($1,$2,1);
         } elsif ($saneData =~ /^CORE\|STATECHANGE\|([IRST]{1})\|([0-3]{1})\|([0-1]{1})\|$/) {
           if ($1 eq "S") {
             $sstatusi{'runState'} = "S";
@@ -670,14 +670,16 @@ sub checkDimPosNSend {
 sub  actOnEnqueuedMEDIA {
   my $Type = $_[1];
   if ($_[0] =~ /^([a-zA-Z0-9]{24,64})$/) {
-    my $file = $1; 
+    my $file = $1;
     if ($Type eq "FILE") {
       $PlayerStatus{'currentMediaID'} = $file;
       $PlayerStatus{'currentMediaType'} = "FILE";
       $PlayerStatus{'currentMediaSeek'} = 0;
       appCOM("MPCMD|PLAYMEDIA|$1|FILE|0|0|");    
-      $GTKS{'MainAppWindow'}->iconify;
-      $GTKS{'MainAppWindow'}->deiconify;
+      if ($_[2] eq 1) {  
+        $GTKS{'MainAppWindow'}->iconify;
+        $GTKS{'MainAppWindow'}->deiconify;
+      }
     }
   }
 }
@@ -967,7 +969,7 @@ sub crankFileChooser {
     if (-f $playThisFile) {
       my $isItLoaded = mtpTeKiRemoteFileSetup("FILE:$playThisFile","$X2GoTKSHome/remote/appData/mteleplayer\_$selfSID");
       if ($isItLoaded ne 0) {
-        actOnEnqueuedMEDIA($isItLoaded,"FILE");
+        actOnEnqueuedMEDIA($isItLoaded,"FILE",0);
       }
     }
   }

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/mteleplayer.git


More information about the x2go-commits mailing list