[X2Go-Commits] [mteleplayer] 02/02: common: fix whitespace errors, replace tabs with spaces in mixed environments, fixup comments.

git-admin at x2go.org git-admin at x2go.org
Thu Jan 8 23:31:24 CET 2015


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

x2go pushed a commit to branch master
in repository mteleplayer.

commit 8fea7983774e6aa7afdbbf11d43888bd50990838
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Thu Jan 8 23:31:12 2015 +0100

    common: fix whitespace errors, replace tabs with spaces in mixed environments, fixup comments.
---
 .../mteleplayer/bin/mteleplayer_clientside         |    4 +-
 serverside/bin/mteleplayer                         |  654 ++++++++++----------
 .../applications/mteleplayer/mTPAArtExtractor      |    4 +-
 .../server/applications/mteleplayer/copyright.txt  |    4 +-
 4 files changed, 333 insertions(+), 333 deletions(-)

diff --git a/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside b/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside
index fe68789..2dbacce 100755
--- a/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside
+++ b/clientside/lib/telekinesis/client/applications/mteleplayer/bin/mteleplayer_clientside
@@ -26,7 +26,7 @@
 # Guangzhou, Guangdong,
 # People's Republic of China
 #
-# Web: 	http://opensource.gznianguan.com/
+# Web: http://opensource.gznianguan.com/
 # E-mail: <opensource at gznianguan.com>
 #
 #################################################################################################################
@@ -617,7 +617,7 @@ sub doOverlayMagic {
 		}
 
 	} elsif ($doWHAT eq "csseswin") {
-appDBugLog("WTF:$olMagic{'CsSesWin_FS'} ne $_[1]");
+		appDBugLog("WTF:$olMagic{'CsSesWin_FS'} ne $_[1]");
 		if ($olMagic{'CsSesWin_FS'} ne $_[1]) {
 			if ($_[1] eq 1) {
 				$olMagic{'CsSesWin_FS'} = 1;
diff --git a/serverside/bin/mteleplayer b/serverside/bin/mteleplayer
index f66bf32..f7859e1 100755
--- a/serverside/bin/mteleplayer
+++ b/serverside/bin/mteleplayer
@@ -8,31 +8,31 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-# 
-# 
+#
+#
 # Copyright (C) 2013-2015 Guangzhou Nianguan Electronics Technology Co.Ltd.
 # Guangzhou Nianguan Electronics Technology Co.Ltd.
-# Jin Fu Building , #90 QiFuRoad, 
+# Jin Fu Building , #90 QiFuRoad,
 # Guangzhou, Guangdong,
 # People's Republic of China
-# 
-# Web: 	http://opensource.gznianguan.com/
+#
+# Web: http://opensource.gznianguan.com/
 # E-mail: <opensource at gznianguan.com>
-# 
+#
 #################################################################################################################
 #
 # Hopefully this code will give you some basic idea on how to write Telekinesis enabled applications.
-# For more indepth information and documentation of the Telekinesis framework, visit:
+# For more in-depth information and documentation of the Telekinesis framework, visit:
 # http://opensource.gznianguan.com/
 #
 ##################################################################################################################
@@ -44,11 +44,11 @@ our $WINDOWTITLE = "mTelePlayer";
 our $APPVER = "0.0.3.0";
 use File::Spec;
 use File::Basename;
-use Glib qw/TRUE FALSE/; 
+use Glib qw/TRUE FALSE/;
 use IO::Socket::UNIX qw( SOCK_STREAM );
 use Time::HiRes qw( usleep gettimeofday tv_interval clock_gettime clock_getres clock_nanosleep clock stat );
 use X2Go::Telekinesis::Apps::AppCore qw(getTeKiPaths tkappDie appDBugLog cleanUpOldAppSession checkAppSesLOCKnDirs initLOCKandDirs getXWinPosNDim showAboutPOP  getBasicServersideInfo epicFailPOP);
-use X2Go::Telekinesis::CommonCore qw(sanitizer  genRandFID  checkPID sanitizeFilePath sanitizeDirPath genRandSID clups); 
+use X2Go::Telekinesis::CommonCore qw(sanitizer  genRandFID  checkPID sanitizeFilePath sanitizeDirPath genRandSID clups);
 use Gtk2;
 use Gtk2::SimpleMenu;
 use Data::Dumper;
@@ -69,7 +69,7 @@ my ($tmpOnlyOneFile, at tmpOpenMedia) = doHandleARGV(@ARGV);
 my @openMedia;
 push @openMedia, $tmpOnlyOneFile;
 
-my $selfSID = sanitizer("tekiappsid","uno");# At some point change this to where we can have multiple instances running or just the UNO. (see roadmap notes)			
+my $selfSID = sanitizer("tekiappsid","uno");# At some point change this to where we can have multiple instances running or just the UNO. (see roadmap notes)
 our %GTKS;
 our %TnW;
 our %PRESISTENT;$PRESISTENT{'AudioVolume'} = 50;
@@ -92,16 +92,16 @@ appDBugLog("-------------------------------------------\nStarting.....");
 sub mediaHockUp {
   my @theEnqueuedMedia;
   my @openMedia = @_;
-  if  (scalar(@openMedia) > 0) {   
+  if  (scalar(@openMedia) > 0) {
     appDBugLog("Loading media into existing session.... at openMedia");
-    foreach my $loadMediaEntry (@openMedia) { 
+    foreach my $loadMediaEntry (@openMedia) {
       if (length(clups($loadMediaEntry)) > 0) {
         my $isItLoaded = mtpTeKiRemoteFileSetup($loadMediaEntry,"$X2GoTKSHome/remote/appData/mteleplayer\_$selfSID");
         if ($isItLoaded ne 0) {
-          appDBugLog("SYMLINK SHOULD NOW EXIST: '$isItLoaded'"); 
+          appDBugLog("SYMLINK SHOULD NOW EXIST: '$isItLoaded'");
           push @theEnqueuedMedia, "$isItLoaded|FILE|";
 
-        } 
+        }
       }
     }
     return @theEnqueuedMedia;
@@ -118,7 +118,7 @@ if (checkAppSesLOCKnDirs($X2GoTKSHome,$APPNAME,$selfSID) eq 1) {
   # Session already exist so we're just going to see if there were any new files to load... then load them to the existing session and exit..
   appDBugLog("There is an EXISTING SESSION....");
   my @theEnqueuedMedia = mediaHockUp(@openMedia);
-  if  (scalar(@theEnqueuedMedia) > 0) { 
+  if  (scalar(@theEnqueuedMedia) > 0) {
     foreach my $teqdmEntry (@theEnqueuedMedia) {
       if ($teqdmEntry =~ /^([0-9a-zA-Z]{24,64})\|([A-Z]{3,4})\|/) {
         doLocalQuickie($TeKiLSockPath,"mteleplayer",$selfSID,"ENQUEUEDMEDIA|$1|$2|");
@@ -130,7 +130,7 @@ if (checkAppSesLOCKnDirs($X2GoTKSHome,$APPNAME,$selfSID) eq 1) {
   appDBugLog("Start NEW Session...");
   initLOCKandDirs($X2GoTKSHome,$APPNAME,$selfSID);
   my @theEnqueuedMedia = mediaHockUp(@openMedia);
-  if  (scalar(@theEnqueuedMedia) > 0) { 
+  if  (scalar(@theEnqueuedMedia) > 0) {
     foreach my $teqdmEntry (@theEnqueuedMedia) {
       if ($teqdmEntry =~ /^([0-9a-zA-Z]{24,64})\|([A-Z]{3,4})\|/) {
 # Do some propper stuff here but for now we're just wanting to start playing the last file processed as soon as everything is good to go...
@@ -151,7 +151,7 @@ if ($PlayerStatus{'initialMediaID'} and $PlayerStatus{'initialMediaType'}) {
 $sstatusi{'runState'} = "R";
 &coreRunSTATEchanges;
 ##################################### ##################################### ##################################### #####################################
-# The Main Gtk2 event loop 
+# The Main Gtk2 event loop
 Gtk2->init;
 &initMainWindow;
 $TnW{'runstatechanges'} = Glib::Timeout->add (100, \&coreRunSTATEchanges);
@@ -163,9 +163,9 @@ my $randomcrap = Glib::Timeout->add (150, sub {if(($sstatusi{'runState'} eq "R")
  }
 } 1;});
 
-Gtk2->main; 
-# The Main Gtk2 event loop 
-##################################### ##################################### ##################################### ##################################### 
+Gtk2->main;
+# The Main Gtk2 event loop
+##################################### ##################################### ##################################### #####################################
 
 appDBugLog("Execution came to a natural end...");
 # Nothing but SUBS past this point....
@@ -177,30 +177,30 @@ appDBugLog("Execution came to a natural end...");
 # This sub, supposedly try to do a clean termination of the application...
 sub initMainWindow {
   $GTKS{'MainAppWindow'} = Gtk2::Window->new("toplevel");
-  $GTKS{'MainAppWindow'}->set_title($WINDOWTITLE); 
-  $GTKS{'MainAppWindow'}->set_border_width(0); 
+  $GTKS{'MainAppWindow'}->set_title($WINDOWTITLE);
+  $GTKS{'MainAppWindow'}->set_border_width(0);
   $GTKS{'MainAppWindow'}->set_position ('center-always');
-#  $GTKS{'MainAppWindow'}->set_size_request(480,400); 
+#  $GTKS{'MainAppWindow'}->set_size_request(480,400);
   $GTKS{'MainAppWindow'}->set_default_icon_from_file("$theSHAREDIR/mteleplayer_ico.png");
   $GTKS{'MainAppWindow'}->signal_connect( delete_event => \&doSelfTerminate);
   $GTKS{'MainAppWindow'}->signal_connect( 'key-press-event' => \&keyPressHandler);
 
   $GTKS{'MainAppWindow_topMenu'} = Gtk2::SimpleMenu->new(
-				menu_tree        => theMenuTreeSUB(),
-				default_callback => \&default_callback,
-				user_data        => 'user data',
-			);
+        menu_tree        => theMenuTreeSUB(),
+        default_callback => \&default_callback,
+        user_data        => 'user data',
+      );
   my $mTPredrnderrIMG = Gtk2::Image->new_from_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ("$theSHAREDIR/redrnderror.png"));
-  $mTPredrnderrIMG->set_size_request(300,300); 
+  $mTPredrnderrIMG->set_size_request(300,300);
   $GTKS{'BlackoutVBox'} = Gtk2::VBox->new(FALSE, 0);
   $GTKS{'BlackoutVBox'}->modify_bg('normal',Gtk2::Gdk::Color->new(0x0000, 0x0000, 0x0000));
-  $GTKS{'BlackoutVBox'}->pack_start($mTPredrnderrIMG, FALSE, FALSE, 0); 
+  $GTKS{'BlackoutVBox'}->pack_start($mTPredrnderrIMG, FALSE, FALSE, 0);
   $GTKS{'BlackoutLABEL'}= Gtk2::Label->new("Telekinesis Link is probably down...\n(Does your current client have Telekinesis support?)");
-  $GTKS{'BlackoutVBox'}->pack_start($GTKS{'BlackoutLABEL'}, FALSE, FALSE, 0); 
+  $GTKS{'BlackoutVBox'}->pack_start($GTKS{'BlackoutLABEL'}, FALSE, FALSE, 0);
   $GTKS{'MainVBox'} = Gtk2::VBox->new(FALSE, 0);
   $GTKS{'CTRLS'}{'TOPMENU'} = Gtk2::EventBox->new;
   $GTKS{'CTRLS'}{'TOPMENU'}->add($GTKS{'MainAppWindow_topMenu'}->{widget});
-  $GTKS{'MainVBox'}->pack_start($GTKS{'CTRLS'}{'TOPMENU'}, FALSE, FALSE, 0); 
+  $GTKS{'MainVBox'}->pack_start($GTKS{'CTRLS'}{'TOPMENU'}, FALSE, FALSE, 0);
 #  my $pBuf = ;
 
   loadToPixBUF("mTPSplash","$theSHAREDIR/splash320.png");
@@ -218,7 +218,7 @@ sub initMainWindow {
   # Player status texts etc..
   ####################################################################
   $mTPMainMediaEBOX = Gtk2::EventBox->new;
-  $mTPMainMediaEBOX->set_size_request(400,300); 
+  $mTPMainMediaEBOX->set_size_request(400,300);
   $mTPMainMediaEBOX->modify_bg('normal',Gtk2::Gdk::Color->new(0x0000, 0x0000, 0x0000));
 
 #  $mTPMainMediaEBOX->add($GTKS{'mTPsplashIMG'});
@@ -245,20 +245,20 @@ sub initMainWindow {
   loadToPixBUF("ctrlsNextTrBTN","$theSHAREDIR/gfx/default/nexttr_btn_32.png");
 
   $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'} = Gtk2::EventBox->new;
-  $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}->set_size_request(32,32); 
+  $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}->set_size_request(32,32);
   $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'} = Gtk2::Image->new_from_pixbuf($GTKS{'PixBUF'}{'ctrlsPlayBTN'});
 
   $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}->signal_connect('button-release-event' => \&eventBtnClickPlayPause);
   $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}->add($GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'});
   stateChangePAUSED(0);# Use this to initiate the play/pause button gfx...
 
-  $GTKS{'CTRLS'}{'BtnPreviousEBOX'} = Gtk2::EventBox->new;$GTKS{'CTRLS'}{'BtnPreviousEBOX'}->set_size_request(32,32); 
-  $GTKS{'CTRLS'}{'BtnNextEBOX'} = Gtk2::EventBox->new;$GTKS{'CTRLS'}{'BtnNextEBOX'}->set_size_request(32,32); 
+  $GTKS{'CTRLS'}{'BtnPreviousEBOX'} = Gtk2::EventBox->new;$GTKS{'CTRLS'}{'BtnPreviousEBOX'}->set_size_request(32,32);
+  $GTKS{'CTRLS'}{'BtnNextEBOX'} = Gtk2::EventBox->new;$GTKS{'CTRLS'}{'BtnNextEBOX'}->set_size_request(32,32);
   $GTKS{'CTRLS'}{'BtnPreviousEBOX'}{'GFX'} = Gtk2::Image->new_from_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ("$theSHAREDIR/gfx/default/prevtr_btn_32.png"));
-  $GTKS{'CTRLS'}{'BtnPreviousEBOX'}{'GFX'}->set_size_request(32,32); 
+  $GTKS{'CTRLS'}{'BtnPreviousEBOX'}{'GFX'}->set_size_request(32,32);
   $GTKS{'CTRLS'}{'BtnPreviousEBOX'}->add($GTKS{'CTRLS'}{'BtnPreviousEBOX'}{'GFX'});
   $GTKS{'CTRLS'}{'BtnNextEBOX'}{'GFX'} = Gtk2::Image->new_from_pixbuf(Gtk2::Gdk::Pixbuf->new_from_file ("$theSHAREDIR/gfx/default/nexttr_btn_32.png"));
-  $GTKS{'CTRLS'}{'BtnNextEBOX'}{'GFX'}->set_size_request(32,32); 
+  $GTKS{'CTRLS'}{'BtnNextEBOX'}{'GFX'}->set_size_request(32,32);
   $GTKS{'CTRLS'}{'BtnNextEBOX'}->add($GTKS{'CTRLS'}{'BtnNextEBOX'}{'GFX'});
   #############################################################################
   # Volume Slider stuff...
@@ -271,11 +271,11 @@ sub initMainWindow {
     $GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'}->set_digits(0);
     $GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'}->can_focus(0);
     $GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'}->set_draw_value(FALSE);
-    $GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'}->set_value($PRESISTENT{'AudioVolume'});  
+    $GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'}->set_value($PRESISTENT{'AudioVolume'});
     $GTKS{'CTRLS'}{'VolumeScaler'}{'EBOX'}->add($GTKS{'CTRLS'}{'VolumeScaler'}{'HSCALE'});
     $GTKS{'CTRLS'}{'VolumeScaler'}{'EBOX'}->show;
     $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'EBOX'} = Gtk2::EventBox->new;
-    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'EBOX'}->set_size_request(32,32); 
+    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'EBOX'}->set_size_request(32,32);
     setVolumeICON($PRESISTENT{'AudioVolume'},"initGFX");
     $GTKS{'CTRLS'}{'VolumeScaler'}{'MainHBOX'} = Gtk2::HBox->new(FALSE, 0);
     $GTKS{'CTRLS'}{'VolumeScaler'}{'MainHBOX'}->pack_start($GTKS{'CTRLS'}{'VolumeScaler'}{'EBOX'}, FALSE, FALSE, 3);
@@ -305,7 +305,7 @@ sub initMainWindow {
 
   $GTKS{'MainAppWindow'}->add($GTKS{'MainVBox'});
 
-  $GTKS{'MainAppWindow'}->signal_connect(event => \&handleMainWindowEvent); 
+  $GTKS{'MainAppWindow'}->signal_connect(event => \&handleMainWindowEvent);
   $GTKS{'MainAppWindow'}->show_all;
   $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->hide_all;
 
@@ -319,7 +319,7 @@ sub toggleBLACKOUT {
 #    $GTKS{'MainAppWindow'}->add($GTKS{'BlackoutVBox'});
 #    $GTKS{'MainAppWindow'}->show_all;
     if ($GTKS{'MainVBox'}->is_sensitive) {
-      $GTKS{'MainVBox'}->set_sensitive(FALSE);  
+      $GTKS{'MainVBox'}->set_sensitive(FALSE);
     }
   } else {
     unless ($GTKS{'MainVBox'}->is_sensitive) {
@@ -337,7 +337,7 @@ sub doUpdateTimeLine {
     my ($formated,undef) = secToMinHrSec($PlayerStatus{'timeLength'},0);
     $GTKS{'mTPMediaTimeEndPosLabel'}->set_text("$formated");
     seekTimeScaler("create",$PlayerStatus{'timeLength'});
-  } 
+  }
   (undef,$timeDispFormat) = secToMinHrSec($PlayerStatus{'timeLength'},0);
 
   if ($_[0] ne $PlayerStatus{'timePos'}) {
@@ -375,10 +375,10 @@ sub seekTimeScaler {
       my $theNewVal = $_[1];
       if (($theNewVal >= 0) and  ($theNewVal <= $PlayerStatus{'timeLength'})) {
         if ($PlayerStatus{'seekTimeLag'} <= 0) {
-          $GTKS{'seekTimeScaler'}->set_value($theNewVal);  
+          $GTKS{'seekTimeScaler'}->set_value($theNewVal);
         } else {
-appDBugLog("#################### ST LAG ######################");
-	  $PlayerStatus{'seekTimeLag'} = 0;
+          appDBugLog("#################### ST LAG ######################");
+          $PlayerStatus{'seekTimeLag'} = 0;
         }
       }
     }
@@ -396,7 +396,7 @@ sub seekTimeChanged {
       appDBugLog("MANUAL SEEK CHANGE ($ValueFromScaler)");
       appCOM("MPCMD|SEEK|$ValueFromScaler|");
     }
-  } 
+  }
 }
 
 sub secToMinHrSec {
@@ -406,7 +406,7 @@ sub secToMinHrSec {
   my $mins  = sprintf("%02d", ($inTime/60)%60);
   my $secs  = sprintf("%02d", $inTime%60);
   my $output = 0;my $outFormat = 0;
-  if ($_[1] eq 4)    {$output = "$days:$hours:$mins:$secs";} 
+  if ($_[1] eq 4)    {$output = "$days:$hours:$mins:$secs";}
   elsif ($_[1] eq 3) {$output = "$hours:$mins:$secs";}
   elsif ($_[1] eq 2) {$output = "$mins:$secs";}
   else {
@@ -418,8 +418,8 @@ sub secToMinHrSec {
 }
 #################################################################################################################################
 #  Mainly for handling the visibility event....
-sub handleMainWindowEvent { 
-  my ($mw, $event) = @_; 
+sub handleMainWindowEvent {
+  my ($mw, $event) = @_;
   if ($event->type eq "configure") {#Size or position change detection.
    checkDimPosNSend();
   } elsif ($event->type eq "visibility-notify") {
@@ -432,8 +432,8 @@ sub handleMainWindowEvent {
   }  elsif ($event->type eq "unmap") {
     $GTKS{'isItVisible'} = 0;
     checkDimPosNSend();
-  } elsif ($event->type eq "window-state") { 
-     ($GTKS{'RelXpos'},$GTKS{'RelYpos'},undef) = getXWinPosNDim($GTKS{'MainAppWindow'}->window->XWINDOW);  
+  } elsif ($event->type eq "window-state") {
+     ($GTKS{'RelXpos'},$GTKS{'RelYpos'},undef) = getXWinPosNDim($GTKS{'MainAppWindow'}->window->XWINDOW);
      if ($event->new_window_state =~ /maximized/) {
        $GTKS{'isItMaximized'} = 1;
      } else {
@@ -441,12 +441,12 @@ sub handleMainWindowEvent {
      }
      checkDimPosNSend();
   }
-} 
+}
 #################################################################################################################################
-# Handle incomming stuff from the localsocket 
+# Handle incomming stuff from the localsocket
 sub handleTheLocalSocket {
    my ( $fd, $condition, $fh ) = @_;
-#    print "$fd, $condition, $fh\n"; 
+#    print "$fd, $condition, $fh\n";
   if ( $condition >= 'hup' or $condition >= 'err' ) {
         $sstatusi{'sockState'} = 0;
         $LocalSocket->close;
@@ -473,7 +473,7 @@ sub handleTheLocalSocket {
             $StartPaused = 1;
           } else {
             ($GTKS{'RelXpos'},$GTKS{'RelYpos'},undef) = getXWinPosNDim($GTKS{'MainAppWindow'}->window->XWINDOW);
-	    $sstatusi{'remoteInitCnt'}++; 	
+            $sstatusi{'remoteInitCnt'}++;
           }
           checkDimPosNSend(1);
           appDBugLog("INITAL MEDIA:$PlayerStatus{'initialMediaID'} $PlayerStatus{'initialMediaType'}");
@@ -482,7 +482,7 @@ sub handleTheLocalSocket {
             appCOM("SET|AUDIOVOLUME|$PRESISTENT{'AudioVolume'}|");
 
             appDBugLog("MPCMD|PLAYMEDIA|$PlayerStatus{'currentMediaID'}|FILE|$PlayerStatus{'currentMediaSeek'}|$StartPaused|");
-           
+
             appCOM("MPCMD|PLAYMEDIA|$PlayerStatus{'currentMediaID'}|FILE|$PlayerStatus{'currentMediaSeek'}|$StartPaused|");
 
           } else {
@@ -490,12 +490,12 @@ sub handleTheLocalSocket {
             appCOM("SET|AUDIOVOLUME|$PRESISTENT{'AudioVolume'}|");
           }
 
-        
+
 #          appCOM("PLAYFILE|$tmpOnlyOneFile|0|");
   #        sleep 1;
           checkDimPosNSend(1);
 ##############
-# INSERT A BUNCH OF INITIAL STATE STUFF HERE!!! 
+# INSERT A BUNCH OF INITIAL STATE STUFF HERE!!!
 #############3
         } 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....
@@ -511,7 +511,7 @@ sub handleTheLocalSocket {
               $sstatusi{'lastCOMtime'} = (time()+3);
               appDBugLog("##################### REINIT MTP ########################");
               $sstatusi{'runState'} = "R";
-              print $LocalSocket "APP|RESUME|mteleplayer|$selfSID|\n";   
+              print $LocalSocket "APP|RESUME|mteleplayer|$selfSID|\n";
               $GTKS{'MainAppWindow'}->present;
               stateChangePAUSED(0);
             }
@@ -522,7 +522,7 @@ sub handleTheLocalSocket {
           if ($1 =~ /^YO\|?$/) {
             toggleBLACKOUT(0);
             appCOM("SUP");
-          } 
+          }
 
           if ($1 =~ /^ONLYAUDIO\|(\d)\|.*$/) {
             if ($1 eq 1) {
@@ -531,59 +531,59 @@ sub handleTheLocalSocket {
 print "$remoteDir/$PlayerStatus{'currentMediaID'}.jpg\n";
               if (-f "$remoteDir/$PlayerStatus{'currentMediaID'}.jpg") {
                 my $AlbumArt = Gtk2::Gdk::Pixbuf->new_from_file("$remoteDir/$PlayerStatus{'currentMediaID'}.jpg") or appDBugLog("Unable to load '$remoteDir/$PlayerStatus{'currentMediaID'}.jpg' to PixBUF... Is it even a GFX file?");
-		if ($AlbumArt) {
-                $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($AlbumArt);
+                if ($AlbumArt) {
+                  $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($AlbumArt);
                 }
               } else {
                 $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'musicalNote'});
               }
-            } else  { 
+            } else {
               $PlayerStatus{'OnylAudio'} = 0;
               $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'eyesore'});
             }
-          } 
-           
+          }
+
           if ($1 =~ /^CACHING\|([\d\.\%]*)\|.*/) {
             $GTKS{'INFO'}{'PLYRSTAT'}{'LABEL'}->set_text("Caching Media: $1%");
             if ($PlayerStatus{'caching'} ne 1) {
               $PlayerStatus{'caching'} = 1;
               $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'hourGlass'});
- 	      $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->show_all;	
+              $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->show_all;
             }
- 
-          } 
+
+          }
 
           if ($1 =~ /^PAUSED\|(\d)\|/) {
             if ($1 eq 0) {stateChangePAUSED(0);}
             elsif ($1 eq 1) {stateChangePAUSED(1);}
-          } 
+          }
 
 #appDBugLog("SD:$1:SD");
           if ($1 =~ /^UPDATE\|TIME\|(\d*)\|(\d*)\|$/) {
             if ($PlayerStatus{'caching'} eq 1) {
               $PlayerStatus{'caching'} = 0;
- 	      $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->hide_all;	
+              $GTKS{'INFO'}{'PLYRSTAT'}{'EBOX'}->hide_all;
 #              $GTKS{'MainMediaEBOXGFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'eyesore'});
             }
             doUpdateTimeLine($1,$2);
             $PlayerStatus{'currentMediaSeek'} = $1;
             toggleBLACKOUT(0);
-          } 
+          }
           if ($1 =~ /^GIVEMEFIRSTMEDIATOINIT.*/) {
-#sleep 2;  #We're not doing dtis dumb shit anymore?  REMOVE?!!
-#            appCOM("MPCMD|PLAY|$PlayerStatus{'initialMediaID'}|FILE|");    
+#sleep 2;  #We're not doing this dumb shit anymore?  REMOVE?!!
+#            appCOM("MPCMD|PLAY|$PlayerStatus{'initialMediaID'}|FILE|");
 #            actOnEnqueuedMEDIA($PlayerStatus{'initialMediaID'},"FILE");
           }
           if ($1 =~ /^GET\|XPOS\|(\d)\|$/) {
 
 #print "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<   CHECK DIMPOS------------------------------------------------------\n";
             $sstatusi{'X2GoResized'} = 5;
-          }          
+          }
         } elsif ($saneData =~ /^TERMINATE\|([\w\_]*)\|$/) {
           my $vmessage;
-          if ($1 =~ /NO_PAIR1/) 	{$vmessage = "Client and server dont seem to be on the same page....\n\nIncompatible versions of mTelePlayer on the client side...";}
-          elsif ($1 =~ /NO_PAIR2/) 	{$vmessage = "Client and server dont seem to be on the same page....\n\nThe client side does not have mTelePlayer installed!?";}
-          elsif ($1 =~ /DUPLICATE/) 	{$vmessage = "Killed in the name of duplicate termination!";}
+          if ($1 =~ /NO_PAIR1/)     {$vmessage = "Client and server dont seem to be on the same page....\n\nIncompatible versions of mTelePlayer on the client side...";}
+          elsif ($1 =~ /NO_PAIR2/)  {$vmessage = "Client and server dont seem to be on the same page....\n\nThe client side does not have mTelePlayer installed!?";}
+          elsif ($1 =~ /DUPLICATE/) {$vmessage = "Killed in the name of duplicate termination!";}
 
            epicFailPOP($vmessage);
         }
@@ -592,7 +592,7 @@ print "$remoteDir/$PlayerStatus{'currentMediaID'}.jpg\n";
 
 
       }}
-    } else{
+    } else {
         # close socket as there is no data
         appDBugLog("closing localsocket..");
         $LocalSocket->close;
@@ -600,13 +600,13 @@ print "$remoteDir/$PlayerStatus{'currentMediaID'}.jpg\n";
         $fh = undef;
         $sstatusi{'sockState'} = 0;
         return 0;
-          
+
     }
   }
-    
+
   if ($fh) {
     return TRUE;
-  } else { 
+  } else {
     appDBugLog("The connection is closed-!\n");
     return FALSE;
   }
@@ -626,45 +626,45 @@ sub appCOM {
 sub coreRunSTATEchanges {
  unless ($ENV{'EPICFAIL'} or $::EPICFAIL) {
   my $time = time();
-  if (($sstatusi{'prevRunSTATE'} ne $sstatusi{'runState'}) or ($sstatusi{'sockState'} eq 0)) {  
+  if (($sstatusi{'prevRunSTATE'} ne $sstatusi{'runState'}) or ($sstatusi{'sockState'} eq 0)) {
     appDBugLog("Run STATE changed from $sstatusi{'prevRunSTATE'} to $sstatusi{'runState'}!");
     if ($sstatusi{'runState'} ne "T") {
       if (($sstatusi{'sockState'} eq 0) and ( ! defined $LocalSocket)) {
         $sstatusi{'sockState'}  = 1;
         appDBugLog("Attempting to initiate local socket connection...");
-        if ($sstatusi{'sockRetryCnt'} > 0) {# If ther a momentary glitch we'd want to tolerate that but if thers a major problem.... 
+        if ($sstatusi{'sockRetryCnt'} > 0) {# If ther a momentary glitch we'd want to tolerate that but if thers a major problem....
           if ($sstatusi{'sockRetryCnt'} > 10) {# This is a silly attempt at avoiding endless loops when nothing is likely to ever change..
             appDBugLog("Too many retry attemps at opening the socket connection...\nThere is a problem bigger than just a sporadic glitch...");
-	    doSelfTerminate(); 
-          } else { # And if thers a problem why not give it some time to hopefully recover 
-            my $sleepTime = (($sstatusi{'sockRetryCnt'}*100000)*2);# For every attempt we wait a bit longer.... 
+            doSelfTerminate();
+          } else { # And if thers a problem why not give it some time to hopefully recover
+            my $sleepTime = (($sstatusi{'sockRetryCnt'}*100000)*2);# For every attempt we wait a bit longer....
             appDBugLog("Sleeping for: $sleepTime u");
             usleep($sleepTime);
           }
         }
         $sstatusi{'sockRetryCnt'}++;
-        if (-S $TeKiLSockPath) { 
-          $LocalSocket= IO::Socket::UNIX->new( 	Peer      => $TeKiLSockPath,
-                                     	   	Type      => SOCK_STREAM,
-                                        	Timeout   => 10 );
+        if (-S $TeKiLSockPath) {
+          $LocalSocket= IO::Socket::UNIX->new(  Peer      => $TeKiLSockPath,
+                                                Type      => SOCK_STREAM,
+                                                Timeout   => 10 );
         }  else {
           epicFailPOP("No Telekinesis local socket available at: $TeKiLSockPath\n\nIs Telekinesis even running?");
         }
-        if (defined $LocalSocket){ 
+        if (defined $LocalSocket){
           $sstatusi{'sockRetryCnt'} = 0;
           $sstatusi{'sockState'} = 1;
-          appDBugLog("Connected to Local Socket!"); 
+          appDBugLog("Connected to Local Socket!");
           $TnW{'LocalSocketWatcher'} = Glib::IO->add_watch( fileno($LocalSocket), [qw/in hup err/], \&handleTheLocalSocket, $LocalSocket);
           print $LocalSocket "APP|INIT|mteleplayer|$selfSID|\n";
         } else {
           $sstatusi{'sockState'} = 0;
           appDBugLog("ERROR: Can't connect to local socket\nTrying to reconnect in a bit...");
-        }   
+        }
+
+
 
-  
- 
       }
-    } 
+    }
     $sstatusi{'prevRunSTATE'} = $sstatusi{'runState'};
   }
   return 1;
@@ -688,7 +688,7 @@ sub checkDimPosNSend {
 #    $GTKS{'RelYpos'} = 0;
 #    $ebxpos = 0;
 #    $ebypos = 0;
-#  } 
+#  }
 
 #  if ($GTKS{'isItMaximized'} eq 1) {
 #    $ebxpos = 0;
@@ -700,7 +700,7 @@ sub checkDimPosNSend {
   my $ebHeight = $mTPMainMediaEBOX->allocation->height;
   my $ebWidth  = $mTPMainMediaEBOX->allocation->width;
   my $FinalX = ($ebxpos+$GTKS{'RelXpos'}+$MWPX);
-  my $FinalY = ($ebypos+$GTKS{'RelYpos'}+$MWPY);  
+  my $FinalY = ($ebypos+$GTKS{'RelYpos'}+$MWPY);
   if ($FinalX ne $GTKS{'lastFinalX'}) {$GTKS{'lastFinalX'} = $FinalX;$doTransmit++;}
   if ($FinalY ne $GTKS{'lastFinalY'}) {$GTKS{'lastFinalY'} = $FinalY;$doTransmit++;}
   if ($ebHeight ne $GTKS{'lastEbHeight'}) {$GTKS{'lastEbHeight'} = $ebHeight;$doTransmit++;}
@@ -708,13 +708,13 @@ sub checkDimPosNSend {
   if ($GTKS{'isItVisible'} ne $GTKS{'lastisItVisible'}) {$GTKS{'lastisItVisible'} = $GTKS{'isItVisible'};$doTransmit++;}
   if (($doTransmit > 0) or ($forceTransmit eq 1)) {
 #    print "X: $FinalX\nY: $FinalY\nH: $ebHeight\nW: $ebWidth\nViz: $GTKS{'isItVisible'}\n\n";
-    appCOM("XPOSTAT|$FinalX|$FinalY|$ebHeight|$ebWidth|$GTKS{'isItVisible'}|"); 
+    appCOM("XPOSTAT|$FinalX|$FinalY|$ebHeight|$ebWidth|$GTKS{'isItVisible'}|");
   }
- 
+
 }
 
 #################################################################################################################################
-# Media Loading STUFF 
+# Media Loading STUFF
 
 sub  actOnEnqueuedMEDIA {
   my $Type = $_[1];
@@ -724,8 +724,8 @@ sub  actOnEnqueuedMEDIA {
       $PlayerStatus{'currentMediaID'} = $file;
       $PlayerStatus{'currentMediaType'} = "FILE";
       $PlayerStatus{'currentMediaSeek'} = 0;
-      appCOM("MPCMD|PLAYMEDIA|$1|FILE|0|0|");    
-      if ($_[2] eq 1) {  
+      appCOM("MPCMD|PLAYMEDIA|$1|FILE|0|0|");
+      if ($_[2] eq 1) {
         $GTKS{'MainAppWindow'}->present;
       }
     }
@@ -750,7 +750,7 @@ sub doHandleARGV {
         push @OpenMedia, "URL:$1://$2";
       }
     } else {
-      my $FilePath = sanitizeFilePath($ent); 
+      my $FilePath = sanitizeFilePath($ent);
       if ($FilePath ne 0) {
         push @OpenMedia, "FILE:$FilePath";
       }
@@ -769,63 +769,63 @@ sub mtpTeKiRemoteFileSetup {
     # If its not a media file... its not "a file to us" anyway....
     if ($isItMedia eq 1) {
 #      print "Type: $AorV\n",Dumper(%Info),"\n";
-      # Here comes the BLACK magick.... WOOOOOOOOOH SO COMPLICATED..... 
-      # (Expecting some elaborate obscure "alien" math crunch function? Disapointingly STUPID simple, right?)
-      # Basicaly we're just making i symlink in to SSHFS remoted diretory... to the file we want to be able to crank on the other end...
-      # For this to work... SSHFS need to follow symlinks on the server side... The "down side" is that the client cant tell the difference 
-      # between symlinks and actuall files... thought... that does not really matter is this case...
-      # Ofcourse we on the serverside know the difference between a link and and a file...
+      # Here comes the BLACK magic.... WOOOOOOOOOH SO COMPLICATED.....
+      # (Expecting some elaborate obscure "alien" math crunch function? Disappointingly STUPID simple, right?)
+      # Basically we're just making i symlink in to SSHFS remote diretory... to the file we want to be able to crank on the other end...
+      # For this to work... SSHFS needs to follow symlinks on the server side... The "down side" is that the client can't tell the difference
+      # between symlinks and actual files... though... that does not really matter is this case...
+      # Of course on the server side we know the difference between a link and a file...
       my $uniqueFileID = genRandFID();
-      if (-l "$remoteDir/$uniqueFileID.file") {$uniqueFileID = genRandFID();}# Just incase of the unlikely event that we get a random that is already used...
-      unless (-l "$remoteDir/$uniqueFileID.file") {			     # And in the insanely unlikely event that it happends again.. fk it...
+      if (-l "$remoteDir/$uniqueFileID.file") {$uniqueFileID = genRandFID();}# Just in case of the unlikely event that we get a random that is already used...
+      unless (-l "$remoteDir/$uniqueFileID.file") {                          # And in the insanely unlikely event that it happens again.. fk it...
         symlink($AbsoluteMediaFilePath,"$remoteDir/$uniqueFileID.file");
-        # Later maybe create a <SAME_UNIQUEID>.info file that cointains Title and other stuff that can make the GUI info etc pre load and look smoother....
+        # Later maybe create a <SAME_UNIQUEID>.info file that contains Title and other stuff that can make the GUI info etc pre load and look smoother....
         if (-l "$remoteDir/$uniqueFileID.file") {
           if (($AorV eq "A") and (-x "$theLIBDIR/mTPAArtExtractor")) {
-            system("$theLIBDIR/mTPAArtExtractor $remoteDir/$uniqueFileID.file &");	
+            system("$theLIBDIR/mTPAArtExtractor $remoteDir/$uniqueFileID.file &");
           }
           return $uniqueFileID;
         } else {return 0;}
       }
     } else {
-      appDBugLog("Not MEDIA FILE?: $AbsoluteFilePath"); 
+      appDBugLog("Not MEDIA FILE?: $AbsoluteFilePath");
       return 0;
     }
   } elsif ($line =~ /^URL:(.*)$/) {
-    # URL Handeling stuff here...
+    # URL Handling stuff here...
     # Basically we'll just stuff the URL on the first line of a file.... and save it as <UNIQUEID>.url instead of .file
-    # Probably dont want to be doing any pre verification of media URL....   Just remember to make decent and informative 
-    # error handeling of the main mplayers chaching and failure information...
-    return 0; # for now just return 0.... ofcourse we need to return 1 when this handeling stuff is in place 
+    # Probably don't want to be doing any pre-verification of media URL....   Just remember to make decent and informative
+    # error handling of the main mplayers caching and failure information...
+    return 0; # for now just return 0.... of course we need to return 1 when this handling stuff is in place
   }
 }
 
 #################################################################################################################################
-# Qucikie Connection...
+# Quickie Connection...
 # Is this function generic enough to where it should move to AppCore.pm? (probably)
 sub doLocalQuickie {
   my $TeKiLSockPath = $_[0];
   my $qToAppName = sanitizer("tekiappname",$_[1]);
   my $qToAppSID   = sanitizer("tekiappsid",$_[2]);
   my $stuffToSay = clups($_[3]);
-  if (-S $TeKiLSockPath) { 
-    my $QuickSocket = IO::Socket::UNIX->new( 	Peer      => $TeKiLSockPath,
-                                     	   	Type      => SOCK_STREAM,
-                                        	Timeout   => 10 );
-    if (defined $QuickSocket){ 
-      appDBugLog("Quickie connected...\n	QUICKIE|$qToAppName|$qToAppSID|$stuffToSay|"); 
+  if (-S $TeKiLSockPath) {
+    my $QuickSocket = IO::Socket::UNIX->new(  Peer      => $TeKiLSockPath,
+                                              Type      => SOCK_STREAM,
+                                              Timeout   => 10 );
+    if (defined $QuickSocket){
+      appDBugLog("Quickie connected...\n	QUICKIE|$qToAppName|$qToAppSID|$stuffToSay|");
       print $QuickSocket "\nQUICKIE|$qToAppName|$qToAppSID|$stuffToSay|\n";
       $QuickSocket->close;
       $QuickSocket = undef;
     } else {
       $sstatusi{'sockState'} = 0;
       appDBugLog("ERROR: Can't connect to local socket");
-    }   
+    }
   }  else {return 0;}
 }
 
 #################################################################################################################################
-# various GUI event stuff.... 
+# various GUI event stuff....
 sub setVolumeICON {
   my $volume = sanitizer("anumazlc",$_[0]);
   my $icon = 0;
@@ -837,8 +837,8 @@ sub setVolumeICON {
     loadToPixBUF("ctrlsVolumeIcon80","$theSHAREDIR/gfx/default/audio_vol_80_32.png");
     loadToPixBUF("ctrlsVolumeIcon100","$theSHAREDIR/gfx/default/audio_vol_100_32.png");
 
-    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'} = Gtk2::Image->new_from_pixbuf($GTKS{'PixBUF'}{'ctrlsVolumeIconM'}); 
-    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'}->set_size_request(32,32); 
+    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'} = Gtk2::Image->new_from_pixbuf($GTKS{'PixBUF'}{'ctrlsVolumeIconM'});
+    $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'}->set_size_request(32,32);
     $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'EBOX'}->add($GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'});
   }
   if (($volume eq 0) or ($volume eq "m")) {$icon = "M";}
@@ -851,7 +851,7 @@ sub setVolumeICON {
   if (($icon ne 0) and $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'}) {
     $GTKS{'CTRLS'}{'VolumeScaler'}{'IconBtn'}{'GFX'}->set_from_pixbuf($GTKS{'PixBUF'}{"ctrlsVolumeIcon$icon"});
   }
- 
+
 }
 
 sub changeAudioVolume {
@@ -861,7 +861,7 @@ sub changeAudioVolume {
       $changeVolume = ($PRESISTENT{'AudioVolume'} - 5);
     } elsif ($_[0] eq "up") {
       $changeVolume = ($PRESISTENT{'AudioVolume'} + 5);
-    } 
+    }
     if ($changeVolume < 0) {$changeVolume = 0;}
     if ($changeVolume > 100) {$changeVolume = 100;}
     if ($changeVolume ne $PRESISTENT{'AudioVolume'}) {
@@ -885,228 +885,228 @@ sub changeAudioVolume {
 }
 
 sub eventBtnClickPlayPause {
-	appDBugLog("Clicked: Play/Pause");  
-	if ($PlayerStatus{'paused'}  eq 1) {
-		appCOM("MPCMD|PLAY|");
-		stateChangePAUSED(0);
-	} elsif ($PlayerStatus{'paused'}  eq 0) {
-		appCOM("MPCMD|PAUSE|");
-		stateChangePAUSED(1);
-	} 
+  appDBugLog("Clicked: Play/Pause");
+  if ($PlayerStatus{'paused'}  eq 1) {
+    appCOM("MPCMD|PLAY|");
+    stateChangePAUSED(0);
+  } elsif ($PlayerStatus{'paused'}  eq 0) {
+    appCOM("MPCMD|PAUSE|");
+    stateChangePAUSED(1);
+  }
 }
 
 
 sub stateChangePAUSED {
-	if ($_[0] eq 0) {
-		$PlayerStatus{'paused'} = 0;
-		$GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'ctrlsPauseBTN'});
-	} elsif ($_[0] eq 1) {
-		$PlayerStatus{'paused'} = 1;
-		$GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'ctrlsPlayBTN'});
-	}
+  if ($_[0] eq 0) {
+    $PlayerStatus{'paused'} = 0;
+    $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'ctrlsPauseBTN'});
+  } elsif ($_[0] eq 1) {
+    $PlayerStatus{'paused'} = 1;
+    $GTKS{'CTRLS'}{'BtnPlayPauseEBOX'}{'GFX'}->set_from_pixbuf($GTKS{'PixBUF'}{'ctrlsPlayBTN'});
+  }
 }
 
 
 sub toggleFullScreen {
 
- 	if ($PlayerStatus{'fullscreen'} eq 0) {
- 		if ($_[0] eq 1) {
- 			appCOM("SET|FSZOOM|1|");
- 		} elsif ($_[0] eq 2) {
- 			appCOM("SET|FSZOOM|2|");
- 		} else {
- 			appCOM("SET|FSZOOM|0|");
-   		}
- 
- 		$GTKS{'MainAppWindow'}->fullscreen;
- 		$GTKS{'CTRLS'}{'MAIN'}->hide_all;
- 		$GTKS{'CTRLS'}{'TOPMENU'}->hide_all;
- 		$PlayerStatus{'fullscreen'} = 1;
- 
- 	} elsif ($PlayerStatus{'fullscreen'} eq 1) {
- 		appCOM("SET|FSZOOM|0|");
- 		$GTKS{'MainAppWindow'}->unfullscreen;
- 		$GTKS{'CTRLS'}{'MAIN'}->show_all;
- 		$GTKS{'CTRLS'}{'TOPMENU'}->show_all;
- 		$PlayerStatus{'fullscreen'} = 0;
- 
- 	}
- 
- 	($GTKS{'RelXpos'},$GTKS{'RelYpos'},undef) = getXWinPosNDim($GTKS{'MainAppWindow'}->window->XWINDOW);
-  	checkDimPosNSend(1);
+  if ($PlayerStatus{'fullscreen'} eq 0) {
+    if ($_[0] eq 1) {
+      appCOM("SET|FSZOOM|1|");
+    } elsif ($_[0] eq 2) {
+      appCOM("SET|FSZOOM|2|");
+    } else {
+      appCOM("SET|FSZOOM|0|");
+    }
+
+    $GTKS{'MainAppWindow'}->fullscreen;
+    $GTKS{'CTRLS'}{'MAIN'}->hide_all;
+    $GTKS{'CTRLS'}{'TOPMENU'}->hide_all;
+    $PlayerStatus{'fullscreen'} = 1;
+
+  } elsif ($PlayerStatus{'fullscreen'} eq 1) {
+    appCOM("SET|FSZOOM|0|");
+    $GTKS{'MainAppWindow'}->unfullscreen;
+    $GTKS{'CTRLS'}{'MAIN'}->show_all;
+    $GTKS{'CTRLS'}{'TOPMENU'}->show_all;
+    $PlayerStatus{'fullscreen'} = 0;
+
+  }
+
+  ($GTKS{'RelXpos'},$GTKS{'RelYpos'},undef) = getXWinPosNDim($GTKS{'MainAppWindow'}->window->XWINDOW);
+   checkDimPosNSend(1);
 
 }
 
 #################################################################################################################################
 # key press Event handler...
-sub keyPressHandler {  
-	my ($widget,$event)= @_;
-	my %modMasks = getKeyModifiers($event->state());
-	my $keyVal = $event->keyval();
-	appDBugLog("KEY: $keyVal\n");
-	if (($keyVal eq 32) or ($keyVal eq 80)  or ($keyVal eq 112) or ($keyVal eq 65299)) {# PLAY/PAUSE
-		&eventBtnClickPlayPause;
-	} elsif (($keyVal eq 70) or ($keyVal eq 102)) {# Fullscreen toggler
-		if ($modMasks{'ctrl'}) {
-			toggleFullScreen('1');
-		} elsif ($modMasks{'shift'}) {
-			toggleFullScreen('2');
-		} else {
-			toggleFullScreen('0');
-		}
-	} elsif (($keyVal eq 81) or ($keyVal eq 113)) {# Quit application
-		&doSelfTerminate;
-	} elsif ($keyVal eq 65455) {# Audio Volume DOWN
-		changeAudioVolume("down");
-	} elsif ($keyVal eq 65450) {# Audio Volume UP
-		changeAudioVolume("up");
-	} elsif ($keyVal eq 65363) {# SEEK +10s or frame step 
-		if ($modMasks{'ctrl'}) {
-			appCOM("MPCMD|FRAMESTEP|");
-			appDBugLog("FRAMESTEP");
-		} else {
-			appDBugLog("KEYSEEK +10");
-			appCOM("MPCMD|KEYSEEK|10|");
-		}
-	} elsif ($keyVal eq 65361) {# SEEK -10s 
-		appCOM("MPCMD|KEYSEEK|-10|");
-	} elsif ($keyVal eq 65362) {# SEEK +60s 
-		appCOM("MPCMD|KEYSEEK|60|");
-	} elsif ($keyVal eq 65364) {# SEEK -60s 
-		appCOM("MPCMD|KEYSEEK|-60|");
-	}
-	return FALSE; 
+sub keyPressHandler {
+  my ($widget,$event)= @_;
+  my %modMasks = getKeyModifiers($event->state());
+  my $keyVal = $event->keyval();
+  appDBugLog("KEY: $keyVal\n");
+  if (($keyVal eq 32) or ($keyVal eq 80)  or ($keyVal eq 112) or ($keyVal eq 65299)) {# PLAY/PAUSE
+    &eventBtnClickPlayPause;
+  } elsif (($keyVal eq 70) or ($keyVal eq 102)) {# Fullscreen toggler
+    if ($modMasks{'ctrl'}) {
+      toggleFullScreen('1');
+    } elsif ($modMasks{'shift'}) {
+      toggleFullScreen('2');
+    } else {
+      toggleFullScreen('0');
+    }
+  } elsif (($keyVal eq 81) or ($keyVal eq 113)) {# Quit application
+    &doSelfTerminate;
+  } elsif ($keyVal eq 65455) {# Audio Volume DOWN
+    changeAudioVolume("down");
+  } elsif ($keyVal eq 65450) {# Audio Volume UP
+    changeAudioVolume("up");
+  } elsif ($keyVal eq 65363) {# SEEK +10s or frame step
+    if ($modMasks{'ctrl'}) {
+      appCOM("MPCMD|FRAMESTEP|");
+      appDBugLog("FRAMESTEP");
+    } else {
+      appDBugLog("KEYSEEK +10");
+      appCOM("MPCMD|KEYSEEK|10|");
+    }
+  } elsif ($keyVal eq 65361) {# SEEK -10s
+    appCOM("MPCMD|KEYSEEK|-10|");
+  } elsif ($keyVal eq 65362) {# SEEK +60s
+    appCOM("MPCMD|KEYSEEK|60|");
+  } elsif ($keyVal eq 65364) {# SEEK -60s
+    appCOM("MPCMD|KEYSEEK|-60|");
+  }
+  return FALSE;
 }
 
 sub getKeyModifiers {
-	my %mask;
-	my $modifiers = $_[0];
-	if ($modifiers =~ /mod2-mask/) {$mask{'numlock'} = TRUE;}
-	if ($modifiers =~ /lock-mask/) {$mask{'capslock'} = TRUE;} 
-	if (($modifiers =~ /mod4-mask/) or ($modifiers =~ /super-mask/)) {$mask{'redmond'} = TRUE;$mask{'windows'} = TRUE;} 
-	if ($modifiers =~ /shift-mask/) {$mask{'shift'} = TRUE;} 
-	if ($modifiers =~ /control-mask/) {$mask{'ctrl'} = TRUE;} 
-	if ($modifiers =~ /mod1-mask/) {$mask{'alt'} = TRUE;} 
-	if ($modifiers =~ /mod5-mask/) {$mask{'altgr'} = TRUE;} 
-	if (($modifiers =~ /mod1-mask/) or ($modifiers =~ /mod5-mask/)) {$mask{'alts'} = TRUE;} 
-#	if ($modifiers =~ //) {$mask{''} = TRUE;} 
-	return %mask;
+  my %mask;
+  my $modifiers = $_[0];
+  if ($modifiers =~ /mod2-mask/) {$mask{'numlock'} = TRUE;}
+  if ($modifiers =~ /lock-mask/) {$mask{'capslock'} = TRUE;}
+  if (($modifiers =~ /mod4-mask/) or ($modifiers =~ /super-mask/)) {$mask{'redmond'} = TRUE;$mask{'windows'} = TRUE;}
+  if ($modifiers =~ /shift-mask/) {$mask{'shift'} = TRUE;}
+  if ($modifiers =~ /control-mask/) {$mask{'ctrl'} = TRUE;}
+  if ($modifiers =~ /mod1-mask/) {$mask{'alt'} = TRUE;}
+  if ($modifiers =~ /mod5-mask/) {$mask{'altgr'} = TRUE;}
+  if (($modifiers =~ /mod1-mask/) or ($modifiers =~ /mod5-mask/)) {$mask{'alts'} = TRUE;}
+#  if ($modifiers =~ //) {$mask{''} = TRUE;}
+  return %mask;
 }
 
 
 #################################################################################################################################
-# Load PixBUF 
+# Load PixBUF
 sub loadToPixBUF {
-	my $pixName = sanitizer("anumazcsdaus",$_[0]);
-	my $pixPath = sanitizeFilePath($_[1]);
-	if ((-f $pixPath) and ($pixName)) {
-		$GTKS{'PixBUF'}{$pixName} = Gtk2::Gdk::Pixbuf->new_from_file ($pixPath) or appDBugLog("Unable to load $pixPath to PixBUF... Is it even a GFX file?");
-		if ($GTKS{'PixBUF'}{$pixName}) {
-			appDBugLog("Loaded $pixPath to PixBUF...");
-			return 1;
-		} else {
-			appDBugLog("Unable to load $pixPath to PixBUF...");
-			return 0;
-		}
-	}  else {
-		appDBugLog("Unable to load $pixPath to PixBUF...");
-		return 0;
-	}
+  my $pixName = sanitizer("anumazcsdaus",$_[0]);
+  my $pixPath = sanitizeFilePath($_[1]);
+  if ((-f $pixPath) and ($pixName)) {
+    $GTKS{'PixBUF'}{$pixName} = Gtk2::Gdk::Pixbuf->new_from_file ($pixPath) or appDBugLog("Unable to load $pixPath to PixBUF... Is it even a GFX file?");
+    if ($GTKS{'PixBUF'}{$pixName}) {
+      appDBugLog("Loaded $pixPath to PixBUF...");
+      return 1;
+    } else {
+      appDBugLog("Unable to load $pixPath to PixBUF...");
+      return 0;
+    }
+  }  else {
+    appDBugLog("Unable to load $pixPath to PixBUF...");
+    return 0;
+  }
 }
 
 #################################################################################################################################
 #  Just a sub to tuck away the menu tree somewhere in a tidy fassion....
 sub theMenuTreeSUB {
-	my $action = 0;
-	my $menu_tree = [
-	_Media  => {
-		item_type  => '<Branch>',
-		children => [
-			'Play _File'       => {
-				callback => \&crankFileChooser,
-				callback_action => $action++,
-			},
-			'Play _URL'      => {
-				callback_action => $action++,
-				callback => sub { appDBugLog("menuPlayFullScreen"); },
-				accelerator => '<ctrl>S',
-			},
-
-			'Quit'           => {
-				callback => doSelfTerminate,,
-				callback_action => $action++,
-				accelerator => 'Q',
-			},
-		],
-	},
-	_Options  => {
-		item_type => '<Branch>',
-		children => [
-			'Toggle _Full Screen' => {
-				callback => \&toggleFullScreen,
-				callback_action => $action++,
-				accelerator => 'F',
-			},
-			'View _Settings' => {
-				callback => sub { appDBugLog("menuSettings"); },
-				callback_action => $action++,
-			},
-		],
-	},
-
-	_Help  => {
-		item_type => '<Branch>',
-		children => [
-			_About        => {
- 			 	callback => \&showAboutPOP,
-				callback_action => $action++,
-			}
-		],
-	},
-	];
-	return $menu_tree;
+  my $action = 0;
+  my $menu_tree = [
+  _Media  => {
+    item_type  => '<Branch>',
+    children => [
+      'Play _File'       => {
+        callback => \&crankFileChooser,
+        callback_action => $action++,
+      },
+      'Play _URL'      => {
+        callback_action => $action++,
+        callback => sub { appDBugLog("menuPlayFullScreen"); },
+        accelerator => '<ctrl>S',
+      },
+
+      'Quit'           => {
+        callback => doSelfTerminate,,
+        callback_action => $action++,
+        accelerator => 'Q',
+      },
+    ],
+  },
+  _Options  => {
+    item_type => '<Branch>',
+    children => [
+      'Toggle _Full Screen' => {
+        callback => \&toggleFullScreen,
+        callback_action => $action++,
+        accelerator => 'F',
+      },
+      'View _Settings' => {
+        callback => sub { appDBugLog("menuSettings"); },
+        callback_action => $action++,
+      },
+    ],
+  },
+
+  _Help  => {
+    item_type => '<Branch>',
+    children => [
+      _About        => {
+        callback => \&showAboutPOP,
+        callback_action => $action++,
+      }
+    ],
+  },
+  ];
+  return $menu_tree;
 }
 
 ########################################################################################################
 # File CHOOSER  And file loading/enqueueing... (Though at the moment it just starts playback...)
 sub crankFileChooser {
-	my $fileFilter = Gtk2::FileFilter->new;
-	$fileFilter->set_name ("Media Files");
-	$fileFilter->add_mime_type("audio/*");
-	$fileFilter->add_mime_type("video/*");
-	my $theFileChooser = Gtk2::FileChooserDialog->new ('Open media file...', undef, 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok');
-	$theFileChooser->add_filter($fileFilter);
-	$theFileChooser->set_current_folder($PlayerStatus{'theOpenerDir'});
-	if ($theFileChooser->run eq 'ok') {
-		my $playThisFile = $theFileChooser->get_filename;
-		if (-f $playThisFile) {
-			my $isItLoaded = mtpTeKiRemoteFileSetup("FILE:$playThisFile","$X2GoTKSHome/remote/appData/mteleplayer\_$selfSID");
-			if ($isItLoaded ne 0) {
-				setOpenerDir($playThisFile);
-				actOnEnqueuedMEDIA($isItLoaded,"FILE",0);
-			}
-		}
-	}
-	$theFileChooser->destroy;
+  my $fileFilter = Gtk2::FileFilter->new;
+  $fileFilter->set_name ("Media Files");
+  $fileFilter->add_mime_type("audio/*");
+  $fileFilter->add_mime_type("video/*");
+  my $theFileChooser = Gtk2::FileChooserDialog->new ('Open media file...', undef, 'open', 'gtk-cancel' => 'cancel', 'gtk-ok' => 'ok');
+  $theFileChooser->add_filter($fileFilter);
+  $theFileChooser->set_current_folder($PlayerStatus{'theOpenerDir'});
+  if ($theFileChooser->run eq 'ok') {
+    my $playThisFile = $theFileChooser->get_filename;
+    if (-f $playThisFile) {
+      my $isItLoaded = mtpTeKiRemoteFileSetup("FILE:$playThisFile","$X2GoTKSHome/remote/appData/mteleplayer\_$selfSID");
+      if ($isItLoaded ne 0) {
+        setOpenerDir($playThisFile);
+        actOnEnqueuedMEDIA($isItLoaded,"FILE",0);
+      }
+    }
+  }
+  $theFileChooser->destroy;
 }
 
 sub setOpenerDir {
-	if ($_[0] eq 0) {
-		my $TheDIR = sanitizeDirPath($ENV{'PWD'});
-		unless (-d $TheDIR) {$TheDIR = $UserHome;}
-		unless (-d $TheDIR) {$TheDIR = "";} 
-		$PlayerStatus{'theOpenerDir'} = $TheDIR;
-	} else {
-		my $TheDIR = sanitizeDirPath(dirname(File::Spec->rel2abs($_[0])));
-		if (-d $TheDIR) {
-			$PlayerStatus{'theOpenerDir'} = $TheDIR;      
-		}
-	}
+  if ($_[0] eq 0) {
+    my $TheDIR = sanitizeDirPath($ENV{'PWD'});
+    unless (-d $TheDIR) {$TheDIR = $UserHome;}
+    unless (-d $TheDIR) {$TheDIR = "";}
+    $PlayerStatus{'theOpenerDir'} = $TheDIR;
+  } else {
+    my $TheDIR = sanitizeDirPath(dirname(File::Spec->rel2abs($_[0])));
+    if (-d $TheDIR) {
+      $PlayerStatus{'theOpenerDir'} = $TheDIR;
+    }
+  }
 }
 ########################################################################################################
-# GET Media FILE Info 
-# Initially we we're using another perl module for this but it turned out to have some (b) ithchy dependencies on some never distros so...
-# "Self made" is not always well made.... but it takes less to rigg this short sub rather than debugging 3rd party crud.
+# GET Media FILE Info
+# Initially we we're using another perl module for this but it turned out to have some (b) itchy dependencies on some never distros so...
+# "Self made" is not always well made.... but it takes less to rip this short sub rather than debugging 3rd party crud.
 # Plan to expand on the content of the returned %FileInfo but at the moment this is all we need for preliminary validation that the file is actually a playable file.
 sub getMediaFileINFO {
   my $FilePath = sanitizeFilePath($_[0]);
@@ -1114,7 +1114,7 @@ sub getMediaFileINFO {
   if (-f $FilePath) {
     open(MPINFO,"-|",$mPlayerPath,'-vo','null','-ao','null', '-identify','-frames','0','-nolirc',$FilePath);
     my @MPInfo = <MPINFO>;
-    close(MPINFO); 
+    close(MPINFO);
     foreach my $line (@MPInfo) {
       $line =~ s/\n//g;
       if ($line =~ /^ID\_LENGTH\=([\d\.]*)$/) {
@@ -1124,14 +1124,14 @@ sub getMediaFileINFO {
       } elsif ($line =~ /^ID\_AUDIO\_CODEC\=(.*)$/) {
         $FileInfo{'acodec'} = $1;
       }
-    } 
+    }
     if ($FileInfo{'length'} > 0) {
       if ($FileInfo{'vcodec'}) {
         return (1,"V",%FileInfo);
       } else {
         if ($FileInfo{'acodec'}) {
-	  return (1,"A",%FileInfo);
-        } else {return 0;}        
+          return (1,"A",%FileInfo);
+        } else {return 0;}
       }
     } else {return 0;}
   } else {
@@ -1141,7 +1141,7 @@ sub getMediaFileINFO {
 
 #################################################################################################################################
 # This sub, supposedly try to do a clean termination of the application...
-sub doSelfTerminate { 
+sub doSelfTerminate {
   appDBugLog("Self Terminating............\n");
   $runSTATE = "T";
 #  sleep 1;
@@ -1154,10 +1154,10 @@ sub doSelfTerminate {
     $LocalSocket = undef;
   }
   cleanUpOldAppSession($X2GoTKSHome,"$APPNAME\_$selfSID");
-  Gtk2->main_quit; 
+  Gtk2->main_quit;
   exit;
-  return FALSE; 
-}   
+  return FALSE;
+}
 # And this should be the very end of everything!?
 #################################################################################################################################
 ############################################################################################################################################
diff --git a/serverside/lib/telekinesis/server/applications/mteleplayer/mTPAArtExtractor b/serverside/lib/telekinesis/server/applications/mteleplayer/mTPAArtExtractor
index ad8e4bf..6620129 100755
--- a/serverside/lib/telekinesis/server/applications/mteleplayer/mTPAArtExtractor
+++ b/serverside/lib/telekinesis/server/applications/mteleplayer/mTPAArtExtractor
@@ -25,7 +25,7 @@
 # Guangzhou, Guangdong,
 # People's Republic of China
 #
-# Web:  http://opensource.gznianguan.com/
+# Web: http://opensource.gznianguan.com/
 # E-mail: <opensource at gznianguan.com>
 ###############################################################################
 #
@@ -42,7 +42,7 @@ if (-f $inFile) {
 
 	if (length("@EXIF") > 1000) {
 		my $outFile = $inFile;
-                $outFile =~ s/\.file\ *$//g;
+		$outFile =~ s/\.file\ *$//g;
 		open(CONV,"|-","/usr/bin/convert",'-','-resize','300x300',"$outFile.jpg");
 		print CONV @EXIF;
 		close(CONV);
diff --git a/serverside/share/telekinesis/server/applications/mteleplayer/copyright.txt b/serverside/share/telekinesis/server/applications/mteleplayer/copyright.txt
index a496add..e7c6c7d 100644
--- a/serverside/share/telekinesis/server/applications/mteleplayer/copyright.txt
+++ b/serverside/share/telekinesis/server/applications/mteleplayer/copyright.txt
@@ -22,9 +22,9 @@ Free Software Foundation, Inc.,
 
 Copyright (C) 2013-2015 Guangzhou Nianguan Electronics Technology Co.Ltd.
 Guangzhou Nianguan Electronics Technology Co.Ltd.
-Jin Fu Building , #90 QiFuRoad, 
+Jin Fu Building , #90 QiFuRoad,
 Guangzhou, Guangdong,
 People's Republic of China
 
-Web: 	http://opensource.gznianguan.com/
+Web: http://opensource.gznianguan.com/
 E-mail: <opensource at gznianguan.com>

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


More information about the x2go-commits mailing list