* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.22 2003/05/04 22:42:16 gbazin Exp $
+ * $Id: interface.cpp,v 1.23 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
EVT_MENU(Prefs_Event, Interface::OnPreferences)
EVT_MENU_OPEN(Interface::OnMenuOpen)
- EVT_MENU_CLOSE(Interface::OnMenuClose)
+#if defined( __WXMSW__ ) || defined( __WXMAC__ )
+ EVT_CONTEXT_MENU(Interface::OnContextMenu)
+#else
+ EVT_RIGHT_UP(Interface::OnContextMenu)
+#endif
/* Toolbar events */
EVT_MENU(OpenFile_Event, Interface::OnOpenFile)
*****************************************************************************/
void Interface::OnMenuOpen(wxMenuEvent& event)
{
+#if !defined( __WXMSW__ )
if( event.GetEventObject() == p_audio_menu )
{
if( b_audio_menu )
}
else b_video_menu = 1;
}
+
+#else
+ p_audio_menu = AudioMenu( p_intf, this );
+ wxMenu *menu = GetMenuBar()->Replace( 3, p_audio_menu, _("&Audio") );
+ if( menu ) delete menu;
+
+ p_video_menu = VideoMenu( p_intf, this );
+ menu = GetMenuBar()->Replace( 4, p_video_menu, _("&Video") );
+ if( menu ) delete menu;
+
+#endif
}
-void Interface::OnMenuClose(wxMenuEvent& event)
+#if defined( __WXMSW__ ) || defined( __WXMAC__ )
+void Interface::OnContextMenu(wxContextMenuEvent& event)
{
+ ::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
}
+#else
+void Interface::OnContextMenu(wxMouseEvent& event)
+{
+ ::PopupMenu( p_intf, this, event.GetPosition() );
+}
+#endif
void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
{
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: menus.cpp,v 1.2 2003/05/05 22:23:40 gbazin Exp $
+ * $Id: menus.cpp,v 1.3 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
EVT_MENU(-1, MenuEvtHandler::OnMenuEvent)
END_EVENT_TABLE()
-void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
+void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface,
+ const wxPoint& pos )
{
vlc_object_t *p_object;
char *ppsz_varnames[19];
ppsz_varnames, pi_objects );
_p_main_interface->p_popup_menu = popupmenu;
- wxPoint mousepos = wxGetMousePosition();
- _p_main_interface->PopupMenu( popupmenu,
- _p_main_interface->ScreenToClient(mousepos).x,
- _p_main_interface->ScreenToClient(mousepos).y
- );
+ _p_main_interface->PopupMenu( popupmenu, pos.x, pos.y );
}
wxMenu *AudioMenu( intf_thread_t *_p_intf, Interface *_p_main_interface )
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.16 2003/05/07 00:18:39 gbazin Exp $
+ * $Id: open.cpp,v 1.17 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
wxPoint(20,25), wxSize(120, -1),
0, NULL );
mrl_combo->SetToolTip( _("You can use this field directly by typing the "
- "full MRL you want to open.\n""Alternatively, the field will be filled"
- "automatically when you use the following controls.") );
+ "full MRL you want to open.\n""Alternatively, the field will be "
+ "filled automatically when you use the controls below") );
- mrl_sizer->Add( mrl_label, 0, wxEXPAND | wxALL, 5 );
- mrl_sizer->Add( mrl_combo, 1, wxEXPAND | wxALL, 5 );
+ mrl_sizer->Add( mrl_label, 0, wxALL | wxALIGN_CENTER, 5 );
+ mrl_sizer->Add( mrl_combo, 1, wxALL | wxALIGN_CENTER, 5 );
mrl_sizer_sizer->Add( mrl_sizer, 1, wxEXPAND | wxALL, 5 );
break;
case 2:
- mrl = "udp" + demux + "://";
- break;
-
- case 3:
/* http access */
- mrl = "http" + demux + "://" + net_addrs[3]->GetLineText(0);
+ mrl = "http" + demux + "://" + net_addrs[2]->GetLineText(0);
break;
}
break;
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.6 2003/04/21 00:54:26 ipkiss Exp $
+ * $Id: streamout.cpp,v 1.7 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
mrl_combo = new wxComboBox( panel, MRL_Event, mrl,
wxPoint(20,25), wxSize(120, -1),
0, NULL );
- mrl_sizer->Add( mrl_label, 0, wxEXPAND | wxALL, 5 );
- mrl_sizer->Add( mrl_combo, 1, wxEXPAND | wxALL, 5 );
+ mrl_combo->SetToolTip( _("You can use this field directly by typing the "
+ "full MRL you want to open.\n""Alternatively, the field will be "
+ "filled automatically when you use the controls below") );
+
+ mrl_sizer->Add( mrl_label, 0, wxALL | wxALIGN_CENTER, 5 );
+ mrl_sizer->Add( mrl_combo, 1, wxALL | wxALIGN_CENTER, 5 );
mrl_sizer_sizer->Add( mrl_sizer, 1, wxEXPAND | wxALL, 5 );
/* Create the output encapsulation panel */
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: timer.cpp,v 1.14 2003/05/04 22:42:16 gbazin Exp $
+ * $Id: timer.cpp,v 1.15 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* If the "display popup" flag has changed */
if( p_intf->b_menu_change )
{
- PopupMenu( p_intf, p_main_interface );
+ wxPoint mousepos = wxGetMousePosition();
+ PopupMenu( p_intf, p_main_interface,
+ p_main_interface->ScreenToClient(mousepos) );
p_intf->b_menu_change = 0;
}
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.19 2003/05/04 22:42:16 gbazin Exp $
+ * $Id: wxwindows.h,v 1.20 2003/05/07 12:23:06 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
void OnNextStream( wxCommandEvent& event );
void OnMenuOpen( wxMenuEvent& event );
- void OnMenuClose( wxMenuEvent& event );
+
+#if defined( __WXMSW__ ) || defined( __WXMAC__ )
+ void OnContextMenu(wxContextMenuEvent& event);
+#else
+ void OnContextMenu(wxMouseEvent& event);
+#endif
DECLARE_EVENT_TABLE();
#endif
/* Menus */
-void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );
+void PopupMenu( intf_thread_t *_p_intf, Interface *_p_main_interface,
+ const wxPoint& pos );
wxMenu *AudioMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );
wxMenu *VideoMenu( intf_thread_t *_p_intf, Interface *_p_main_interface );