Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5a90c358
Commit
5a90c358
authored
Jul 17, 2003
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wxwindows/*: enable popup menu support in the "dialogs provider".
parent
035792d5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
52 additions
and
9 deletions
+52
-9
include/vlc_interface.h
include/vlc_interface.h
+3
-1
modules/gui/skins/src/dialogs.cpp
modules/gui/skins/src/dialogs.cpp
+14
-1
modules/gui/wxwindows/dialogs.cpp
modules/gui/wxwindows/dialogs.cpp
+20
-2
modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/interface.cpp
+7
-3
modules/gui/wxwindows/timer.cpp
modules/gui/wxwindows/timer.cpp
+5
-1
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+3
-1
No files found.
include/vlc_interface.h
View file @
5a90c358
...
...
@@ -4,7 +4,7 @@
* interface, such as message output.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: vlc_interface.h,v 1.
2 2003/07/17 17:30:40
gbazin Exp $
* $Id: vlc_interface.h,v 1.
3 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
...
...
@@ -91,3 +91,5 @@ VLC_EXPORT( void, intf_Destroy, ( intf_thread_t * ) );
#define INTF_DIALOG_MESSAGES 11
#define INTF_DIALOG_FILEINFO 12
#define INTF_DIALOG_PREFS 13
#define INTF_DIALOG_POPUPMENU 20
modules/gui/skins/src/dialogs.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* dialogs.cpp: Handles all the different dialog boxes we provide.
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: dialogs.cpp,v 1.1
0 2003/07/17 17:30:40
gbazin Exp $
* $Id: dialogs.cpp,v 1.1
1 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -74,6 +74,17 @@ Dialogs::Dialogs( intf_thread_t *_p_intf )
/* Initialize dialogs provider
* (returns as soon as initialization is done) */
if
(
p_provider
->
pf_run
)
p_provider
->
pf_run
(
p_provider
);
/* Register callback for the intf-popupmenu variable */
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
!=
NULL
)
{
var_AddCallback
(
p_playlist
,
"intf-popupmenu"
,
PopupMenuCB
,
p_intf
->
p_sys
->
p_dialogs
);
vlc_object_release
(
p_playlist
);
}
}
Dialogs
::~
Dialogs
()
...
...
@@ -122,6 +133,8 @@ void Dialogs::ShowFileInfo()
void
Dialogs
::
ShowPopup
()
{
if
(
p_provider
&&
p_provider
->
pf_show_dialog
)
p_provider
->
pf_show_dialog
(
p_provider
,
INTF_DIALOG_POPUPMENU
,
0
);
}
/*****************************************************************************
...
...
modules/gui/wxwindows/dialogs.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dialogs.cpp,v 1.
1 2003/07/17 17:30:40
gbazin Exp $
* $Id: dialogs.cpp,v 1.
2 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -72,7 +72,8 @@ BEGIN_EVENT_TABLE(DialogsProvider, wxFrame)
DialogsProvider
::
OnPreferences
)
EVT_COMMAND
(
INTF_DIALOG_FILEINFO
,
wxEVT_DIALOG
,
DialogsProvider
::
OnFileInfo
)
//EVT_COMMAND(ShowPopup_Event, wxEVT_DIALOG, DialogsProvider::OnShowPopup)
EVT_COMMAND
(
INTF_DIALOG_POPUPMENU
,
wxEVT_DIALOG
,
DialogsProvider
::
OnPopupMenu
)
END_EVENT_TABLE
()
/*****************************************************************************
...
...
@@ -95,6 +96,9 @@ DialogsProvider::DialogsProvider( intf_thread_t *_p_intf, wxWindow *p_parent )
/* Create the messages dialog so it can begin storing logs */
p_messages_dialog
=
new
Messages
(
p_intf
,
p_parent
?
p_parent
:
this
);
/* Intercept all menu events in our custom event handler */
PushEventHandler
(
new
MenuEvtHandler
(
p_intf
,
NULL
)
);
}
DialogsProvider
::~
DialogsProvider
()
...
...
@@ -237,3 +241,17 @@ void DialogsProvider::Open( int i_access_method, int i_arg )
p_open_dialog
->
Show
(
i_access_method
,
i_arg
);
}
}
void
DialogsProvider
::
OnPopupMenu
(
wxCommandEvent
&
event
)
{
wxPoint
mousepos
=
wxGetMousePosition
();
#if 0
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
event.m_x = p_main_interface->ScreenToClient(mousepos).x;
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
#endif
::
PopupMenu
(
p_intf
,
this
,
mousepos
);
}
modules/gui/wxwindows/interface.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.4
6 2003/07/17 17:30:40
gbazin Exp $
* $Id: interface.cpp,v 1.4
7 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -539,12 +539,16 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
void
Interface
::
OnContextMenu2
(
wxContextMenuEvent
&
event
)
{
::
PopupMenu
(
p_intf
,
this
,
ScreenToClient
(
event
.
GetPosition
())
);
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
//::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
}
#endif
void
Interface
::
OnContextMenu
(
wxMouseEvent
&
event
)
{
::
PopupMenu
(
p_intf
,
this
,
event
.
GetPosition
()
);
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
//::PopupMenu( p_intf, this, event.GetPosition() );
}
void
Interface
::
OnExit
(
wxCommandEvent
&
WXUNUSED
(
event
)
)
...
...
modules/gui/wxwindows/timer.cpp
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: timer.cpp,v 1.2
6 2003/07/17 17:30:40
gbazin Exp $
* $Id: timer.cpp,v 1.2
7 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -100,6 +100,7 @@ void Timer::Notify()
/* If the "display popup" flag has changed */
if
(
p_intf
->
p_sys
->
b_popup_change
)
{
#if 0
wxPoint mousepos = wxGetMousePosition();
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
...
...
@@ -107,6 +108,9 @@ void Timer::Notify()
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
p_main_interface->AddPendingEvent(event);
#endif
if
(
p_intf
->
p_sys
->
pf_show_dialog
)
p_intf
->
p_sys
->
pf_show_dialog
(
p_intf
,
INTF_DIALOG_POPUPMENU
,
0
);
p_intf
->
p_sys
->
b_popup_change
=
VLC_FALSE
;
}
...
...
modules/gui/wxwindows/wxwindows.h
View file @
5a90c358
...
...
@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.4
3 2003/07/17 17:30:40
gbazin Exp $
* $Id: wxwindows.h,v 1.4
4 2003/07/17 18:58:23
gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
...
...
@@ -203,6 +203,8 @@ private:
void
OnOpenNet
(
wxCommandEvent
&
event
);
void
OnOpenSat
(
wxCommandEvent
&
event
);
void
OnPopupMenu
(
wxCommandEvent
&
event
);
void
OnIdle
(
wxIdleEvent
&
event
);
DECLARE_EVENT_TABLE
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment