project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m
changeset 8426 4b66e60c9967
parent 6869 a187c280dd3d
child 8441 a00b0fa0dbd7
--- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Wed Jan 23 03:37:27 2013 +0100
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Wed Jan 23 04:42:18 2013 +0100
@@ -51,30 +51,14 @@
 #pragma mark -
 -(void) switchValueChanged:(id) sender {
     UISwitch *theSwitch = (UISwitch *)sender;
-    UISwitch *theOtherSwitch = nil;
     NSUserDefaults *settings = [NSUserDefaults standardUserDefaults];
 
     switch (theSwitch.tag) {
         case 10:    //soundSwitch
-            // setting this off will turn off also the switch below (music)
             [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"sound"];
-            [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
-            theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView;
-            [theOtherSwitch setOn:NO animated:YES];
-
-            // since switching sound on won't turn music on anyways, we can always turn off music
-            [[AudioManagerController mainManager]pauseBackgroundMusic];
-            [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
             break;
         case 20:    //musicSwitch
-            // if switch above (sound) is off, never turn on
-            if (NO == [[settings objectForKey:@"sound"] boolValue]) {
-                [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"];
-                theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView;
-                [theOtherSwitch setOn:NO animated:YES];
-            } else
-                [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"music"];
-
+            [settings setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"music"];
             if (theSwitch.on)
                 [[AudioManagerController mainManager] playBackgroundMusic];
             else
@@ -195,7 +179,7 @@
             
             switchContent = (UISwitch *)cell.accessoryView;
             if (row == 0) {
-                cell.textLabel.text = NSLocalizedString(@"Sound", @"from the settings table");
+                cell.textLabel.text = NSLocalizedString(@"Sound Effects", @"from the settings table");
                 switchContent.on = [[settings objectForKey:@"sound"] boolValue];
                 switchContent.tag = 10;
             } else {