[MPlayer-dev-eng] [PATCH] fix garbage filenames when using gtk select file dialog

Matijs van Zuijlen Matijs.van.Zuijlen at xs4all.nl
Thu May 16 18:17:54 CEST 2002


Hello,

Here is a patch to fix a problem I had with using the gtk select file
dialog. The original code would destroy the clist containing the
filenames before copying the chosen filename to another string. When the
string was finally copied, it would contain garbage. This patch solves
this by destroying the dialog object (and therefore the clist) after
copying the string.

-- 
Matijs van Zuijlen

    ... designed to fill holes or cracks of not more than two cubic vims.
			    -- Robert Sheckley, Untouched by Human Hands
-------------- next part --------------
Index: Gui/mplayer/gtk/fs.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.c,v
retrieving revision 1.12
diff -u -r1.12 fs.c
--- Gui/mplayer/gtk/fs.c	14 May 2002 11:40:59 -0000	1.12
+++ Gui/mplayer/gtk/fs.c	16 May 2002 15:20:43 -0000
@@ -336,8 +336,6 @@
    return;
   }
 
- HideFileSelect();
-
  switch( fsPressed )
   {
    case 1:
@@ -375,6 +373,9 @@
           guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile );
           break;
   }
+
+ HideFileSelect();
+
  item=fsTopList_items;
  while( item )
   {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020516/eadc5e53/attachment.pgp>


More information about the MPlayer-dev-eng mailing list