Mercurial > projects > dynamin
comparison dynamin/gui/x_folder_dialog.d @ 46:127b9d99c01c
Rename uses of 'directory' to 'folder' in method names and comments.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Thu, 30 Jul 2009 19:20:30 -0500 |
parents | 4eebc294a3ac |
children | 73060bc3f004 |
comparison
equal
deleted
inserted
replaced
45:4eebc294a3ac | 46:127b9d99c01c |
---|---|
34 string title = text ? text : "Select Folder"; | 34 string title = text ? text : "Select Folder"; |
35 auto dialog = gtk_file_chooser_dialog_new(toCharPtr(title), null, | 35 auto dialog = gtk_file_chooser_dialog_new(toCharPtr(title), null, |
36 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, | 36 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, |
37 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, | 37 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, |
38 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, null); | 38 GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, null); |
39 if(_directory) | 39 if(_folder) |
40 gtk_file_chooser_set_current_folder(dialog, toCharPtr(_directory)); | 40 gtk_file_chooser_set_current_folder(dialog, toCharPtr(_folder)); |
41 scope(exit) { | 41 scope(exit) { |
42 gtk_widget_destroy(dialog); | 42 gtk_widget_destroy(dialog); |
43 while(gtk_events_pending()) | 43 while(gtk_events_pending()) |
44 gtk_main_iteration(); | 44 gtk_main_iteration(); |
45 } | 45 } |
46 if(gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) { | 46 if(gtk_dialog_run(dialog) == GTK_RESPONSE_ACCEPT) { |
47 char* folder = gtk_file_chooser_get_filename(dialog); | 47 char* fold = gtk_file_chooser_get_filename(dialog); |
48 _directory = folder[0..strlen(folder)].dup; | 48 _folder = fold[0..strlen(fold)].dup; |
49 g_free(folder); | 49 g_free(fold); |
50 return DialogResult.OK; | 50 return DialogResult.OK; |
51 } | 51 } |
52 return DialogResult.Cancel; | 52 return DialogResult.Cancel; |
53 } | 53 } |
54 } | 54 } |