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

« back to all changes in this revision

Viewing changes to modules/gui/wxwidgets/dialogs/iteminfo.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:
1
 
/*****************************************************************************
2
 
 * iteminfo.cpp : wxWindows plugin for vlc
3
 
 *****************************************************************************
4
 
 * Copyright (C) 2000-2004 the VideoLAN team
5
 
 * $Id: 7a92df04500e111bbeafe70d2ef0910abd11484c $
6
 
 *
7
 
 * Authors: Clément Stenac <zorglub@videolan.org>
8
 
 *
9
 
 * This program is free software; you can redistribute it and/or modify
10
 
 * it under the terms of the GNU General Public License as published by
11
 
 * the Free Software Foundation; either version 2 of the License, or
12
 
 * (at your option) any later version.
13
 
 *
14
 
 * This program is distributed in the hope that it will be useful,
15
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
 * GNU General Public License for more details.
18
 
 *
19
 
 * You should have received a copy of the GNU General Public License
20
 
 * along with this program; if not, write to the Free Software
21
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
 
 *****************************************************************************/
23
 
 
24
 
#include "dialogs/iteminfo.hpp"
25
 
#include "dialogs/infopanels.hpp"
26
 
#include <wx/combobox.h>
27
 
#include <wx/statline.h>
28
 
 
29
 
#ifndef wxRB_SINGLE
30
 
#   define wxRB_SINGLE 0
31
 
#endif
32
 
 
33
 
/*****************************************************************************
34
 
 * Event Table.
35
 
 *****************************************************************************/
36
 
 
37
 
/* IDs for the controls and the menu commands */
38
 
enum
39
 
{
40
 
    Uri_Event,
41
 
    Name_Event,
42
 
    Enabled_Event,
43
 
};
44
 
 
45
 
BEGIN_EVENT_TABLE(ItemInfoDialog, wxDialog)
46
 
    /* Button events */
47
 
    EVT_BUTTON(wxID_OK, ItemInfoDialog::OnOk)
48
 
    EVT_BUTTON(wxID_CANCEL, ItemInfoDialog::OnCancel)
49
 
 
50
 
END_EVENT_TABLE()
51
 
 
52
 
/*****************************************************************************
53
 
 * Constructor.
54
 
 *****************************************************************************/
55
 
ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
56
 
                                playlist_item_t *_p_item,
57
 
                                wxWindow* _p_parent ):
58
 
    wxDialog( _p_parent, -1, wxU(_("Playlist item info")),
59
 
             wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE )
60
 
{
61
 
    /* Initializations */
62
 
    p_intf = _p_intf;
63
 
    p_parent = _p_parent;
64
 
    p_item = _p_item;
65
 
    SetIcon( *p_intf->p_sys->p_icon );
66
 
 
67
 
    /* Create a panel to put everything in */
68
 
    wxPanel *panel = new wxPanel( this, -1 );
69
 
    panel->SetAutoLayout( TRUE );
70
 
 
71
 
    /* Create the standard info panel */
72
 
    info_panel = new MetaDataPanel(p_intf, panel, true );
73
 
    info_panel->Update( &(p_item->input) );
74
 
    /* Separation */
75
 
    wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
76
 
 
77
 
    /* Create the buttons */
78
 
    wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
79
 
    ok_button->SetDefault();
80
 
    wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
81
 
                                            wxU(_("&Cancel")) );
82
 
 
83
 
    /* Place everything in sizers */
84
 
    wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
85
 
    button_sizer->AddButton( ok_button );
86
 
    button_sizer->AddButton( cancel_button );
87
 
    button_sizer->Realize();
88
 
    wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
89
 
    wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
90
 
    panel_sizer->Add( info_panel, 1, wxEXPAND | wxALL, 5 );
91
 
    panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
92
 
    panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
93
 
    panel_sizer->Layout();
94
 
    panel->SetSizerAndFit( panel_sizer );
95
 
    main_sizer->Add( panel, 1, wxGROW, 0 );
96
 
    main_sizer->Layout();
97
 
    SetSizerAndFit( main_sizer );
98
 
}
99
 
 
100
 
ItemInfoDialog::~ItemInfoDialog()
101
 
{
102
 
}
103
 
 
104
 
 
105
 
/*****************************************************************************
106
 
 * Events methods.
107
 
 *****************************************************************************/
108
 
void ItemInfoDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
109
 
{
110
 
    vlc_mutex_lock( &p_item->input.lock );
111
 
    p_item->input.psz_name = info_panel->GetName();
112
 
    p_item->input.psz_uri = info_panel->GetURI();
113
 
    vlc_mutex_unlock( &p_item->input.lock );
114
 
    EndModal( wxID_OK );
115
 
}
116
 
 
117
 
void ItemInfoDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
118
 
{
119
 
    EndModal( wxID_CANCEL );
120
 
}