[vlc-commits] macosx: update metadata in info panel if metadata changes

Felix Paul Kühne git at videolan.org
Sun Nov 23 21:19:45 CET 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Nov 23 21:18:57 2014 +0100| [75fe831c3acc3c1066bacf30e846bb5e438fee31] | committer: Felix Paul Kühne

macosx: update metadata in info panel if metadata changes

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

 modules/gui/macosx/intf.m         |    3 +++
 modules/gui/macosx/playlistinfo.h |    1 +
 modules/gui/macosx/playlistinfo.m |    8 ++++++++
 3 files changed, 12 insertions(+)

diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 2f85aef..9d10bd1 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1345,6 +1345,9 @@ static bool f_appExit = false;
 - (void)plItemUpdated
 {
     [o_mainwindow updateName];
+
+    if (o_info != NULL)
+        [o_info updateMetadata];
 }
 
 - (void)updateMainMenu
diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index 8deb36f..5574cf8 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -113,6 +113,7 @@
 - (void)initMediaPanelStats;
 - (void)updatePanelWithItem:(input_item_t *)_p_item;
 - (void)setMeta: (char *)meta forLabel: (id)theItem;
+- (void)updateMetadata;
 - (void)updateStatistics;
 
 + (VLCInfo *)sharedInstance;
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index bbf00ba..9ec4cf5 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -179,6 +179,14 @@ static VLCInfo *_o_sharedInstance = nil;
 
 }
 
+- (void)updateMetadata
+{
+    if (!p_item)
+        return;
+
+    [self updatePanelWithItem:p_item];
+}
+
 - (void)updatePanelWithItem:(input_item_t *)_p_item;
 {
     NSAutoreleasePool *o_pool = [[NSAutoreleasePool alloc] init];



More information about the vlc-commits mailing list