[vlc-devel] [PATCH] macosx: Update error alert on Metadata update failure
Marvin Scholz
epirat07 at gmail.com
Tue May 10 22:00:51 CEST 2016
This updates the Metadata update alert, which used the deprecated
NSRunAlertPanel function.
Removed the goto.
---
modules/gui/macosx/VLCPlaylistInfo.m | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/gui/macosx/VLCPlaylistInfo.m b/modules/gui/macosx/VLCPlaylistInfo.m
index e4f8213..1830769 100644
--- a/modules/gui/macosx/VLCPlaylistInfo.m
+++ b/modules/gui/macosx/VLCPlaylistInfo.m
@@ -352,8 +352,13 @@ - (IBAction)metaFieldChanged:(id)sender
- (IBAction)saveMetaData:(id)sender
{
- if (!p_item)
- goto error;
+ if (!p_item) {
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert setMessageText:_NS("Error while saving meta")];
+ [alert setInformativeText:_NS("VLC was unable to save the meta data.")];
+ [alert addButtonWithTitle:_NS("OK")];
+ [alert runModal];
+ }
#define utf8( _blub ) \
[[_blub stringValue] UTF8String]
@@ -377,12 +382,6 @@ - (IBAction)saveMetaData:(id)sender
[self updatePanelWithItem: p_item];
[_saveMetaDataButton setEnabled: NO];
- return;
-
-error:
- NSRunAlertPanel(_NS("Error while saving meta"), @"%@",
- _NS("OK"), nil, nil,
- _NS("VLC was unable to save the meta data."));
}
- (IBAction)downloadCoverArt:(id)sender
--
2.7.4 (Apple Git-66)
More information about the vlc-devel
mailing list