sdl: improve upon last commit by actually opening cwd instead of selecting it in the parent folder. also do this for open palette dialog
This commit is contained in:
parent
2b3ddd9f59
commit
86124102b7
|
@ -153,6 +153,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));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1200,7 +1201,7 @@ void recordMovieAs ()
|
|||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(fileChooser), ".fm2");
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterFm2);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1242,7 +1243,7 @@ void loadMovie ()
|
|||
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterFm2);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1287,7 +1288,7 @@ void loadLua ()
|
|||
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterLua);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
|
@ -1339,7 +1340,7 @@ void loadFdsBios ()
|
|||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterDiskSys);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterRom);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1431,7 +1432,7 @@ void loadGameGenie ()
|
|||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterRom);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterNes);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1488,7 +1489,6 @@ void loadNSF ()
|
|||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterNSF);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterZip);
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterAll);
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), getcwd(NULL, 0));
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (fileChooser)) ==GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
|
@ -1627,7 +1627,7 @@ void saveStateAs()
|
|||
GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL);
|
||||
|
||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(fileChooser), last_dir);
|
||||
gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(fileChooser), last_dir);
|
||||
|
||||
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(fileChooser), ".sav");
|
||||
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(fileChooser), filterSav);
|
||||
|
|
Loading…
Reference in New Issue