]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/open.cpp
Removes trailing spaces. Removes tabs.
[vlc] / modules / gui / wince / open.cpp
index 2f6f6752008ed242f30e2a96fe6e94ab58c3e960..b3f65e5d1f6d04b1acdab7559be8430cade138e4 100644 (file)
  *
  * 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., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>                                            /* strerror() */
-#include <stdio.h>
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
+#include <vlc_interface.h>
 
 #include "wince.h"
 
@@ -100,17 +97,17 @@ OpenDialog::OpenDialog( intf_thread_t *p_intf, CBaseWindow *p_parent,
 
 /***********************************************************************
 
-FUNCTION: 
+FUNCTION:
   WndProc
 
-PURPOSE: 
+PURPOSE:
   Processes messages sent to the main window.
-  
 ***********************************************************************/
 LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
     SHINITDLGINFO shidi;
-    INITCOMMONCONTROLSEX  iccex;  // INITCOMMONCONTROLSEX structure    
+    INITCOMMONCONTROLSEX  iccex;  // INITCOMMONCONTROLSEX structure
     RECT rcClient;
     TC_ITEM tcItem;
 
@@ -189,7 +186,7 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 
     case WM_SETFOCUS:
         SHFullScreen( hwnd, SHFS_SHOWSIPBUTTON );
-        SHSipPreference( hwnd, SIP_DOWN ); 
+        SHSipPreference( hwnd, SIP_DOWN );
         break;
 
     case WM_COMMAND:
@@ -222,7 +219,7 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
             } else if( (HWND)lp == browse_button )
             {
                 OnFileBrowse();
-            } 
+            }
             break;
         }
         if( HIWORD(wp) == EN_CHANGE )
@@ -417,7 +414,7 @@ void OpenDialog::NetPanel( HWND hwnd )
         WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
         rc.left + 5 + 15 + 5 + net_type_array[0].length + 5,
         rc.top + 10, 15, 15, hwnd, NULL, hInst, NULL );
-        
     net_label[2] = CreateWindow( _T("STATIC"), net_type_array[2].psz_text,
         WS_CHILD | WS_VISIBLE | SS_LEFT,
         rc.left + 5 + 15 + 5 + net_type_array[0].length + 5 + 15 + 5,
@@ -603,7 +600,7 @@ void OpenDialog::OnOk()
     char **pp_args = vlc_parse_cmdline( _TOMB(psz_text), &i_args );
 
     ComboBox_AddString( mrl_combo, psz_text );
-    if( ComboBox_GetCount( mrl_combo ) > 10 ) 
+    if( ComboBox_GetCount( mrl_combo ) > 10 )
         ComboBox_DeleteString( mrl_combo, 0 );
     ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );
 
@@ -636,12 +633,16 @@ void OpenDialog::OnOk()
             }
         }
 
-        playlist_AddItem( p_playlist, p_item,
-                          PLAYLIST_APPEND, PLAYLIST_END );
 
         if( b_start )
         {
-            playlist_Control( p_playlist, PLAYLIST_ITEMPLAY , p_item );
+            playlist_AddItem( p_playlist, p_item,
+                              PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END );
+        }
+        else
+        {
+            playlist_AddItem( p_playlist, p_item,
+                              PLAYLIST_APPEND, PLAYLIST_END );
         }
     }
 
@@ -680,7 +681,7 @@ static void OnOpenCB( intf_dialog_args_t *p_arg )
 
         SetWindowText( p_this->file_combo, _FROMMB(psz_tmp) );
         ComboBox_AddString( p_this->file_combo, _FROMMB(psz_tmp) );
-        if( ComboBox_GetCount( p_this->file_combo ) > 10 ) 
+        if( ComboBox_GetCount( p_this->file_combo ) > 10 )
             ComboBox_DeleteString( p_this->file_combo, 0 );
 
         p_this->UpdateMRL( FILE_ACCESS );
@@ -733,7 +734,7 @@ void OpenDialog::OnNetTypeChange( int event )
                       SWP_NOMOVE | SWP_NOSIZE );
         SetWindowPos( hUpdown[0], HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
-    } 
+    }
     else if( event == NetRadio2_Event )
     {
         SetWindowPos( net_addrs_label[1], HWND_TOP, 0, 0, 0, 0,
@@ -746,14 +747,14 @@ void OpenDialog::OnNetTypeChange( int event )
                       SWP_NOMOVE | SWP_NOSIZE );
         SetWindowPos( hUpdown[1], HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
-    } 
+    }
     else if( event == NetRadio3_Event )
     {
         SetWindowPos( net_addrs_label[2], HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
         SetWindowPos( net_addrs[2], HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
-    } 
+    }
     else if( event == NetRadio4_Event )
     {
         SetWindowPos( net_addrs_label[3], HWND_TOP, 0, 0, 0, 0,
@@ -761,7 +762,7 @@ void OpenDialog::OnNetTypeChange( int event )
         SetWindowPos( net_addrs[3], HWND_TOP, 0, 0, 0, 0,
                       SWP_NOMOVE | SWP_NOSIZE );
     }
-        
     UpdateMRL( NET_ACCESS );
 }