]> git.sesse.net Git - vlc/commitdiff
* re-designed the information/properties panel to show meta information and statistics
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 2 Mar 2006 15:52:37 +0000 (15:52 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 2 Mar 2006 15:52:37 +0000 (15:52 +0000)
- 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.

extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
modules/gui/macosx/playlistinfo.h
modules/gui/macosx/playlistinfo.m

index 08685836945ec5b4658b6fd5524feeb1f569ded0..6321a3c46cf96e027e7ad15986ede2f3a38fdfd7 100644 (file)
                 "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; 
index fba28c6f7af436afd4036def7a277a5936e07197..6af17b46c571db61b3128c2204a15eacf15d0ccb 100644 (file)
@@ -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>
        <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>
index 7b15b77db86a5b6e22c0fe3ff5f396a89784727a..59e378c3a04c40d74f0b750d24685b14c78ad667 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
index 23f21f9b7a5d3545411c0ed50893a540619c9e6c..f8d6583c681b53d62c673a7c042af708b145bfac 100644 (file)
     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
index aa164777a032870ac5c9644b5ec42a31549af163..a10a6b39c5b195039140ffc15de607044be3cbb5 100644 (file)
     [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
         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];