changeset 34067:eb6344ee99ac

Set an URL guiInfo.Filename by using uiSetFileName(). Because the evPlayNetwork code in uiEventHandling() is already performed in uiSetFileName(), it may be omitted and evPlay may be called directly.
author ib
date Thu, 29 Sep 2011 13:44:21 +0000
parents 1b60a54bbfb8
children c3b22e92a4ec
files gui/ui/gtk/url.c gui/ui/main.c
diffstat 2 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/gtk/url.c	Thu Sep 29 13:36:25 2011 +0000
+++ b/gui/ui/gtk/url.c	Thu Sep 29 13:44:21 2011 +0000
@@ -103,8 +103,8 @@
      item->url=gstrdup( str );
      listSet( gtkAddURLItem,item );
 
-     setdup( &guiInfo.Filename,str ); guiInfo.NewPlay=GUI_FILE_NEW;
-     uiEventHandling( evPlayNetwork,0 );
+     uiSetFileName( NULL,str,STREAMTYPE_STREAM ); guiInfo.NewPlay=GUI_FILE_NEW;
+     uiEventHandling( evPlay,0 );
     }
   }
  HideURLDialogBox();
--- a/gui/ui/main.c	Thu Sep 29 13:36:25 2011 +0000
+++ b/gui/ui/main.c	Thu Sep 29 13:44:21 2011 +0000
@@ -143,11 +143,6 @@
         mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 );
         break;
 
-   case evPlayNetwork:
-        nfree( guiInfo.SubtitleFilename );
-	nfree( guiInfo.AudioFilename );
-	guiInfo.StreamType=STREAMTYPE_STREAM;
-        goto play;
    case evSetURL:
         gtkShow( evPlayNetwork,NULL );
 	break;