Commit 73afb0aa authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins/*: compilation fixes.
* modules/gui/wxwindows/*: fixed the open dialog to switch to the requested file/disc/net section.
parent 9534c1b6
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_font.cpp: GTK2 implementation of the Font class * gtk2_font.cpp: GTK2 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.cpp,v 1.14 2003/04/28 12:00:13 asmax Exp $ * $Id: gtk2_font.cpp,v 1.15 2003/05/24 17:52:48 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -48,6 +48,7 @@ GTK2Font::GTK2Font( intf_thread_t *_p_intf, string fontname, int size, ...@@ -48,6 +48,7 @@ GTK2Font::GTK2Font( intf_thread_t *_p_intf, string fontname, int size,
{ {
Context = gdk_pango_context_get(); Context = gdk_pango_context_get();
Layout = pango_layout_new( Context ); Layout = pango_layout_new( Context );
p_intf = _p_intf;
// Text properties setting // Text properties setting
FontDesc = pango_font_description_new(); FontDesc = pango_font_description_new();
...@@ -106,7 +107,7 @@ void GTK2Font::GenericPrint( Graphics *dest, string text, int x, int y, ...@@ -106,7 +107,7 @@ void GTK2Font::GenericPrint( Graphics *dest, string text, int x, int y,
int real_w, real_h; int real_w, real_h;
// Create buffer image // Create buffer image
Graphics* cov = (Graphics *)new OSGraphics( w, h ); Graphics* cov = (Graphics *)new OSGraphics( p_intf, w, h );
cov->CopyFrom( 0, 0, w, h, dest, x, y, SRC_COPY ); cov->CopyFrom( 0, 0, w, h, dest, x, y, SRC_COPY );
// Get handles // Get handles
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk2_font.h: GTK2 implementation of the Font class * gtk2_font.h: GTK2 implementation of the Font class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: gtk2_font.h,v 1.6 2003/04/21 22:12:37 asmax Exp $ * $Id: gtk2_font.h,v 1.7 2003/05/24 17:52:48 gbazin Exp $
* *
* Authors: Cyril Deguet <asmax@videolan.org> * Authors: Cyril Deguet <asmax@videolan.org>
* *
...@@ -45,6 +45,9 @@ class GTK2Font : SkinFont ...@@ -45,6 +45,9 @@ class GTK2Font : SkinFont
PangoLayout *Layout; PangoLayout *Layout;
PangoFontDescription *FontDesc; PangoFontDescription *FontDesc;
// pointer to thread info
intf_thread_t *p_intf;
// Assign font to Device Context // Assign font to Device Context
virtual void AssignFont( Graphics *dest ); virtual void AssignFont( Graphics *dest );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.24 2003/05/21 13:27:25 gbazin Exp $ * $Id: vlcproc.cpp,v 1.25 2003/05/24 17:52:48 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -335,9 +335,10 @@ void VlcProc::LoadSkin() ...@@ -335,9 +335,10 @@ void VlcProc::LoadSkin()
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
if( p_intf->p_sys->p_new_theme_file == NULL ) if( p_intf->p_sys->p_new_theme_file == NULL )
{ {
wxFileDialog dialog( NULL, _("Open a skin file"), "", "", wxFileDialog dialog( NULL,
"Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|All files|*.*", wxU(_("Open a skin file")), wxT(""), wxT(""),
wxOPEN ); wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|"
"All files|*.*"), wxOPEN );
if( dialog.ShowModal() == wxID_OK ) if( dialog.ShowModal() == wxID_OK )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.32 2003/05/22 12:00:56 gbazin Exp $ * $Id: interface.cpp,v 1.33 2003/05/24 17:52:49 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -412,7 +412,8 @@ void Interface::Open( int i_access_method ) ...@@ -412,7 +412,8 @@ void Interface::Open( int i_access_method )
if( p_open_dialog == NULL ) if( p_open_dialog == NULL )
p_open_dialog = new OpenDialog( p_intf, this, i_access_method ); p_open_dialog = new OpenDialog( p_intf, this, i_access_method );
if( p_open_dialog && p_open_dialog->ShowModal() == wxID_OK ) if( p_open_dialog &&
p_open_dialog->ShowModal( i_access_method ) == wxID_OK )
{ {
/* Update the playlist */ /* Update the playlist */
playlist_t *p_playlist = playlist_t *p_playlist =
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc * open.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.25 2003/05/20 23:17:59 gbazin Exp $ * $Id: open.cpp,v 1.26 2003/05/24 17:52:49 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -270,7 +270,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, ...@@ -270,7 +270,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
wxU(_("Cancel")) ); wxU(_("Cancel")) );
/* Create notebook */ /* Create notebook */
wxNotebook *notebook = new wxNotebook( panel, Notebook_Event ); notebook = new wxNotebook( panel, Notebook_Event );
wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook ); wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook );
notebook->AddPage( FilePanel( notebook ), wxU(_("File")), notebook->AddPage( FilePanel( notebook ), wxU(_("File")),
...@@ -327,6 +327,17 @@ OpenDialog::~OpenDialog() ...@@ -327,6 +327,17 @@ OpenDialog::~OpenDialog()
if( demuxdump_dialog ) delete demuxdump_dialog; if( demuxdump_dialog ) delete demuxdump_dialog;
} }
int OpenDialog::ShowModal( int i_access_method )
{
notebook->SetSelection( i_access_method );
return wxDialog::ShowModal();
}
int OpenDialog::ShowModal()
{
return wxDialog::ShowModal();
}
/***************************************************************************** /*****************************************************************************
* Private methods. * Private methods.
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.30 2003/05/20 23:17:59 gbazin Exp $ * $Id: wxwindows.h,v 1.31 2003/05/24 17:52:49 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -206,6 +206,9 @@ public: ...@@ -206,6 +206,9 @@ public:
int i_access_method ); int i_access_method );
virtual ~OpenDialog(); virtual ~OpenDialog();
int ShowModal();
int ShowModal( int i_access_method );
wxArrayString mrl; wxArrayString mrl;
private: private:
...@@ -256,6 +259,7 @@ private: ...@@ -256,6 +259,7 @@ private:
int i_current_access_method; int i_current_access_method;
wxComboBox *mrl_combo; wxComboBox *mrl_combo;
wxNotebook *notebook;
/* Controls for the file panel */ /* Controls for the file panel */
wxComboBox *file_combo; wxComboBox *file_combo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment