[vlc-commits] macosx/prefs widgets: cosmetics

Felix Paul Kühne git at videolan.org
Fri Jan 24 18:07:16 CET 2020


vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Jan 24 18:05:30 2020 +0100| [74b80c2fd06ea0f816193abc9cafd4c9f8336cf4] | committer: Felix Paul Kühne

macosx/prefs widgets: cosmetics

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

 modules/gui/macosx/preferences/prefs_widgets.m | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/modules/gui/macosx/preferences/prefs_widgets.m b/modules/gui/macosx/preferences/prefs_widgets.m
index 3ee0e77048..d256052579 100644
--- a/modules/gui/macosx/preferences/prefs_widgets.m
+++ b/modules/gui/macosx/preferences/prefs_widgets.m
@@ -40,6 +40,8 @@
 #include "extensions/NSString+Helpers.h"
 #include "preferences/prefs_widgets.h"
 
+NSString *VLCPrefsWidgetModuleDragType = @"VLC media player module";
+
 #define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 10)
 #define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 10)
 
@@ -896,11 +898,10 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
     return self.label.frame.size.width;
 }
 
-- (void) alignWithXPosition:(int)i_xPos;
+- (void)alignWithXPosition:(int)i_xPos
 {
-    /* FIXME: not implemented atm, but created to shut up the warning
-     * about "method definition not found" -- FK @ 7/24/05 */
 }
+
 @end
 
 @interface StringConfigControl()
@@ -2056,7 +2057,7 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
     [o_tableColumn setDataCell: o_dataCell];
     [o_tableColumn setWidth:s_rc.size.width - 34];
     [o_tableview addTableColumn: o_tableColumn];
-    [o_tableview registerForDraggedTypes:[NSArray arrayWithObject:@"VLC media player module"]];
+    [o_tableview registerForDraggedTypes:@[VLCPrefsWidgetModuleDragType]];
 
     [o_tableview setDataSource:self];
     [o_tableview setTarget: self];
@@ -2141,8 +2142,8 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
 
 - (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard
 {
-    [pboard declareTypes:@[@"VLC media player module"] owner:nil];
-    [pboard setPropertyList:@[@(rowIndexes.firstIndex)] forType:@"VLC media player module"];
+    [pboard declareTypes:@[VLCPrefsWidgetModuleDragType] owner:nil];
+    [pboard setPropertyList:@[@(rowIndexes.firstIndex)] forType:VLCPrefsWidgetModuleDragType];
     return YES;
 }
 
@@ -2175,7 +2176,7 @@ o_moduleenabled = [NSNumber numberWithBool:NO];\
 
     // Intra-table drag - data is the array of rows.
     if (!accepted && (array =
-                      [pb propertyListForType:@"VLC media player module"]) != NULL) {
+                      [pb propertyListForType:VLCPrefsWidgetModuleDragType]) != NULL) {
         NSEnumerator *iter = nil;
         id val;
         // Move the modules



More information about the vlc-commits mailing list