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
122163a2
Commit
122163a2
authored
Mar 15, 2005
by
Anil Daoud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* display useful information in the tooltip
parent
66bf046e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
39 deletions
+71
-39
modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/interface.cpp
+24
-36
modules/gui/wxwindows/timer.cpp
modules/gui/wxwindows/timer.cpp
+25
-0
modules/gui/wxwindows/wxwindows.h
modules/gui/wxwindows/wxwindows.h
+22
-3
No files found.
modules/gui/wxwindows/interface.cpp
View file @
122163a2
...
@@ -101,27 +101,6 @@ BEGIN_EVENT_TABLE(wxVolCtrl, wxWindow)
...
@@ -101,27 +101,6 @@ BEGIN_EVENT_TABLE(wxVolCtrl, wxWindow)
EVT_MOTION
(
wxVolCtrl
::
OnChange
)
EVT_MOTION
(
wxVolCtrl
::
OnChange
)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
/* Systray integration */
#ifdef wxHAS_TASK_BAR_ICON
class
Systray
:
public
wxTaskBarIcon
{
public:
Systray
(
Interface
*
p_main_interface
);
virtual
~
Systray
()
{};
wxMenu
*
CreatePopupMenu
();
private:
void
OnLeftClick
(
wxTaskBarIconEvent
&
event
);
void
OnPlayStream
(
wxCommandEvent
&
event
);
void
OnStopStream
(
wxCommandEvent
&
event
);
void
OnPrevStream
(
wxCommandEvent
&
event
);
void
OnNextStream
(
wxCommandEvent
&
event
);
void
OnExit
(
wxCommandEvent
&
event
);
Interface
*
p_main_interface
;
DECLARE_EVENT_TABLE
()
};
#endif
/*****************************************************************************
/*****************************************************************************
* Event Table.
* Event Table.
*****************************************************************************/
*****************************************************************************/
...
@@ -228,20 +207,6 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
...
@@ -228,20 +207,6 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
END_EVENT_TABLE
()
END_EVENT_TABLE
()
#ifdef wxHAS_TASK_BAR_ICON
BEGIN_EVENT_TABLE
(
Systray
,
wxTaskBarIcon
)
/* Mouse events */
EVT_TASKBAR_LEFT_DOWN
(
Systray
::
OnLeftClick
)
/* Menu events */
EVT_MENU
(
Iconize_Event
,
Systray
::
OnLeftClick
)
EVT_MENU
(
Exit_Event
,
Systray
::
OnExit
)
EVT_MENU
(
PlayStream_Event
,
Systray
::
OnPlayStream
)
EVT_MENU
(
NextStream_Event
,
Systray
::
OnNextStream
)
EVT_MENU
(
PrevStream_Event
,
Systray
::
OnPrevStream
)
EVT_MENU
(
StopStream_Event
,
Systray
::
OnStopStream
)
END_EVENT_TABLE
()
#endif
/*****************************************************************************
/*****************************************************************************
* Constructor.
* Constructor.
*****************************************************************************/
*****************************************************************************/
...
@@ -1305,10 +1270,27 @@ void wxVolCtrl::UpdateVolume()
...
@@ -1305,10 +1270,27 @@ void wxVolCtrl::UpdateVolume()
}
}
/*****************************************************************************
/*****************************************************************************
*
Definition of
Systray class.
* Systray class.
*****************************************************************************/
*****************************************************************************/
#ifdef wxHAS_TASK_BAR_ICON
#ifdef wxHAS_TASK_BAR_ICON
BEGIN_EVENT_TABLE
(
Systray
,
wxTaskBarIcon
)
/* Mouse events */
#ifdef WIN32
EVT_TASKBAR_LEFT_DCLICK
(
Systray
::
OnLeftClick
)
#else
EVT_TASKBAR_LEFT_DOWN
(
Systray
::
OnLeftClick
)
#endif
/* Menu events */
EVT_MENU
(
Iconize_Event
,
Systray
::
OnLeftClick
)
EVT_MENU
(
Exit_Event
,
Systray
::
OnExit
)
EVT_MENU
(
PlayStream_Event
,
Systray
::
OnPlayStream
)
EVT_MENU
(
NextStream_Event
,
Systray
::
OnNextStream
)
EVT_MENU
(
PrevStream_Event
,
Systray
::
OnPrevStream
)
EVT_MENU
(
StopStream_Event
,
Systray
::
OnStopStream
)
END_EVENT_TABLE
()
Systray
::
Systray
(
Interface
*
_p_main_interface
)
Systray
::
Systray
(
Interface
*
_p_main_interface
)
{
{
p_main_interface
=
_p_main_interface
;
p_main_interface
=
_p_main_interface
;
...
@@ -1318,6 +1300,7 @@ Systray::Systray( Interface *_p_main_interface )
...
@@ -1318,6 +1300,7 @@ Systray::Systray( Interface *_p_main_interface )
void
Systray
::
OnLeftClick
(
wxTaskBarIconEvent
&
event
)
void
Systray
::
OnLeftClick
(
wxTaskBarIconEvent
&
event
)
{
{
p_main_interface
->
Show
(
!
p_main_interface
->
IsShown
()
);
p_main_interface
->
Show
(
!
p_main_interface
->
IsShown
()
);
if
(
p_main_interface
->
IsShown
()
)
p_main_interface
->
Raise
();
}
}
void
Systray
::
OnExit
(
wxCommandEvent
&
event
)
void
Systray
::
OnExit
(
wxCommandEvent
&
event
)
...
@@ -1359,5 +1342,10 @@ wxMenu* Systray::CreatePopupMenu()
...
@@ -1359,5 +1342,10 @@ wxMenu* Systray::CreatePopupMenu()
systray_menu
->
Append
(
Iconize_Event
,
wxU
(
_
(
"Show/Hide interface"
))
);
systray_menu
->
Append
(
Iconize_Event
,
wxU
(
_
(
"Show/Hide interface"
))
);
return
systray_menu
;
return
systray_menu
;
}
}
void
Systray
::
UpdateTooltip
(
const
wxChar
*
tooltip
)
{
SetIcon
(
wxIcon
(
vlc16x16_xpm
),
tooltip
);
}
#endif
#endif
modules/gui/wxwindows/timer.cpp
View file @
122163a2
...
@@ -137,6 +137,12 @@ void Timer::Notify()
...
@@ -137,6 +137,12 @@ void Timer::Notify()
wxU
(
p_intf
->
p_sys
->
p_input
->
input
.
p_item
->
psz_name
),
2
);
wxU
(
p_intf
->
p_sys
->
p_input
->
input
.
p_item
->
psz_name
),
2
);
p_main_interface
->
TogglePlayButton
(
PLAYING_S
);
p_main_interface
->
TogglePlayButton
(
PLAYING_S
);
#ifdef wxHAS_TASK_BAR_ICON
if
(
p_main_interface
->
p_systray
)
{
p_main_interface
->
p_systray
->
UpdateTooltip
(
wxU
(
p_intf
->
p_sys
->
p_input
->
input
.
p_item
->
psz_name
)
+
wxString
(
wxT
(
" - "
))
+
wxU
(
_
(
"Playing"
)));
}
#endif
i_old_playing_status
=
PLAYING_S
;
i_old_playing_status
=
PLAYING_S
;
}
}
}
}
...
@@ -161,6 +167,12 @@ void Timer::Notify()
...
@@ -161,6 +167,12 @@ void Timer::Notify()
p_main_interface
->
statusbar
->
SetStatusText
(
wxT
(
""
),
0
);
p_main_interface
->
statusbar
->
SetStatusText
(
wxT
(
""
),
0
);
p_main_interface
->
statusbar
->
SetStatusText
(
wxT
(
""
),
2
);
p_main_interface
->
statusbar
->
SetStatusText
(
wxT
(
""
),
2
);
#ifdef wxHAS_TASK_BAR_ICON
if
(
p_main_interface
->
p_systray
)
{
p_main_interface
->
p_systray
->
UpdateTooltip
(
wxString
(
wxT
(
"VLC media player - "
))
+
wxU
(
_
(
"Stopped"
))
);
}
#endif
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
;
}
}
...
@@ -347,6 +359,19 @@ void Timer::Notify()
...
@@ -347,6 +359,19 @@ void Timer::Notify()
{
{
p_main_interface
->
TogglePlayButton
(
PLAYING_S
);
p_main_interface
->
TogglePlayButton
(
PLAYING_S
);
}
}
#ifdef wxHAS_TASK_BAR_ICON
if
(
p_main_interface
->
p_systray
)
{
if
(
val
.
i_int
==
PAUSE_S
)
{
p_main_interface
->
p_systray
->
UpdateTooltip
(
wxU
(
p_intf
->
p_sys
->
p_input
->
input
.
p_item
->
psz_name
)
+
wxString
(
wxT
(
" - "
))
+
wxU
(
_
(
"Paused"
)));
}
else
{
p_main_interface
->
p_systray
->
UpdateTooltip
(
wxU
(
p_intf
->
p_sys
->
p_input
->
input
.
p_item
->
psz_name
)
+
wxString
(
wxT
(
" - "
))
+
wxU
(
_
(
"Playing"
)));
}
}
#endif
i_old_playing_status
=
val
.
i_int
;
i_old_playing_status
=
val
.
i_int
;
}
}
...
...
modules/gui/wxwindows/wxwindows.h
View file @
122163a2
...
@@ -93,9 +93,6 @@ class DialogsProvider;
...
@@ -93,9 +93,6 @@ class DialogsProvider;
class
PrefsTreeCtrl
;
class
PrefsTreeCtrl
;
class
AutoBuiltPanel
;
class
AutoBuiltPanel
;
class
VideoWindow
;
class
VideoWindow
;
#ifdef wxHAS_TASK_BAR_ICON
class
Systray
;
#endif
/*****************************************************************************
/*****************************************************************************
* intf_sys_t: description and status of wxwindows interface
* intf_sys_t: description and status of wxwindows interface
...
@@ -287,6 +284,28 @@ private:
...
@@ -287,6 +284,28 @@ private:
};
};
#endif
#endif
/* Systray integration */
#ifdef wxHAS_TASK_BAR_ICON
class
Systray
:
public
wxTaskBarIcon
{
public:
Systray
(
Interface
*
p_main_interface
);
virtual
~
Systray
()
{};
wxMenu
*
CreatePopupMenu
();
void
UpdateTooltip
(
const
wxChar
*
tooltip
);
private:
void
OnLeftClick
(
wxTaskBarIconEvent
&
event
);
void
OnPlayStream
(
wxCommandEvent
&
event
);
void
OnStopStream
(
wxCommandEvent
&
event
);
void
OnPrevStream
(
wxCommandEvent
&
event
);
void
OnNextStream
(
wxCommandEvent
&
event
);
void
OnExit
(
wxCommandEvent
&
event
);
Interface
*
p_main_interface
;
DECLARE_EVENT_TABLE
()
};
#endif
/* Main Interface */
/* Main Interface */
class
Interface
:
public
wxFrame
class
Interface
:
public
wxFrame
{
{
...
...
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