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 1041:5fcc39857c5c
prev1036:af7b0c5905dd
next1043:ec716f2b8ffb
author nkeynes
date Fri Jun 26 05:47:04 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Refactor path operations into lxpaths.[ch]
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoa_ctrl.m Wed Jun 24 06:06:40 2009 +0000
1.2 +++ b/src/cocoaui/cocoa_ctrl.m Fri Jun 26 05:47:04 2009 +0000
1.3 @@ -18,6 +18,7 @@
1.4
1.5 #include "cocoaui.h"
1.6 #include "config.h"
1.7 +#include "lxpaths.h"
1.8 #include "display.h"
1.9 #include "maple/maple.h"
1.10 #include "vmu/vmulist.h"
1.11 @@ -596,14 +597,14 @@
1.12 NSOpenPanel *panel = [NSOpenPanel openPanel];
1.13 VMULoadValidator *valid = [[VMULoadValidator alloc] autorelease];
1.14 [panel setDelegate: valid];
1.15 - NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: gui_get_configurable_path(CONFIG_VMU_PATH)]
1.16 + NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: get_gui_path(CONFIG_VMU_PATH)]
1.17 file: nil types: array];
1.18 if( result == NSOKButton ) {
1.19 vmu_filename = [[panel filename] UTF8String];
1.20 int idx = vmulist_get_index_by_filename(vmu_filename);
1.21 [sender selectItemWithTag: (FIRST_VMU_TAG+idx)];
1.22 new_device_class = &vmu_class;
1.23 - gui_set_configurable_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.24 + set_gui_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.25 } else {
1.26 /* Cancelled - restore previous value */
1.27 setDevicePopupSelection( sender, current );
1.28 @@ -616,7 +617,7 @@
1.29 [panel setRequiredFileType: @"vmu"];
1.30 VMUCreateValidator *valid = [[VMUCreateValidator alloc] autorelease];
1.31 [panel setDelegate: valid];
1.32 - NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: gui_get_configurable_path(CONFIG_VMU_PATH)]
1.33 + NSInteger result = [panel runModalForDirectory: [NSString stringWithUTF8String: get_gui_path(CONFIG_VMU_PATH)]
1.34 file: nil];
1.35 if( result == NSFileHandlingPanelOKButton ) {
1.36 /* Validator has already created the file by now */
1.37 @@ -624,7 +625,7 @@
1.38 int idx = vmulist_get_index_by_filename(vmu_filename);
1.39 [sender selectItemWithTag: (FIRST_VMU_TAG+idx)];
1.40 new_device_class = &vmu_class;
1.41 - gui_set_configurable_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.42 + set_gui_path(CONFIG_VMU_PATH, [[panel directory] UTF8String]);
1.43 } else {
1.44 setDevicePopupSelection( sender, current );
1.45 return;
.