[vlc-commits] macosx/playlistinfo: simplify header and implementation

Felix Paul Kühne git at videolan.org
Fri Aug 24 18:34:26 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Fri Aug 24 17:52:53 2012 +0200| [b0df43f94d4950272a0717933b32122036ff08d7] | committer: Felix Paul Kühne

macosx/playlistinfo: simplify header and implementation

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b0df43f94d4950272a0717933b32122036ff08d7
---

 modules/gui/macosx/playlistinfo.h |    9 +++++----
 modules/gui/macosx/playlistinfo.m |   12 ++----------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index 3e742c3..b5d59c7 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -101,6 +101,7 @@
 
     BOOL b_awakeFromNib;
 }
+ at property (readonly) input_item_t * item;
 
 - (void)initPanel;
 
@@ -109,7 +110,6 @@
 - (IBAction)downloadCoverArt:(id)sender;
 - (void)initMediaPanelStats;
 - (void)updatePanelWithItem:(input_item_t *)_p_item;
-- (input_item_t *)item;
 - (void)setMeta: (char *)meta forLabel: (id)theItem;
 - (void)updateStatistics;
 
@@ -126,10 +126,11 @@
     NSMutableArray *o_children;
 }
 
-- (int)numberOfChildren;
+ at property (readonly) int numberOfChildren;
+ at property (readonly) NSString * name;
+ at property (readonly) NSString * value;
+
 - (VLCInfoTreeItem *)childAtIndex:(NSUInteger)i_index;
-- (NSString *)name;
-- (NSString *)value;
 - (void)refresh;
 
 @end
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 429abe5..3a7bcb6 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -425,6 +425,8 @@ error:
 
 @implementation VLCInfoTreeItem
 
+ at synthesize name = o_name, value = o_value;
+
 #define IsALeafNode ((id)-1)
 
 - (id)initWithName: (NSString *)o_item_name value: (NSString *)o_item_value ID: (int)i_id
@@ -504,16 +506,6 @@ error:
     return o_children;
 }
 
-- (NSString *)name
-{
-    return [[o_name retain] autorelease];
-}
-
-- (NSString *)value
-{
-    return [[o_value retain] autorelease];
-}
-
 - (void)refresh
 {
     input_item_t * oldItem = p_item;



More information about the vlc-commits mailing list