Commit cd15d404 authored by Felix Paul Kühne's avatar Felix Paul Kühne

* re-designed the information/properties panel to show meta information and statistics

- the display of meta information is completely implemented and functional
- the tree-view in the "Advanced Info" tab is currently broken due to bad casting (I got no idea why yet, because I didn't touch it..)
- the statistics tab isn't implemented yet

Comments on the design and the implementation are welcome. If this re-design is too unstable for 0.8.5, I will withdraw it after branching.
parent 082ff1ef
......@@ -114,8 +114,29 @@
"o_author_txt" = id;
"o_btn_cancel" = id;
"o_btn_ok" = id;
"o_collection_lbl" = id;
"o_collection_txt" = id;
"o_copyright_lbl" = id;
"o_copyright_txt" = id;
"o_date_lbl" = id;
"o_date_txt" = id;
"o_description_lbl" = id;
"o_description_txt" = id;
"o_genre_lbl" = id;
"o_genre_txt" = id;
"o_info_window" = id;
"o_language_lbl" = id;
"o_language_txt" = id;
"o_nowPlaying_lbl" = id;
"o_nowPlaying_txt" = id;
"o_outline_view" = id;
"o_publisher_lbl" = id;
"o_publisher_txt" = id;
"o_rating_lbl" = id;
"o_rating_txt" = id;
"o_seqNum_lbl" = id;
"o_seqNum_txt" = id;
"o_tab_view" = id;
"o_title_lbl" = id;
"o_title_txt" = id;
"o_uri_lbl" = id;
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>305 96 478 430 0 0 1440 878 </string>
<string>35 101 478 430 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
......@@ -21,12 +21,7 @@
<array/>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
<integer>1617</integer>
<integer>2416</integer>
<integer>984</integer>
<integer>915</integer>
<integer>2197</integer>
<integer>1789</integer>
</array>
<key>IBSystem Version</key>
<string>8H14</string>
......
......@@ -40,6 +40,29 @@
IBOutlet id o_btn_delete_group;
IBOutlet id o_btn_add_group;
IBOutlet id o_outline_view;
IBOutlet id o_tab_view;
IBOutlet id o_collection_lbl;
IBOutlet id o_collection_txt;
IBOutlet id o_copyright_lbl;
IBOutlet id o_copyright_txt;
IBOutlet id o_date_lbl;
IBOutlet id o_date_txt;
IBOutlet id o_description_lbl;
IBOutlet id o_description_txt;
IBOutlet id o_genre_lbl;
IBOutlet id o_genre_txt;
IBOutlet id o_language_lbl;
IBOutlet id o_language_txt;
IBOutlet id o_nowPlaying_lbl;
IBOutlet id o_nowPlaying_txt;
IBOutlet id o_publisher_lbl;
IBOutlet id o_publisher_txt;
IBOutlet id o_rating_lbl;
IBOutlet id o_rating_txt;
IBOutlet id o_seqNum_lbl;
IBOutlet id o_seqNum_txt;
playlist_item_t * p_item;
}
......@@ -52,6 +75,8 @@
- (playlist_item_t *)getItem;
- (BOOL)isItemInPlaylist:(playlist_item_t *)p_item;
- (void)setMeta: (char *)meta forLabel: (id)theItem;
@end
@interface VLCInfoTreeItem : NSObject
......
......@@ -56,6 +56,23 @@
[o_author_lbl setStringValue: _NS("Author")];
[o_btn_ok setTitle: _NS("OK")];
[o_btn_cancel setTitle: _NS("Cancel")];
[[o_tab_view tabViewItemAtIndex: 0] setLabel: _NS("General")];
[[o_tab_view tabViewItemAtIndex: 1] setLabel: _NS("Advanced Information")];
[[o_tab_view tabViewItemAtIndex: 2] setLabel: _NS("Statistics")];
[o_tab_view selectTabViewItemAtIndex: 0];
/* constants defined in vlc_meta.h */
[o_genre_lbl setStringValue: _NS(VLC_META_GENRE)];
[o_copyright_lbl setStringValue: _NS(VLC_META_COPYRIGHT)];
[o_collection_lbl setStringValue: _NS(VLC_META_COLLECTION)];
[o_seqNum_lbl setStringValue: _NS(VLC_META_SEQ_NUM)];
[o_description_lbl setStringValue: _NS(VLC_META_DESCRIPTION)];
[o_rating_lbl setStringValue: _NS(VLC_META_RATING)];
[o_date_lbl setStringValue: _NS(VLC_META_DATE)];
[o_language_lbl setStringValue: _NS(VLC_META_LANGUAGE)];
[o_nowPlaying_lbl setStringValue: _NS(VLC_META_NOW_PLAYING)];
[o_publisher_lbl setStringValue: _NS(VLC_META_PUBLISHER)];
}
- (IBAction)togglePlaylistInfoPanel:(id)sender
......@@ -123,12 +140,35 @@
free( psz_temp );
}
/* fill the other fields */
[self setMeta: VLC_META_GENRE forLabel: o_genre_txt];
[self setMeta: VLC_META_COPYRIGHT forLabel: o_copyright_txt];
[self setMeta: VLC_META_COLLECTION forLabel: o_collection_txt];
[self setMeta: VLC_META_SEQ_NUM forLabel: o_seqNum_txt];
[self setMeta: VLC_META_DESCRIPTION forLabel: o_description_txt];
[self setMeta: VLC_META_RATING forLabel: o_rating_txt];
[self setMeta: VLC_META_DATE forLabel: o_date_txt];
[self setMeta: VLC_META_LANGUAGE forLabel: o_language_txt];
[self setMeta: VLC_META_NOW_PLAYING forLabel: o_nowPlaying_txt];
[self setMeta: VLC_META_PUBLISHER forLabel: o_publisher_txt];
/* reload the advanced table */
[[VLCInfoTreeItem rootItem] refresh];
[o_outline_view reloadData];
[o_info_window makeKeyAndOrderFront: sender];
}
- (void)setMeta: (char *)meta forLabel: (id)theItem
{
char *psz_meta = vlc_input_item_GetInfo( &p_item->input, \
_(VLC_META_INFO_CAT), _(meta) );
if( psz_meta != NULL && *psz_meta)
[theItem setStringValue: [NSString stringWithUTF8String: psz_meta]];
else
[theItem setStringValue: @"-"];
}
- (IBAction)infoCancel:(id)sender
{
[o_info_window orderOut: self];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment