Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
237f16e4
Commit
237f16e4
authored
Nov 25, 2005
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* wx/vlm: add "Load" & "Save" buttons
parent
9dcfbd36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
3 deletions
+53
-3
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
+46
-1
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp
+7
-2
No files found.
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.cpp
View file @
237f16e4
...
@@ -30,10 +30,16 @@ enum
...
@@ -30,10 +30,16 @@ enum
{
{
Notebook_Event
,
Notebook_Event
,
Timer_Event
,
Timer_Event
,
Close_Event
,
Load_Event
,
Save_Event
,
};
};
BEGIN_EVENT_TABLE
(
VLMPanel
,
wxPanel
)
BEGIN_EVENT_TABLE
(
VLMPanel
,
wxPanel
)
EVT_TIMER
(
Timer_Event
,
VLMPanel
::
OnTimer
)
EVT_TIMER
(
Timer_Event
,
VLMPanel
::
OnTimer
)
EVT_BUTTON
(
Close_Event
,
VLMPanel
::
OnClose
)
EVT_BUTTON
(
Load_Event
,
VLMPanel
::
OnLoad
)
EVT_BUTTON
(
Save_Event
,
VLMPanel
::
OnSave
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
...
@@ -42,6 +48,7 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
...
@@ -42,6 +48,7 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
timer
(
this
,
Timer_Event
)
timer
(
this
,
Timer_Event
)
{
{
p_intf
=
_p_intf
;
p_intf
=
_p_intf
;
p_parent
=
_p_parent
;
p_vlm
=
new
VLMWrapper
(
p_intf
);
p_vlm
=
new
VLMWrapper
(
p_intf
);
p_vlm
->
AttachVLM
();
p_vlm
->
AttachVLM
();
...
@@ -62,6 +69,13 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
...
@@ -62,6 +69,13 @@ VLMPanel::VLMPanel( intf_thread_t *_p_intf, wxWindow *_p_parent ) :
panel_sizer
->
Add
(
p_notebook
,
1
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Add
(
p_notebook
,
1
,
wxEXPAND
|
wxALL
,
5
);
#endif
#endif
wxBoxSizer
*
button_sizer
=
new
wxBoxSizer
(
wxHORIZONTAL
);
button_sizer
->
Add
(
new
wxButton
(
this
,
Close_Event
,
wxU
(
_
(
"Close"
)
)
)
);
button_sizer
->
Add
(
0
,
0
,
1
);
button_sizer
->
Add
(
new
wxButton
(
this
,
Load_Event
,
wxU
(
_
(
"Load"
)
)
),
0
,
wxRIGHT
,
10
);
button_sizer
->
Add
(
new
wxButton
(
this
,
Save_Event
,
wxU
(
_
(
"Save"
)
)
)
);
panel_sizer
->
Add
(
button_sizer
,
0
,
wxEXPAND
|
wxALL
,
5
);
panel_sizer
->
Layout
();
panel_sizer
->
Layout
();
SetSizerAndFit
(
panel_sizer
);
SetSizerAndFit
(
panel_sizer
);
...
@@ -186,6 +200,38 @@ void VLMPanel::Update()
...
@@ -186,6 +200,38 @@ void VLMPanel::Update()
p_vlm
->
UnlockVLM
();
p_vlm
->
UnlockVLM
();
}
}
void
VLMPanel
::
OnClose
(
wxCommandEvent
&
event
)
{
((
VLMFrame
*
)
p_parent
)
->
OnClose
(
*
(
new
wxCloseEvent
()
)
);
}
void
VLMPanel
::
OnLoad
(
wxCommandEvent
&
event
)
{
p_file_dialog
=
new
wxFileDialog
(
NULL
,
wxT
(
""
),
wxT
(
""
),
wxT
(
""
),
wxT
(
"*"
),
wxOPEN
|
wxMULTIPLE
);
if
(
p_file_dialog
==
NULL
)
return
;
p_file_dialog
->
SetTitle
(
wxU
(
_
(
"Load configuration"
)
)
);
if
(
p_file_dialog
->
ShowModal
()
==
wxID_OK
)
{
vlm_Load
(
p_vlm
->
GetVLM
(),
p_file_dialog
->
GetPath
().
mb_str
()
);
}
Update
();
}
void
VLMPanel
::
OnSave
(
wxCommandEvent
&
event
)
{
p_file_dialog
=
new
wxFileDialog
(
NULL
,
wxT
(
""
),
wxT
(
""
),
wxT
(
""
),
wxT
(
"*"
),
wxSAVE
|
wxOVERWRITE_PROMPT
);
if
(
p_file_dialog
==
NULL
)
return
;
p_file_dialog
->
SetTitle
(
wxU
(
_
(
"Save configuration"
)
)
);
if
(
p_file_dialog
->
ShowModal
()
==
wxID_OK
)
{
vlm_Save
(
p_vlm
->
GetVLM
(),
p_file_dialog
->
GetPath
().
mb_str
()
);
}
}
/*************************
/*************************
* Broadcasts management
* Broadcasts management
*************************/
*************************/
...
@@ -444,7 +490,6 @@ void VLMAddStreamPanel::OnChooseOutput( wxCommandEvent &event )
...
@@ -444,7 +490,6 @@ void VLMAddStreamPanel::OnChooseOutput( wxCommandEvent &event )
****************************************************************************/
****************************************************************************/
enum
enum
{
{
Close_Event
,
};
};
BEGIN_EVENT_TABLE
(
VLMFrame
,
wxFrame
)
BEGIN_EVENT_TABLE
(
VLMFrame
,
wxFrame
)
...
...
modules/gui/wxwidgets/dialogs/vlm/vlm_panel.hpp
View file @
237f16e4
...
@@ -74,7 +74,6 @@ namespace wxvlc
...
@@ -74,7 +74,6 @@ namespace wxvlc
OpenDialog
*
p_open_dialog
;
OpenDialog
*
p_open_dialog
;
SoutDialog
*
p_sout_dialog
;
SoutDialog
*
p_sout_dialog
;
wxFileDialog
*
p_file_dialog
;
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
};
};
...
@@ -95,9 +94,15 @@ namespace wxvlc
...
@@ -95,9 +94,15 @@ namespace wxvlc
private:
private:
VLMWrapper
*
p_vlm
;
VLMWrapper
*
p_vlm
;
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
wxWindow
*
p_parent
;
wxFileDialog
*
p_file_dialog
;
wxTimer
timer
;
wxTimer
timer
;
void
OnTimer
(
wxTimerEvent
&
);
void
OnTimer
(
wxTimerEvent
&
);
void
OnClose
(
wxCommandEvent
&
);
void
OnLoad
(
wxCommandEvent
&
);
void
OnSave
(
wxCommandEvent
&
);
/** Notebook */
/** Notebook */
wxNotebook
*
p_notebook
;
wxNotebook
*
p_notebook
;
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
...
@@ -136,10 +141,10 @@ namespace wxvlc
...
@@ -136,10 +141,10 @@ namespace wxvlc
virtual
~
VLMFrame
();
virtual
~
VLMFrame
();
void
Update
();
void
Update
();
void
OnClose
(
wxCloseEvent
&
);
private:
private:
VLMPanel
*
vlm_panel
;
VLMPanel
*
vlm_panel
;
DECLARE_EVENT_TABLE
();
DECLARE_EVENT_TABLE
();
void
OnClose
(
wxCloseEvent
&
);
};
};
/** This class is the edit dialog for a stream
/** This class is the edit dialog for a stream
...
...
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