From 3c279623370ae58e9f70defd2051840485d92df9 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Mon, 8 Jul 2013 21:56:18 +0000 Subject: [PATCH] sdl: set default directory for palette and lua script file choosers (accepted patch from joe nahmias; thx!) --- trunk/src/drivers/sdl/gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trunk/src/drivers/sdl/gui.cpp b/trunk/src/drivers/sdl/gui.cpp index 06438a1e..bf4070ee 100644 --- a/trunk/src/drivers/sdl/gui.cpp +++ b/trunk/src/drivers/sdl/gui.cpp @@ -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) {