]> git.sesse.net Git - vlc/commitdiff
Typing file locations in URL combo without "file://" prefix is possible again.
authorJean-Paul Saman <jpsaman@videolan.org>
Sun, 22 Dec 2002 21:46:50 +0000 (21:46 +0000)
committerJean-Paul Saman <jpsaman@videolan.org>
Sun, 22 Dec 2002 21:46:50 +0000 (21:46 +0000)
modules/gui/familiar/callbacks.c
modules/gui/familiar/familiar.c

index 365b9b6f9c04bbe47641dcad125e1b6188c2b486..9dd0a6e07488ac629a939b012e396a3596d286c6 100644 (file)
@@ -2,7 +2,7 @@
  * callbacks.c : Callbacks for the Familiar Linux Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: callbacks.c,v 1.18 2002/12/20 21:33:40 jpsaman Exp $
+ * $Id: callbacks.c,v 1.19 2002/12/22 21:46:50 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -388,9 +388,7 @@ void
 on_comboURL_entry_changed              (GtkEditable     *editable,
                                         gpointer         user_data)
 {
-#if 0
     intf_thread_t * p_intf = GtkGetIntf( GTK_WIDGET(editable) );
-#endif
     gchar *       psz_url;
     struct stat st;
 
@@ -411,22 +409,13 @@ on_comboURL_entry_changed              (GtkEditable     *editable,
     }
     else if (lstat((char*)psz_url, &st)==0)
     {
-#if 0
-// This piece of code crashes in ReadDirectory at gtk_clist_insert()
-// I cannot figure out why. So for now it is mandatory to use the
-// file://  syntax for opening a file on a known location.
-// The strange thing is it only crashes for names beginning with "/" or "."
-// The combobox is means as a URL box, so having "file://" in front
-// is not that strange ;-)
         if (S_ISDIR(st.st_mode))
         {
                    if (!p_intf->p_sys->p_clist)
                            msg_Err(p_intf, "p_clist pointer invalid!!" );
             ReadDirectory(p_intf->p_sys->p_clist, psz_url);
         }
-        else
-#endif
-        if( (S_ISLNK(st.st_mode)) || (S_ISCHR(st.st_mode)) ||
+        else if( (S_ISLNK(st.st_mode)) || (S_ISCHR(st.st_mode)) ||
             (S_ISBLK(st.st_mode)) || (S_ISFIFO(st.st_mode))||
             (S_ISSOCK(st.st_mode))|| (S_ISREG(st.st_mode)) )
         {
index 3ee55816d8cee1d7771cfbe0f6bb59b834d1f4e1..e9b2c6739c403b2bde1cb19d2309d3cb75001eab 100644 (file)
@@ -2,7 +2,7 @@
  * familiar.c : familiar plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: familiar.c,v 1.19 2002/12/22 21:08:36 jpsaman Exp $
+ * $Id: familiar.c,v 1.20 2002/12/22 21:46:50 jpsaman Exp $
  *
  * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
  *
@@ -197,6 +197,7 @@ static void Run( intf_thread_t *p_intf )
     ReadDirectory(p_intf->p_sys->p_clist, "/mnt");
 
 #ifdef NEED_GTK_MAIN
+    msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
     while( !p_intf->b_die )
     {
         Manage( p_intf );
@@ -208,6 +209,7 @@ static void Run( intf_thread_t *p_intf )
         gdk_threads_enter();
     }
 #else
+    msg_Dbg( p_intf, "Manage GTK keyboard events using timeouts" );
     /* Sleep to avoid using all CPU - since some interfaces needs to access
      * keyboard events, a 100ms delay is a good compromise */
     i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, (GtkFunction)Manage,