Search
lxdream.org :: lxdream/src/cocoaui/cocoa_ctrl.m :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoa_ctrl.m
changeset 1036:af7b0c5905dd
prev1034:7044e01148f0
next1041:5fcc39857c5c
author nkeynes
date Wed Jun 24 06:06:40 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Support shell substitutions in config paths
Keep track of last folder in file dialogs
Fix out-of-dateness in GTK path dialog
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoa_ctrl.m Wed Jun 24 02:41:12 2009 +0000
1.2 +++ b/src/cocoaui/cocoa_ctrl.m Wed Jun 24 06:06:40 2009 +0000
1.3 @@ -596,13 +596,14 @@
1.4 NSOpenPanel *panel = [NSOpenPanel openPanel];
1.5 VMULoadValidator *valid = [[VMULoadValidator alloc] autorelease];
1.6 [panel setDelegate: valid];
1.7 - NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: lxdream_get_config_value(CONFIG_VMU_PATH)]
1.8 + NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: gui_get_configurable_path(CONFIG_VMU_PATH)]
1.9 file: nil types: array];
1.10 if( result == NSOKButton ) {
1.11 vmu_filename = [[panel filename] UTF8String];
1.12 int idx = vmulist_get_index_by_filename(vmu_filename);
1.13 [sender selectItemWithTag: (FIRST_VMU_TAG+idx)];
1.14 new_device_class = &vmu_class;
1.15 + gui_set_configurable_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.16 } else {
1.17 /* Cancelled - restore previous value */
1.18 setDevicePopupSelection( sender, current );
1.19 @@ -615,7 +616,7 @@
1.20 [panel setRequiredFileType: @"vmu"];
1.21 VMUCreateValidator *valid = [[VMUCreateValidator alloc] autorelease];
1.22 [panel setDelegate: valid];
1.23 - NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: lxdream_get_config_value(CONFIG_VMU_PATH)]
1.24 + NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: gui_get_configurable_path(CONFIG_VMU_PATH)]
1.25 file: nil];
1.26 if( result == NSFileHandlingPanelOKButton ) {
1.27 /* Validator has already created the file by now */
1.28 @@ -623,6 +624,7 @@
1.29 int idx = vmulist_get_index_by_filename(vmu_filename);
1.30 [sender selectItemWithTag: (FIRST_VMU_TAG+idx)];
1.31 new_device_class = &vmu_class;
1.32 + gui_set_configurable_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.33 } else {
1.34 setDevicePopupSelection( sender, current );
1.35 return;
.