~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/gui/wince/open.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * open.cpp : WinCE gui plugin for VLC
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2000-2004 the VideoLAN team
5
 
 * $Id: 44b36baab77402f559b0cdc527a694c3da36d0fc $
 
5
 * $Id: 6a2d3e12239d2c383ac191bd50b36e25ad77cba0 $
6
6
 *
7
7
 * Authors: Marodon Cedric <cedric_marodon@yahoo.fr>
8
8
 *          Gildas Bazin <gbazin@videolan.org>
25
25
/*****************************************************************************
26
26
 * Preamble
27
27
 *****************************************************************************/
28
 
#include <stdlib.h>                                      /* malloc(), free() */
29
 
#include <string.h>                                            /* strerror() */
30
 
#include <stdio.h>
31
 
#include <vlc/vlc.h>
32
 
#include <vlc/intf.h>
 
28
#ifdef HAVE_CONFIG_H
 
29
# include "config.h"
 
30
#endif
 
31
 
 
32
#include <vlc_common.h>
 
33
#include <vlc_interface.h>
33
34
 
34
35
#include "wince.h"
35
36
 
100
101
 
101
102
/***********************************************************************
102
103
 
103
 
FUNCTION: 
 
104
FUNCTION:
104
105
  WndProc
105
106
 
106
 
PURPOSE: 
 
107
PURPOSE:
107
108
  Processes messages sent to the main window.
108
 
  
 
109
 
109
110
***********************************************************************/
110
111
LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
111
112
{
112
113
    SHINITDLGINFO shidi;
113
 
    INITCOMMONCONTROLSEX  iccex;  // INITCOMMONCONTROLSEX structure    
 
114
    INITCOMMONCONTROLSEX  iccex;  // INITCOMMONCONTROLSEX structure
114
115
    RECT rcClient;
115
116
    TC_ITEM tcItem;
116
117
 
189
190
 
190
191
    case WM_SETFOCUS:
191
192
        SHFullScreen( hwnd, SHFS_SHOWSIPBUTTON );
192
 
        SHSipPreference( hwnd, SIP_DOWN ); 
 
193
        SHSipPreference( hwnd, SIP_DOWN );
193
194
        break;
194
195
 
195
196
    case WM_COMMAND:
222
223
            } else if( (HWND)lp == browse_button )
223
224
            {
224
225
                OnFileBrowse();
225
 
            } 
 
226
            }
226
227
            break;
227
228
        }
228
229
        if( HIWORD(wp) == EN_CHANGE )
309
310
        sz_subsfile += psz_subsfile;
310
311
        subsfile_mrl.push_back( sz_subsfile );
311
312
    }
312
 
    if( psz_subsfile ) free( psz_subsfile );
 
313
    free( psz_subsfile );
313
314
}
314
315
 
315
316
void OpenDialog::NetPanel( HWND hwnd )
417
418
        WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
418
419
        rc.left + 5 + 15 + 5 + net_type_array[0].length + 5,
419
420
        rc.top + 10, 15, 15, hwnd, NULL, hInst, NULL );
420
 
        
 
421
 
421
422
    net_label[2] = CreateWindow( _T("STATIC"), net_type_array[2].psz_text,
422
423
        WS_CHILD | WS_VISIBLE | SS_LEFT,
423
424
        rc.left + 5 + 15 + 5 + net_type_array[0].length + 5 + 15 + 5,
603
604
    char **pp_args = vlc_parse_cmdline( _TOMB(psz_text), &i_args );
604
605
 
605
606
    ComboBox_AddString( mrl_combo, psz_text );
606
 
    if( ComboBox_GetCount( mrl_combo ) > 10 ) 
 
607
    if( ComboBox_GetCount( mrl_combo ) > 10 )
607
608
        ComboBox_DeleteString( mrl_combo, 0 );
608
609
    ComboBox_SetCurSel( mrl_combo, ComboBox_GetCount( mrl_combo ) - 1 );
609
610
 
610
611
    /* Update the playlist */
611
 
    playlist_t *p_playlist =
612
 
        (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
613
 
                                       FIND_ANYWHERE );
 
612
    playlist_t *p_playlist = pl_Yield( p_intf );
614
613
    if( p_playlist == NULL ) return;
615
614
 
616
615
    for( int i = 0; i < i_args; i++ )
617
616
    {
618
 
        vlc_bool_t b_start = !i && i_open_arg;
 
617
        bool b_start = !i && i_open_arg;
619
618
        playlist_item_t *p_item =
620
 
            playlist_ItemNew( p_intf, pp_args[i], pp_args[i] );
 
619
            playlist_ItemNew( p_playlist, pp_args[i], pp_args[i] );
621
620
 
622
621
        /* Insert options */
623
622
        while( i + 1 < i_args && pp_args[i + 1][0] == ':' )
636
635
            }
637
636
        }
638
637
 
639
 
        playlist_AddItem( p_playlist, p_item,
640
 
                          PLAYLIST_APPEND, PLAYLIST_END );
641
638
 
642
639
        if( b_start )
643
640
        {
644
 
            playlist_Control( p_playlist, PLAYLIST_ITEMPLAY , p_item );
 
641
            playlist_AddItem( p_playlist, p_item,
 
642
                              PLAYLIST_APPEND|PLAYLIST_GO, PLAYLIST_END );
 
643
        }
 
644
        else
 
645
        {
 
646
            playlist_AddItem( p_playlist, p_item,
 
647
                              PLAYLIST_APPEND, PLAYLIST_END );
645
648
        }
646
649
    }
647
650
 
652
655
        free( pp_args[i_args] );
653
656
        if( !i_args ) free( pp_args );
654
657
    }
655
 
    vlc_object_release( p_playlist );
 
658
    pl_Release( p_intf );
656
659
}
657
660
 
658
661
/*****************************************************************************
680
683
 
681
684
        SetWindowText( p_this->file_combo, _FROMMB(psz_tmp) );
682
685
        ComboBox_AddString( p_this->file_combo, _FROMMB(psz_tmp) );
683
 
        if( ComboBox_GetCount( p_this->file_combo ) > 10 ) 
 
686
        if( ComboBox_GetCount( p_this->file_combo ) > 10 )
684
687
            ComboBox_DeleteString( p_this->file_combo, 0 );
685
688
 
686
689
        p_this->UpdateMRL( FILE_ACCESS );
733
736
                      SWP_NOMOVE | SWP_NOSIZE );
734
737
        SetWindowPos( hUpdown[0], HWND_TOP, 0, 0, 0, 0,
735
738
                      SWP_NOMOVE | SWP_NOSIZE );
736
 
    } 
 
739
    }
737
740
    else if( event == NetRadio2_Event )
738
741
    {
739
742
        SetWindowPos( net_addrs_label[1], HWND_TOP, 0, 0, 0, 0,
746
749
                      SWP_NOMOVE | SWP_NOSIZE );
747
750
        SetWindowPos( hUpdown[1], HWND_TOP, 0, 0, 0, 0,
748
751
                      SWP_NOMOVE | SWP_NOSIZE );
749
 
    } 
 
752
    }
750
753
    else if( event == NetRadio3_Event )
751
754
    {
752
755
        SetWindowPos( net_addrs_label[2], HWND_TOP, 0, 0, 0, 0,
753
756
                      SWP_NOMOVE | SWP_NOSIZE );
754
757
        SetWindowPos( net_addrs[2], HWND_TOP, 0, 0, 0, 0,
755
758
                      SWP_NOMOVE | SWP_NOSIZE );
756
 
    } 
 
759
    }
757
760
    else if( event == NetRadio4_Event )
758
761
    {
759
762
        SetWindowPos( net_addrs_label[3], HWND_TOP, 0, 0, 0, 0,
761
764
        SetWindowPos( net_addrs[3], HWND_TOP, 0, 0, 0, 0,
762
765
                      SWP_NOMOVE | SWP_NOSIZE );
763
766
    }
764
 
        
 
767
 
765
768
    UpdateMRL( NET_ACCESS );
766
769
}
767
770