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
17e02520
Commit
17e02520
authored
Feb 13, 2003
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*ALL: update the title of the window everytime the stream changes.
parent
d75f0d6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
37 deletions
+56
-37
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+16
-1
modules/gui/macosx/vout.h
modules/gui/macosx/vout.h
+2
-1
modules/gui/macosx/vout.m
modules/gui/macosx/vout.m
+38
-35
No files found.
modules/gui/macosx/intf.m
View file @
17e02520
...
...
@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.5
5 2003/02/13 00:09:51
hartman Exp $
* $Id: intf.m,v 1.5
6 2003/02/13 02:00:56
hartman Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -552,6 +552,21 @@ int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
p_intf
->
p_sys
->
i_part
=
0
;
p_playlist
->
p_input
->
stream
.
b_changed
=
0
;
id
o_awindow
=
[
NSApp
keyWindow
];
NSArray
*
o_windows
=
[
NSApp
windows
];
NSEnumerator
*
o_enumerator
=
[
o_windows
objectEnumerator
];
while
((
o_awindow
=
[
o_enumerator
nextObject
]))
{
if
(
[[
o_awindow
className
]
isEqualToString
:
@"VLCWindow"
]
)
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
[
o_awindow
updateTitle
];
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
}
}
msg_Dbg
(
p_intf
,
"stream has changed, refreshing interface"
);
}
else
...
...
modules/gui/macosx/vout.h
View file @
17e02520
...
...
@@ -2,7 +2,7 @@
* vout.h: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: vout.h,v 1.
8 2003/02/08 21:43:2
6 hartman Exp $
* $Id: vout.h,v 1.
9 2003/02/13 02:00:5
6 hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
...
...
@@ -37,6 +37,7 @@
-
(
void
)
scaleWindowWithFactor
:
(
float
)
factor
;
-
(
void
)
toggleFullscreen
;
-
(
BOOL
)
isFullscreen
;
-
(
void
)
updateTitle
;
-
(
BOOL
)
windowShouldClose
:(
id
)
sender
;
...
...
modules/gui/macosx/vout.m
View file @
17e02520
...
...
@@ -2,7 +2,7 @@
* vout.m: MacOS X video output plugin
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: vout.m,v 1.3
1 2003/02/11 15:35:29
hartman Exp $
* $Id: vout.m,v 1.3
2 2003/02/13 02:00:56
hartman Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Florian G. Pflug <fgp@phlo.org>
...
...
@@ -800,6 +800,40 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
}
}
-
(
void
)
updateTitle
{
NSMutableString
*
o_title
;
intf_thread_t
*
p_intf
=
[
NSApp
getIntf
];
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
o_title
=
[
NSMutableString
stringWithUTF8String
:
p_playlist
->
pp_items
[
p_playlist
->
i_index
]
->
psz_name
];
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
if
(
o_title
)
{
NSRange
prefixrange
=
[
o_title
rangeOfString
:
@"file:"
];
if
(
prefixrange
.
location
!=
NSNotFound
)
[
o_title
deleteCharactersInRange
:
prefixrange
];
[
self
setTitleWithRepresentedFilename
:
o_title
];
}
else
{
[
self
setTitle
:
[
NSString
stringWithCString
:
VOUT_TITLE
" (QuickTime)"
]];
}
}
/* This is actually the same as VLCControls::stop. */
-
(
BOOL
)
windowShouldClose
:(
id
)
sender
{
...
...
@@ -930,12 +964,7 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
VLCView
*
o_view
;
NSScreen
*
o_screen
;
vout_thread_t
*
p_vout
;
NSMutableString
*
o_title
;
vlc_bool_t
b_main_screen
;
intf_thread_t
*
p_intf
=
[
NSApp
getIntf
];
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
p_vout
=
(
vout_thread_t
*
)[
o_value
pointerValue
];
...
...
@@ -1020,35 +1049,9 @@ static void QTFreePicture( vout_thread_t *p_vout, picture_t *p_pic )
[
o_view
lockFocus
];
p_vout
->
p_sys
->
p_qdport
=
[
o_view
qdPort
];
[
o_view
unlockFocus
];
if
(
p_playlist
==
NULL
)
{
return
;
}
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
o_title
=
[
NSMutableString
stringWithUTF8String
:
p_playlist
->
pp_items
[
p_playlist
->
i_index
]
->
psz_name
];
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
if
(
o_title
)
{
NSRange
prefixrange
=
[
o_title
rangeOfString
:
@"file:"
];
if
(
prefixrange
.
location
!=
NSNotFound
)
[
o_title
deleteCharactersInRange
:
prefixrange
];
[
p_vout
->
p_sys
->
o_window
setTitleWithRepresentedFilename
:
o_title
];
[
p_vout
->
p_sys
->
o_window
makeKeyAndOrderFront
:
nil
];
}
else
{
[
p_vout
->
p_sys
->
o_window
setTitle
:
[
NSString
stringWithCString
:
VOUT_TITLE
" (QuickTime)"
]];
[
p_vout
->
p_sys
->
o_window
makeKeyAndOrderFront
:
nil
];
}
[
p_vout
->
p_sys
->
o_window
updateTitle
];
[
p_vout
->
p_sys
->
o_window
makeKeyAndOrderFront
:
nil
];
}
-
(
void
)
destroyWindow
:(
NSValue
*
)
o_value
...
...
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