sdl: set default directory for palette and lua script file choosers (accepted patch from joe nahmias; thx!)

This commit is contained in:
punkrockguy318 2013-07-08 21:56:18 +00:00
parent 4acc21804e
commit 3c27962337
1 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,7 @@ void loadPalette (GtkWidget* w, gpointer p)
fileChooser = gtk_file_chooser_dialog_new ("Open NES Palette", GTK_WINDOW(MainWindow),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), "/usr/share/fceux/palettes");
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
{
@ -1521,6 +1521,7 @@ void loadLua ()
const char* last_file;
g_config->getOption("SDL.LastLoadLua", &last_file);
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), last_file);
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), "/usr/share/fceux/luaScripts");
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
{