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

« back to all changes in this revision

Viewing changes to modules/gui/wince/dialogs.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
 * dialogs.cpp : WinCE plugin for vlc
3
3
 *****************************************************************************
4
4
 * Copyright (C) 2000-2005 the VideoLAN team
5
 
 * $Id: 7c2269c182e295e6b3eaba2ec922942f93ed1ec8 $
 
5
 * $Id: 2dbc9c8d4795057b1dc9f838648a8e8284f63fec $
6
6
 *
7
7
 * Authors: Gildas Bazin <gbazin@videolan.org>
8
8
 *
24
24
/*****************************************************************************
25
25
 * Preamble
26
26
 *****************************************************************************/
27
 
#include <stdlib.h>                                      /* malloc(), free() */
28
 
 
29
 
#include <vlc/vlc.h>
30
 
#include <vlc/aout.h>
31
 
#include <vlc/intf.h>
 
27
 
 
28
#ifdef HAVE_CONFIG_H
 
29
# include "config.h"
 
30
#endif
 
31
 
 
32
#include <vlc_common.h>
 
33
#include <vlc_aout.h>
 
34
#include <vlc_interface.h>
32
35
 
33
36
#include "wince.h"
34
37
 
115
118
DialogsProvider::~DialogsProvider()
116
119
{
117
120
    /* Clean up */
118
 
    if( p_open_dialog )     delete p_open_dialog;
119
 
    if( p_playlist_dialog ) delete p_playlist_dialog;
120
 
    if( p_messages_dialog ) delete p_messages_dialog;
121
 
    if( p_fileinfo_dialog ) delete p_fileinfo_dialog;
122
 
    if( p_prefs_dialog )    delete p_prefs_dialog;
 
121
    delete p_open_dialog;
 
122
    delete p_playlist_dialog;
 
123
    delete p_messages_dialog;
 
124
    delete p_fileinfo_dialog;
 
125
    delete p_prefs_dialog;
123
126
 
124
127
    if( h_gsgetfile_dll ) FreeLibrary( h_gsgetfile_dll );
125
128
}
271
274
    ofn.lpstrCustomFilter = NULL;
272
275
    ofn.nMaxCustFilter = 0;
273
276
    ofn.nFilterIndex = 1;
274
 
    ofn.lpstrFile = (LPTSTR)szFile; 
 
277
    ofn.lpstrFile = (LPTSTR)szFile;
275
278
    ofn.nMaxFile = MAX_PATH;
276
 
    ofn.lpstrFileTitle = NULL; 
 
279
    ofn.lpstrFileTitle = NULL;
277
280
    ofn.nMaxFileTitle = 40;
278
281
    ofn.lpstrInitialDir = NULL;
279
282
    ofn.lpstrTitle = _FROMMB(p_arg->psz_title);
280
 
    ofn.Flags = 0; 
 
283
    ofn.Flags = 0;
281
284
    ofn.nFileOffset = 0;
282
285
    ofn.nFileExtension = 0;
283
286
    ofn.lpstrDefExt = NULL;
317
320
        }
318
321
        free( p_arg->psz_results );
319
322
    }
320
 
    if( p_arg->psz_title ) free( p_arg->psz_title );
321
 
    if( p_arg->psz_extensions ) free( p_arg->psz_extensions );
 
323
    free( p_arg->psz_title );
 
324
    free( p_arg->psz_extensions );
322
325
 
323
326
    free( p_arg );
324
327
}
329
332
    TCHAR szFile[MAX_PATH] = _T("\0");
330
333
    static TCHAR szFilter[] = _T("All (*.*)\0*.*\0");
331
334
 
332
 
    playlist_t *p_playlist = (playlist_t *)
333
 
        vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
 
335
    playlist_t *p_playlist = pl_Yield( p_intf );
334
336
    if( p_playlist == NULL ) return;
335
337
 
336
338
    memset( &ofn, 0, sizeof(OPENFILENAME) );
340
342
    ofn.lpstrFilter = szFilter;
341
343
    ofn.lpstrCustomFilter = NULL;
342
344
    ofn.nMaxCustFilter = 0;
343
 
    ofn.nFilterIndex = 1;     
344
 
    ofn.lpstrFile = (LPTSTR)szFile; 
 
345
    ofn.nFilterIndex = 1;
 
346
    ofn.lpstrFile = (LPTSTR)szFile;
345
347
    ofn.nMaxFile = MAX_PATH;
346
 
    ofn.lpstrFileTitle = NULL; 
 
348
    ofn.lpstrFileTitle = NULL;
347
349
    ofn.nMaxFileTitle = 40;
348
350
    ofn.lpstrInitialDir = NULL;
349
351
    ofn.lpstrTitle = _T("Quick Open File");
350
 
    ofn.Flags = 0; 
 
352
    ofn.Flags = 0;
351
353
    ofn.nFileOffset = 0;
352
354
    ofn.nFileExtension = 0;
353
355
    ofn.lpstrDefExt = NULL;
364
366
                      PLAYLIST_APPEND | (i_arg?PLAYLIST_GO:0), PLAYLIST_END );
365
367
    }
366
368
 
367
 
    vlc_object_release( p_playlist );
 
369
    pl_Release( p_intf );
368
370
}
369
371
 
370
372
void DialogsProvider::OnOpenDirectory( int i_arg )
403
405
 
404
406
    if( !SUCCEEDED( SHGetMalloc(&p_malloc) ) ) goto error;
405
407
 
406
 
    p_playlist = (playlist_t *)
407
 
        vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
 
408
    p_playlist = pl_Yield( p_intf );
408
409
    if( !p_playlist ) goto error;
409
410
 
410
411
    memset( &bi, 0, sizeof(BROWSEINFO) );
430
431
 error:
431
432
 
432
433
    if( p_malloc) p_malloc->Release();
433
 
    if( p_playlist ) vlc_object_release( p_playlist );
 
434
    if( p_playlist ) pl_Release( p_intf );
434
435
 
435
436
#ifdef UNDER_CE
436
437
    FreeLibrary( ceshell_dll );