]> git.cameronkatri.com Git - tweaks.git/commitdiff
Save all preferences when apply is pressed
authorCameron Katri <me@cameronkatri.com>
Thu, 30 Dec 2021 23:10:33 +0000 (18:10 -0500)
committerCameron Katri <me@cameronkatri.com>
Thu, 30 Dec 2021 23:10:33 +0000 (18:10 -0500)
QuickActions/QuickActionsPrefs/QASRootListController.m

index 0d26dc731b1309cd049d69923740f51e04500e91..7f62fe140f8d46dcad0f2aac646afd4eceb4bb01 100644 (file)
@@ -14,8 +14,8 @@
  * You should have received a copy of the GNU Affero General Public License
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
-#import "Preferences/PSTableCell.h"
 #import <Foundation/Foundation.h>
+#import <Preferences/PSSpecifier.h>
 #import "QASRootListController.h"
 #include <spawn.h>
 
@@ -48,6 +48,9 @@
 
 -(void)respring
 {
+       for (PSSpecifier *specifier in [self specifiers]) {
+               [self setPreferenceValue:[specifier propertyForKey:PSValueKey] specifier:specifier];
+       }
        pid_t pid;
        const char *args[] = {"sbreload", NULL, NULL, NULL};
        posix_spawn(&pid, "usr/bin/sbreload", NULL, NULL, (char *const *)args, NULL);