From: Gildas Bazin Date: Sat, 24 May 2003 17:52:49 +0000 (+0000) Subject: * modules/gui/skins/*: compilation fixes. X-Git-Tag: 0.6.0~204 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=73afb0aa080c1fbcc7a10f6ecf6a7f663a7106ba;p=vlc * modules/gui/skins/*: compilation fixes. * modules/gui/wxwindows/*: fixed the open dialog to switch to the requested file/disc/net section. --- diff --git a/modules/gui/skins/gtk2/gtk2_font.cpp b/modules/gui/skins/gtk2/gtk2_font.cpp index 6635766c12..18b7060767 100644 --- a/modules/gui/skins/gtk2/gtk2_font.cpp +++ b/modules/gui/skins/gtk2/gtk2_font.cpp @@ -2,7 +2,7 @@ * gtk2_font.cpp: GTK2 implementation of the Font class ***************************************************************************** * 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 * Emmanuel Puig @@ -48,6 +48,7 @@ GTK2Font::GTK2Font( intf_thread_t *_p_intf, string fontname, int size, { Context = gdk_pango_context_get(); Layout = pango_layout_new( Context ); + p_intf = _p_intf; // Text properties setting FontDesc = pango_font_description_new(); @@ -106,7 +107,7 @@ void GTK2Font::GenericPrint( Graphics *dest, string text, int x, int y, int real_w, real_h; // 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 ); // Get handles diff --git a/modules/gui/skins/gtk2/gtk2_font.h b/modules/gui/skins/gtk2/gtk2_font.h index fe73a8b453..57b4eb2a38 100644 --- a/modules/gui/skins/gtk2/gtk2_font.h +++ b/modules/gui/skins/gtk2/gtk2_font.h @@ -2,7 +2,7 @@ * gtk2_font.h: GTK2 implementation of the Font class ***************************************************************************** * 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 * @@ -45,6 +45,9 @@ class GTK2Font : SkinFont PangoLayout *Layout; PangoFontDescription *FontDesc; + // pointer to thread info + intf_thread_t *p_intf; + // Assign font to Device Context virtual void AssignFont( Graphics *dest ); diff --git a/modules/gui/skins/src/vlcproc.cpp b/modules/gui/skins/src/vlcproc.cpp index 55670f2295..b941aaa2e6 100644 --- a/modules/gui/skins/src/vlcproc.cpp +++ b/modules/gui/skins/src/vlcproc.cpp @@ -2,7 +2,7 @@ * vlcproc.cpp: VlcProc class ***************************************************************************** * 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 Teulière * Emmanuel Puig @@ -335,9 +335,10 @@ void VlcProc::LoadSkin() #ifndef BASIC_SKINS if( p_intf->p_sys->p_new_theme_file == NULL ) { - wxFileDialog dialog( NULL, _("Open a skin file"), "", "", - "Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|All files|*.*", - wxOPEN ); + wxFileDialog dialog( NULL, + wxU(_("Open a skin file")), wxT(""), wxT(""), + wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|" + "All files|*.*"), wxOPEN ); if( dialog.ShowModal() == wxID_OK ) { diff --git a/modules/gui/wxwindows/interface.cpp b/modules/gui/wxwindows/interface.cpp index f217ba14cd..59a46271bb 100644 --- a/modules/gui/wxwindows/interface.cpp +++ b/modules/gui/wxwindows/interface.cpp @@ -2,7 +2,7 @@ * interface.cpp : wxWindows plugin for vlc ***************************************************************************** * 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 * @@ -412,7 +412,8 @@ void Interface::Open( int i_access_method ) if( p_open_dialog == NULL ) 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 */ playlist_t *p_playlist = diff --git a/modules/gui/wxwindows/open.cpp b/modules/gui/wxwindows/open.cpp index a2248d7fde..fa5bd67d7a 100644 --- a/modules/gui/wxwindows/open.cpp +++ b/modules/gui/wxwindows/open.cpp @@ -2,7 +2,7 @@ * open.cpp : wxWindows plugin for vlc ***************************************************************************** * 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 * @@ -270,7 +270,7 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent, wxU(_("Cancel")) ); /* Create notebook */ - wxNotebook *notebook = new wxNotebook( panel, Notebook_Event ); + notebook = new wxNotebook( panel, Notebook_Event ); wxNotebookSizer *notebook_sizer = new wxNotebookSizer( notebook ); notebook->AddPage( FilePanel( notebook ), wxU(_("File")), @@ -327,6 +327,17 @@ OpenDialog::~OpenDialog() 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. *****************************************************************************/ diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h index d6a7951c1a..9d9e92d750 100644 --- a/modules/gui/wxwindows/wxwindows.h +++ b/modules/gui/wxwindows/wxwindows.h @@ -2,7 +2,7 @@ * wxwindows.h: private wxWindows interface description ***************************************************************************** * 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 * @@ -206,6 +206,9 @@ public: int i_access_method ); virtual ~OpenDialog(); + int ShowModal(); + int ShowModal( int i_access_method ); + wxArrayString mrl; private: @@ -256,6 +259,7 @@ private: int i_current_access_method; wxComboBox *mrl_combo; + wxNotebook *notebook; /* Controls for the file panel */ wxComboBox *file_combo;