Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
b81c1977
Commit
b81c1977
authored
Aug 25, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: implement a complete podcast UI (close #6017)
parent
4fdba87a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
618 additions
and
11 deletions
+618
-11
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+556
-10
modules/gui/macosx/MainWindow.h
modules/gui/macosx/MainWindow.h
+9
-0
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+53
-1
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
b81c1977
This diff is collapsed.
Click to expand it.
modules/gui/macosx/MainWindow.h
View file @
b81c1977
...
...
@@ -89,12 +89,19 @@
IBOutlet
id
o_podcast_view
;
IBOutlet
id
o_podcast_add_btn
;
IBOutlet
id
o_podcast_remove_btn
;
IBOutlet
id
o_podcast_subscribe_window
;
IBOutlet
id
o_podcast_subscribe_title_lbl
;
IBOutlet
id
o_podcast_subscribe_subtitle_lbl
;
IBOutlet
id
o_podcast_subscribe_url_fld
;
IBOutlet
id
o_podcast_subscribe_cancel_btn
;
IBOutlet
id
o_podcast_subscribe_ok_btn
;
IBOutlet
id
o_podcast_unsubscribe_window
;
IBOutlet
id
o_podcast_unsubscribe_title_lbl
;
IBOutlet
id
o_podcast_unsubscribe_subtitle_lbl
;
IBOutlet
id
o_podcast_unsubscribe_pop
;
IBOutlet
id
o_podcast_unsubscribe_ok_btn
;
IBOutlet
id
o_podcast_unsubscribe_cancel_btn
;
BOOL
b_dark_interface
;
BOOL
b_nativeFullscreenMode
;
...
...
@@ -177,6 +184,8 @@
-
(
IBAction
)
addPodcast
:(
id
)
sender
;
-
(
IBAction
)
addPodcastWindowAction
:(
id
)
sender
;
-
(
IBAction
)
removePodcast
:(
id
)
sender
;
-
(
IBAction
)
removePodcastWindowAction
:(
id
)
sender
;
-
(
void
)
setTitle
:(
NSString
*
)
title
;
-
(
void
)
customZoom
:(
id
)
sender
;
...
...
modules/gui/macosx/MainWindow.m
View file @
b81c1977
...
...
@@ -2900,6 +2900,59 @@ static VLCMainWindow *_o_sharedInstance = nil;
{
[
o_podcast_subscribe_window
orderOut
:
sender
];
[
NSApp
endSheet
:
o_podcast_subscribe_window
];
if
(
sender
==
o_podcast_subscribe_ok_btn
&&
[[
o_podcast_subscribe_url_fld
stringValue
]
length
]
>
0
)
{
NSMutableString
*
podcastConf
=
[[
NSMutableString
alloc
]
init
];
if
(
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)
!=
NULL
)
[
podcastConf
appendFormat
:
@"%s|"
,
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)];
[
podcastConf
appendString
:
[
o_podcast_subscribe_url_fld
stringValue
]];
config_PutPsz
(
VLCIntf
,
"podcast-urls"
,
[
podcastConf
UTF8String
]
);
vlc_object_t
*
p_obj
=
(
vlc_object_t
*
)
vlc_object_find_name
(
VLCIntf
->
p_libvlc
,
"podcast"
);
if
(
p_obj
)
{
var_SetString
(
p_obj
,
"podcast-urls"
,
[
podcastConf
UTF8String
]
);
vlc_object_release
(
p_obj
);
}
[
podcastConf
release
];
}
}
-
(
IBAction
)
removePodcast
:(
id
)
sender
{
if
(
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)
!=
NULL
)
{
[
o_podcast_unsubscribe_pop
removeAllItems
];
[
o_podcast_unsubscribe_pop
addItemsWithTitles
:[[
NSString
stringWithUTF8String
:
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)]
componentsSeparatedByString
:
@"|"
]];
[
NSApp
beginSheet
:
o_podcast_unsubscribe_window
modalForWindow
:
self
modalDelegate
:
self
didEndSelector
:
NULL
contextInfo
:
nil
];
}
}
-
(
IBAction
)
removePodcastWindowAction
:(
id
)
sender
{
[
o_podcast_unsubscribe_window
orderOut
:
sender
];
[
NSApp
endSheet
:
o_podcast_unsubscribe_window
];
if
(
sender
==
o_podcast_unsubscribe_ok_btn
)
{
NSMutableArray
*
urls
=
[[
NSMutableArray
alloc
]
initWithArray
:[[
NSString
stringWithUTF8String
:
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)]
componentsSeparatedByString
:
@"|"
]];
[
urls
removeObjectAtIndex
:
[
o_podcast_unsubscribe_pop
indexOfSelectedItem
]];
config_PutPsz
(
VLCIntf
,
"podcast-urls"
,
[[
urls
componentsJoinedByString
:
@"|"
]
UTF8String
]
);
[
urls
release
];
vlc_object_t
*
p_obj
=
(
vlc_object_t
*
)
vlc_object_find_name
(
VLCIntf
->
p_libvlc
,
"podcast"
);
if
(
p_obj
)
{
var_SetString
(
p_obj
,
"podcast-urls"
,
config_GetPsz
(
VLCIntf
,
"podcast-urls"
)
);
vlc_object_release
(
p_obj
);
}
/* reload the podcast module, since it won't update its list when removing podcasts */
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
if
(
playlist_IsServicesDiscoveryLoaded
(
p_playlist
,
"podcast{longname=
\"
Podcasts
\"
}"
)
)
{
playlist_ServicesDiscoveryRemove
(
p_playlist
,
"podcast{longname=
\"
Podcasts
\"
}"
);
playlist_ServicesDiscoveryAdd
(
p_playlist
,
"podcast{longname=
\"
Podcasts
\"
}"
);
[
o_playlist_table
reloadData
];
}
}
}
-
(
void
)
showPodcastControls
...
...
@@ -2918,7 +2971,6 @@ static VLCMainWindow *_o_sharedInstance = nil;
[
o_playlist_table
setNeedsDisplay
:
YES
];
[
o_right_split_view
addSubview
:
o_podcast_view
positioned
:
NSWindowAbove
relativeTo
:
o_right_split_view
];
[[
o_podcast_view
animator
]
setHidden
:
NO
];
b_podcastView_displayed
=
YES
;
}
...
...
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