- (void)initPanel
{
- b_stats = config_GetInt(VLCIntf, "stats");
+ b_stats = var_InheritBool(VLCIntf, "stats");
if (!b_stats) {
if ([o_tab_view numberOfTabViewItems] > 2)
[o_tab_view removeTabViewItem: [o_tab_view tabViewItemAtIndex: 2]];
[o_image_well setImage: [NSImage imageNamed: @"noart.png"]];
} else {
if (!input_item_IsPreparsed(p_item))
- playlist_PreparseEnqueue(pl_Get(VLCIntf), p_item);
+ libvlc_MetaRequest(VLCIntf->p_libvlc, p_item);
/* fill uri info */
char * psz_url = decode_URI(input_item_GetURI(p_item));
- [o_uri_txt setStringValue: @(psz_url ? psz_url : "")];
+ [o_uri_txt setStringValue: [NSString stringWithUTF8String:psz_url ? psz_url : ""]];
free(psz_url);
/* fill title info */
char * psz_title = input_item_GetTitle(p_item);
if (!psz_title)
psz_title = input_item_GetName(p_item);
- [o_title_txt setStringValue: @(psz_title ? : "")];
+ [o_title_txt setStringValue: [NSString stringWithUTF8String:psz_title ? : ""]];
free(psz_title);
#define SET( foo, bar ) \
/* FIXME Can also be attachment:// */
if (psz_meta && strncmp(psz_meta, "attachment://", 13))
- o_image = [[NSImage alloc] initWithContentsOfURL: [NSURL URLWithString:@(psz_meta)]];
+ o_image = [[NSImage alloc] initWithContentsOfURL: [NSURL URLWithString:[NSString stringWithUTF8String:psz_meta]]];
else
o_image = [[NSImage imageNamed: @"noart.png"] retain];
[o_image_well setImage: o_image];
/* reload the advanced table */
[rootItem refresh];
[o_outline_view reloadData];
+ [o_outline_view expandItem:nil expandChildren:YES];
/* update the stats once to display p_item change faster */
[self updateStatistics];
- (void)setMeta: (char *)psz_meta forLabel: (id)theItem
{
if (psz_meta != NULL && *psz_meta)
- [theItem setStringValue: @(psz_meta)];
+ [theItem setStringValue: [NSString stringWithUTF8String:psz_meta]];
else
[theItem setStringValue: @""];
}
error:
NSRunAlertPanel(_NS("Error while saving meta"),
- _NS("VLC was unable to save the meta data."),
+ @"%@",_NS("VLC was unable to save the meta data."),
_NS("OK"), nil, nil);
}
- (IBAction)downloadCoverArt:(id)sender
{
playlist_t * p_playlist = pl_Get(VLCIntf);
- if (p_item) playlist_AskForArtEnqueue(p_playlist, p_item);
+ if (p_item) libvlc_ArtRequest(VLCIntf->p_libvlc, p_item);
}
- (input_item_t *)item
vlc_mutex_lock(&p_item->lock);
o_children = [[NSMutableArray alloc] initWithCapacity: p_item->i_categories];
for (int i = 0 ; i < p_item->i_categories ; i++) {
- NSString * name = @(p_item->pp_categories[i]->psz_name);
+ NSString * name = [NSString stringWithUTF8String:p_item->pp_categories[i]->psz_name];
VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc] initWithName:name value:@"" ID:i parent:self];
[item autorelease];
[o_children addObject:item];
info_category_t * cat = p_item->pp_categories[i_object_id];
o_children = [[NSMutableArray alloc] initWithCapacity: cat->i_infos];
for (int i = 0 ; i < cat->i_infos ; i++) {
- NSString * name = @(cat->pp_infos[i]->psz_name);
- NSString * value = @(cat->pp_infos[i]->psz_value ? : "");
+ NSString * name = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_name];
+ NSString * value = [NSString stringWithUTF8String:cat->pp_infos[i]->psz_value ? : ""];
VLCInfoTreeItem * item = [[VLCInfoTreeItem alloc] initWithName:name value:value ID:i parent:self];
[item autorelease];
[o_children addObject:item];