Commit 0bb214dc authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: the wxWindows plugin is now UNICODE happy.
parent 9d32c978
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* fileinfo.cpp : wxWindows plugin for vlc * fileinfo.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: fileinfo.cpp,v 1.11 2003/04/22 18:21:15 ipkiss Exp $ * $Id: fileinfo.cpp,v 1.12 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* *
...@@ -76,7 +76,7 @@ END_EVENT_TABLE() ...@@ -76,7 +76,7 @@ END_EVENT_TABLE()
* Constructor. * Constructor.
*****************************************************************************/ *****************************************************************************/
FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ): FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ):
wxFrame( _p_main_interface, -1, "FileInfo", wxDefaultPosition, wxFrame( _p_main_interface, -1, wxU(_("FileInfo")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE ) wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{ {
/* Initializations */ /* Initializations */
...@@ -92,10 +92,10 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -92,10 +92,10 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ):
new wxTreeCtrl( panel, -1, wxDefaultPosition, wxSize( 350, 350 ), new wxTreeCtrl( panel, -1, wxDefaultPosition, wxSize( 350, 350 ),
wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT | wxSUNKEN_BORDER ); wxTR_HAS_BUTTONS | wxTR_HIDE_ROOT | wxSUNKEN_BORDER );
fileinfo_root_label = ""; fileinfo_root_label = wxT("");
/* Create the OK button */ /* Create the OK button */
wxButton *ok_button = new wxButton( panel, wxID_OK, _("OK") ); wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
ok_button->SetDefault(); ok_button->SetDefault();
/* Place everything in sizers */ /* Place everything in sizers */
...@@ -123,7 +123,7 @@ void FileInfo::UpdateFileInfo() ...@@ -123,7 +123,7 @@ void FileInfo::UpdateFileInfo()
{ {
if( fileinfo_root ) if( fileinfo_root )
{ {
fileinfo_root_label = ""; fileinfo_root_label = wxT("");
fileinfo_tree->DeleteChildren( fileinfo_root ); fileinfo_tree->DeleteChildren( fileinfo_root );
} }
return; return;
...@@ -135,17 +135,17 @@ void FileInfo::UpdateFileInfo() ...@@ -135,17 +135,17 @@ void FileInfo::UpdateFileInfo()
* retrieved with the GetItemText() method, but it doesn't work on * retrieved with the GetItemText() method, but it doesn't work on
* Windows when the wxTR_HIDE_ROOT style is set. That's why we need to * Windows when the wxTR_HIDE_ROOT style is set. That's why we need to
* use the fileinfo_root_label variable... */ * use the fileinfo_root_label variable... */
fileinfo_root = fileinfo_tree->AddRoot( p_input->psz_name ); fileinfo_root = fileinfo_tree->AddRoot( wxU(p_input->psz_name) );
fileinfo_root_label = p_input->psz_name; fileinfo_root_label = wxU(p_input->psz_name);
} }
else if( fileinfo_root_label == (wxString)p_input->psz_name ) else if( fileinfo_root_label == wxU(p_input->psz_name) )
{ {
return; return;
} }
/* We rebuild the tree from scratch */ /* We rebuild the tree from scratch */
fileinfo_tree->DeleteChildren( fileinfo_root ); fileinfo_tree->DeleteChildren( fileinfo_root );
fileinfo_root_label = p_input->psz_name; fileinfo_root_label = wxU(p_input->psz_name);
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
...@@ -154,12 +154,12 @@ void FileInfo::UpdateFileInfo() ...@@ -154,12 +154,12 @@ void FileInfo::UpdateFileInfo()
while( p_cat ) while( p_cat )
{ {
wxTreeItemId cat = fileinfo_tree->AppendItem( fileinfo_root, wxTreeItemId cat = fileinfo_tree->AppendItem( fileinfo_root,
p_cat->psz_name ); wxU(p_cat->psz_name) );
input_info_t *p_info = p_cat->p_info; input_info_t *p_info = p_cat->p_info;
while( p_info ) while( p_info )
{ {
fileinfo_tree->AppendItem( cat, wxString(p_info->psz_name) + ": " fileinfo_tree->AppendItem( cat, wxU(p_info->psz_name) +
+ p_info->psz_value ); wxT(": ") + wxU(p_info->psz_value) );
p_info = p_info->p_next; p_info = p_info->p_next;
} }
p_cat = p_cat->p_next; p_cat = p_cat->p_next;
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc * menus.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.5 2003/05/08 12:09:59 gbazin Exp $ * $Id: menus.cpp,v 1.6 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -266,7 +266,7 @@ Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface, ...@@ -266,7 +266,7 @@ Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface,
if( !pi_objects[i] ) if( !pi_objects[i] )
{ {
Append( MenuDummy_Event, ppsz_varnames[i] ); Append( MenuDummy_Event, wxU(ppsz_varnames[i]) );
continue; continue;
} }
...@@ -280,7 +280,7 @@ Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface, ...@@ -280,7 +280,7 @@ Menu::Menu( intf_thread_t *_p_intf, Interface *_p_main_interface,
/* Special case for empty menus */ /* Special case for empty menus */
if( GetMenuItemCount() == 0 ) if( GetMenuItemCount() == 0 )
{ {
Append( MenuDummy_Event, _("Empty") ); Append( MenuDummy_Event, wxU(_("Empty")) );
Enable( MenuDummy_Event, FALSE ); Enable( MenuDummy_Event, FALSE );
} }
} }
...@@ -332,9 +332,9 @@ void Menu::CreateMenuItem( wxMenu *menu, char *psz_var, ...@@ -332,9 +332,9 @@ void Menu::CreateMenuItem( wxMenu *menu, char *psz_var,
if( i_type & VLC_VAR_HASCHOICE ) if( i_type & VLC_VAR_HASCHOICE )
{ {
menu->Append( MenuDummy_Event, menu->Append( MenuDummy_Event,
text.psz_string ? text.psz_string : psz_var, wxU(text.psz_string ? text.psz_string : psz_var),
CreateChoicesMenu( psz_var, p_object ), CreateChoicesMenu( psz_var, p_object ),
"" /* Nothing for now (maybe use a GETLONGTEXT) */ ); wxT("")/* Nothing for now (maybe use a GETLONGTEXT) */ );
if( text.psz_string ) free( text.psz_string ); if( text.psz_string ) free( text.psz_string );
return; return;
...@@ -345,18 +345,18 @@ void Menu::CreateMenuItem( wxMenu *menu, char *psz_var, ...@@ -345,18 +345,18 @@ void Menu::CreateMenuItem( wxMenu *menu, char *psz_var,
{ {
case VLC_VAR_VOID: case VLC_VAR_VOID:
menuitem = new wxMenuItemExt( menu, ++i_item_id, menuitem = new wxMenuItemExt( menu, ++i_item_id,
text.psz_string ? wxU(text.psz_string ?
text.psz_string : psz_var, text.psz_string : psz_var),
"", wxITEM_NORMAL, strdup(psz_var), wxT(""), wxITEM_NORMAL, strdup(psz_var),
p_object->i_object_id, val, i_type ); p_object->i_object_id, val, i_type );
menu->Append( menuitem ); menu->Append( menuitem );
break; break;
case VLC_VAR_BOOL: case VLC_VAR_BOOL:
menuitem = new wxMenuItemExt( menu, ++i_item_id, menuitem = new wxMenuItemExt( menu, ++i_item_id,
text.psz_string ? wxU(text.psz_string ?
text.psz_string : psz_var, text.psz_string : psz_var),
"", wxITEM_CHECK, strdup(psz_var), wxT(""), wxITEM_CHECK, strdup(psz_var),
p_object->i_object_id, val, i_type ); p_object->i_object_id, val, i_type );
menu->Append( menuitem ); menu->Append( menuitem );
Check( i_item_id -1, val.b_bool ? FALSE : TRUE ); Check( i_item_id -1, val.b_bool ? FALSE : TRUE );
...@@ -424,12 +424,12 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object ) ...@@ -424,12 +424,12 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object )
{ {
case VLC_VAR_VARIABLE: case VLC_VAR_VARIABLE:
menu->Append( MenuDummy_Event, menu->Append( MenuDummy_Event,
text_list.p_list->p_values[i].psz_string ? wxU(text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : text_list.p_list->p_values[i].psz_string :
val_list.p_list->p_values[i].psz_string, val_list.p_list->p_values[i].psz_string),
CreateChoicesMenu( CreateChoicesMenu(
val_list.p_list->p_values[i].psz_string, val_list.p_list->p_values[i].psz_string,
p_object ), "" ); p_object ), wxT("") );
break; break;
case VLC_VAR_STRING: case VLC_VAR_STRING:
...@@ -437,10 +437,10 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object ) ...@@ -437,10 +437,10 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object )
strdup(val_list.p_list->p_values[i].psz_string); strdup(val_list.p_list->p_values[i].psz_string);
menuitem = menuitem =
new wxMenuItemExt( menu, ++i_item_id, new wxMenuItemExt( menu, ++i_item_id,
text_list.p_list->p_values[i].psz_string ? wxU(text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : text_list.p_list->p_values[i].psz_string :
another_val.psz_string, another_val.psz_string),
"", wxITEM_RADIO, strdup(psz_var), wxT(""), wxITEM_RADIO, strdup(psz_var),
p_object->i_object_id, another_val, i_type ); p_object->i_object_id, another_val, i_type );
menu->Append( menuitem ); menu->Append( menuitem );
...@@ -454,10 +454,10 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object ) ...@@ -454,10 +454,10 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object )
menuitem = menuitem =
new wxMenuItemExt( menu, ++i_item_id, new wxMenuItemExt( menu, ++i_item_id,
text_list.p_list->p_values[i].psz_string ? text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : wxU(text_list.p_list->p_values[i].psz_string):
wxString::Format("%d", wxString::Format(wxT("%d"),
val_list.p_list->p_values[i].i_int), val_list.p_list->p_values[i].i_int),
"", wxITEM_RADIO, strdup(psz_var), wxT(""), wxITEM_RADIO, strdup(psz_var),
p_object->i_object_id, p_object->i_object_id,
val_list.p_list->p_values[i], i_type ); val_list.p_list->p_values[i], i_type );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc * playlist.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: messages.cpp,v 1.4 2003/04/20 20:28:40 ipkiss Exp $ * $Id: messages.cpp,v 1.5 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -77,7 +77,7 @@ END_EVENT_TABLE() ...@@ -77,7 +77,7 @@ END_EVENT_TABLE()
* Constructor. * Constructor.
*****************************************************************************/ *****************************************************************************/
Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ): Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ):
wxFrame( _p_main_interface, -1, "Messages", wxDefaultPosition, wxFrame( _p_main_interface, -1, wxU(_("Messages")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE ) wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{ {
/* Initializations */ /* Initializations */
...@@ -91,7 +91,7 @@ Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -91,7 +91,7 @@ Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ):
messages_panel->SetAutoLayout( TRUE ); messages_panel->SetAutoLayout( TRUE );
/* Create the textctrl and some text attributes */ /* Create the textctrl and some text attributes */
textctrl = new wxTextCtrl( messages_panel, -1, "", wxDefaultPosition, textctrl = new wxTextCtrl( messages_panel, -1, wxT(""), wxDefaultPosition,
wxSize::wxSize( 400, 500 ), wxTE_MULTILINE | wxTE_READONLY | wxSize::wxSize( 400, 500 ), wxTE_MULTILINE | wxTE_READONLY |
wxTE_RICH | wxTE_NOHIDESEL ); wxTE_RICH | wxTE_NOHIDESEL );
info_attr = new wxTextAttr( wxColour::wxColour( 0, 128, 0 ) ); info_attr = new wxTextAttr( wxColour::wxColour( 0, 128, 0 ) );
...@@ -100,12 +100,12 @@ Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -100,12 +100,12 @@ Messages::Messages( intf_thread_t *_p_intf, Interface *_p_main_interface ):
dbg_attr = new wxTextAttr( *wxBLACK ); dbg_attr = new wxTextAttr( *wxBLACK );
/* Create the OK button */ /* Create the OK button */
wxButton *ok_button = new wxButton( messages_panel, wxID_OK, _("OK") ); wxButton *ok_button = new wxButton( messages_panel, wxID_OK, wxU(_("OK")));
ok_button->SetDefault(); ok_button->SetDefault();
/* Create the Verbose checkbox */ /* Create the Verbose checkbox */
wxCheckBox *verbose_checkbox = wxCheckBox *verbose_checkbox =
new wxCheckBox( messages_panel, Verbose_Event, _("Verbose") ); new wxCheckBox( messages_panel, Verbose_Event, wxU(_("Verbose")) );
/* Place everything in sizers */ /* Place everything in sizers */
wxBoxSizer *buttons_sizer = new wxBoxSizer( wxHORIZONTAL ); wxBoxSizer *buttons_sizer = new wxBoxSizer( wxHORIZONTAL );
...@@ -151,30 +151,30 @@ void Messages::UpdateLog() ...@@ -151,30 +151,30 @@ void Messages::UpdateLog()
/* Append all messages to log window */ /* Append all messages to log window */
textctrl->SetDefaultStyle( *dbg_attr ); textctrl->SetDefaultStyle( *dbg_attr );
(*textctrl) << p_sub->p_msg[i_start].psz_module; (*textctrl) << wxU(p_sub->p_msg[i_start].psz_module);
switch( p_sub->p_msg[i_start].i_type ) switch( p_sub->p_msg[i_start].i_type )
{ {
case VLC_MSG_INFO: case VLC_MSG_INFO:
(*textctrl) << ": "; (*textctrl) << wxT(": ");
textctrl->SetDefaultStyle( *info_attr ); textctrl->SetDefaultStyle( *info_attr );
break; break;
case VLC_MSG_ERR: case VLC_MSG_ERR:
(*textctrl) << " error: "; (*textctrl) << wxT(" error: ");
textctrl->SetDefaultStyle( *err_attr ); textctrl->SetDefaultStyle( *err_attr );
break; break;
case VLC_MSG_WARN: case VLC_MSG_WARN:
(*textctrl) << " warning: "; (*textctrl) << wxT(" warning: ");
textctrl->SetDefaultStyle( *warn_attr ); textctrl->SetDefaultStyle( *warn_attr );
break; break;
case VLC_MSG_DBG: case VLC_MSG_DBG:
default: default:
(*textctrl) << " debug: "; (*textctrl) << wxT(" debug: ");
break; break;
} }
/* Add message */ /* Add message */
(*textctrl) << p_sub->p_msg[i_start].psz_msg << "\n"; (*textctrl) << wxU(p_sub->p_msg[i_start].psz_msg) << wxT("\n");
} }
vlc_mutex_lock( p_sub->p_lock ); vlc_mutex_lock( p_sub->p_lock );
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.cpp : wxWindows plugin for vlc * playlist.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: playlist.cpp,v 1.7 2003/04/01 16:11:43 gbazin Exp $ * $Id: playlist.cpp,v 1.8 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* *
...@@ -92,7 +92,7 @@ END_EVENT_TABLE() ...@@ -92,7 +92,7 @@ END_EVENT_TABLE()
* Constructor. * Constructor.
*****************************************************************************/ *****************************************************************************/
Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
wxFrame( _p_main_interface, -1, "Playlist", wxDefaultPosition, wxFrame( _p_main_interface, -1, wxU(_("Playlist")), wxDefaultPosition,
wxSize::wxSize( 400, 500 ), wxDEFAULT_FRAME_STYLE ) wxSize::wxSize( 400, 500 ), wxDEFAULT_FRAME_STYLE )
{ {
/* Initializations */ /* Initializations */
...@@ -102,21 +102,21 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -102,21 +102,21 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
/* Create our "Manage" menu */ /* Create our "Manage" menu */
wxMenu *manage_menu = new wxMenu; wxMenu *manage_menu = new wxMenu;
manage_menu->Append( AddUrl_Event, _("Add &Url...") ); manage_menu->Append( AddUrl_Event, wxU(_("Add &Url...")) );
manage_menu->Append( AddDirectory_Event, _("Add &Directory...") ); manage_menu->Append( AddDirectory_Event, wxU(_("Add &Directory...")) );
manage_menu->AppendSeparator(); manage_menu->AppendSeparator();
manage_menu->Append( Close_Event, _("&Close") ); manage_menu->Append( Close_Event, wxU(_("&Close")) );
/* Create our "Selection" menu */ /* Create our "Selection" menu */
wxMenu *selection_menu = new wxMenu; wxMenu *selection_menu = new wxMenu;
selection_menu->Append( InvertSelection_Event, _("&Invert") ); selection_menu->Append( InvertSelection_Event, wxU(_("&Invert")) );
selection_menu->Append( DeleteSelection_Event, _("&Delete") ); selection_menu->Append( DeleteSelection_Event, wxU(_("&Delete")) );
selection_menu->Append( SelectAll_Event, _("&Select All") ); selection_menu->Append( SelectAll_Event, wxU(_("&Select All")) );
/* Append the freshly created menus to the menu bar */ /* Append the freshly created menus to the menu bar */
wxMenuBar *menubar = new wxMenuBar( wxMB_DOCKABLE ); wxMenuBar *menubar = new wxMenuBar( wxMB_DOCKABLE );
menubar->Append( manage_menu, _("&Manage") ); menubar->Append( manage_menu, wxU(_("&Manage")) );
menubar->Append( selection_menu, _("&Selection") ); menubar->Append( selection_menu, wxU(_("&Selection")) );
/* Attach the menu bar to the frame */ /* Attach the menu bar to the frame */
SetMenuBar( menubar ); SetMenuBar( menubar );
...@@ -133,13 +133,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ): ...@@ -133,13 +133,13 @@ Playlist::Playlist( intf_thread_t *_p_intf, Interface *_p_main_interface ):
listview = new wxListView( playlist_panel, ListView_Event, listview = new wxListView( playlist_panel, ListView_Event,
wxDefaultPosition, wxSize( 350, 300 ), wxDefaultPosition, wxSize( 350, 300 ),
wxLC_REPORT | wxSUNKEN_BORDER ); wxLC_REPORT | wxSUNKEN_BORDER );
listview->InsertColumn( 0, _("Url") ); listview->InsertColumn( 0, wxU(_("Url")) );
listview->InsertColumn( 1, _("Duration") ); listview->InsertColumn( 1, wxU(_("Duration")) );
listview->SetColumnWidth( 0, 250 ); listview->SetColumnWidth( 0, 250 );
listview->SetColumnWidth( 1, 100 ); listview->SetColumnWidth( 1, 100 );
/* Create the OK button */ /* Create the OK button */
ok_button = new wxButton( playlist_panel, wxID_OK, _("OK") ); ok_button = new wxButton( playlist_panel, wxID_OK, wxU(_("OK")) );
ok_button->SetDefault(); ok_button->SetDefault();
/* Place everything in sizers */ /* Place everything in sizers */
...@@ -187,10 +187,10 @@ void Playlist::Rebuild() ...@@ -187,10 +187,10 @@ void Playlist::Rebuild()
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
for( int i = 0; i < p_playlist->i_size; i++ ) for( int i = 0; i < p_playlist->i_size; i++ )
{ {
wxString filename = p_playlist->pp_items[i]->psz_name; wxString filename = wxU(p_playlist->pp_items[i]->psz_name);
listview->InsertItem( i, filename ); listview->InsertItem( i, filename );
/* FIXME: we should try to find the actual duration... */ /* FIXME: we should try to find the actual duration... */
listview->SetItem( i, 1, _("no info") ); listview->SetItem( i, 1, wxU(_("no info")) );
} }
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc * timer.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * Copyright (C) 2000-2001 VideoLAN
* $Id: timer.cpp,v 1.15 2003/05/07 12:23:06 gbazin Exp $ * $Id: timer.cpp,v 1.16 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -140,7 +140,7 @@ void Timer::Notify() ...@@ -140,7 +140,7 @@ void Timer::Notify()
} }
p_main_interface->statusbar->SetStatusText( p_main_interface->statusbar->SetStatusText(
p_intf->p_sys->p_input->psz_source, 1 ); wxU(p_intf->p_sys->p_input->psz_source), 1 );
p_main_interface->TogglePlayButton( PLAYING_S ); p_main_interface->TogglePlayButton( PLAYING_S );
i_old_playing_status = PLAYING_S; i_old_playing_status = PLAYING_S;
...@@ -165,7 +165,7 @@ void Timer::Notify() ...@@ -165,7 +165,7 @@ void Timer::Notify()
i_old_playing_status = PAUSE_S; i_old_playing_status = PAUSE_S;
} }
p_main_interface->statusbar->SetStatusText( "", 1 ); p_main_interface->statusbar->SetStatusText( wxT(""), 1 );
vlc_object_release( p_intf->p_sys->p_input ); vlc_object_release( p_intf->p_sys->p_input );
p_intf->p_sys->p_input = NULL; p_intf->p_sys->p_input = NULL;
...@@ -281,9 +281,8 @@ void DisplayStreamDate( wxControl *p_slider_frame, intf_thread_t * p_intf , ...@@ -281,9 +281,8 @@ void DisplayStreamDate( wxControl *p_slider_frame, intf_thread_t * p_intf ,
char psz_time[ OFFSETTOTIME_MAX_SIZE ]; char psz_time[ OFFSETTOTIME_MAX_SIZE ];
p_slider_frame->SetLabel( p_slider_frame->SetLabel(
input_OffsetToTime( p_intf->p_sys->p_input, wxU(input_OffsetToTime( p_intf->p_sys->p_input,
psz_time, psz_time, p_area->i_size * i_pos / SLIDER_MAX_POS )) );
p_area->i_size * i_pos / SLIDER_MAX_POS ) );
#undef p_area #undef p_area
} }
} }
...@@ -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.21 2003/05/07 15:54:49 gbazin Exp $ * $Id: wxwindows.h,v 1.22 2003/05/11 13:22:23 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -34,6 +34,13 @@ class FileInfo; ...@@ -34,6 +34,13 @@ class FileInfo;
#define SLIDER_MAX_POS 10000 #define SLIDER_MAX_POS 10000
/* wxU is used to convert ansi strings to unicode strings (wchar_t) */
#if wxUSE_UNICODE
# define wxU(ansi) wxString(ansi, *wxConvCurrent)
#else
# define wxU(ansi) ansi
#endif
/***************************************************************************** /*****************************************************************************
* intf_sys_t: description and status of wxwindows interface * intf_sys_t: description and status of wxwindows interface
*****************************************************************************/ *****************************************************************************/
......
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