[vlc-commits] [Git][videolan/vlc][3.0.x] macosx: do not assign intValue to prevent formatting issues

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed Aug 2 12:16:20 UTC 2023



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
a10dfa55 by Marvin Scholz at 2023-08-01T13:46:33+02:00
macosx: do not assign intValue to prevent formatting issues

This is a temporary solution for #22576

It results in numbers not having thousands separator anymore, which
is better than the user being unable to save the desired value.

- - - - -


1 changed file:

- modules/gui/macosx/prefs_widgets.m


Changes:

=====================================
modules/gui/macosx/prefs_widgets.m
=====================================
@@ -1352,7 +1352,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
         ADD_TEXTFIELD(o_textfield, mainFrame, mainFrame.size.width - 19 - 52,
                       1, 49, toolTip, @"")
-        [o_textfield setIntValue: p_item->value.i];
+        [o_textfield setStringValue: @(p_item->value.i).stringValue];
         [o_textfield setDelegate: self];
         [[NSNotificationCenter defaultCenter] addObserver: self
                                                  selector: @selector(textfieldChanged:)
@@ -1382,12 +1382,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (IBAction)stepperChanged:(id)sender
 {
-    [o_textfield setIntValue: [o_stepper intValue]];
+    [o_textfield takeStringValueFrom:sender];
 }
 
 - (void)textfieldChanged:(NSNotification *)o_notification
 {
-    [o_stepper setIntValue: [o_textfield intValue]];
+    [o_stepper takeStringValueFrom:o_textfield];
 }
 
 - (int)intValue
@@ -1583,12 +1583,12 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
 
 - (IBAction)sliderChanged:(id)sender
 {
-    [o_textfield setIntValue: [o_slider intValue]];
+    [o_textfield takeStringValueFrom:o_slider];
 }
 
 - (void)textfieldChanged:(NSNotification *)o_notification
 {
-    [o_slider setIntValue: [o_textfield intValue]];
+    [o_slider takeStringValueFrom:o_textfield];
 }
 
 - (int)intValue



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a10dfa55be6627411c6bb6eb1a40be07b93ea98c

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a10dfa55be6627411c6bb6eb1a40be07b93ea98c
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list