Search
lxdream.org :: lxdream/src/gui/gui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/gui.c
changeset 167:71c0cc416a64
prev109:cc84a653c781
next275:005945dbb813
author nkeynes
date Mon Jun 19 11:00:42 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change Add config value retrieval for pathnames
Implement default path for disc + save state loaders
Dump disc ID when mounting a CD
file annotate diff log raw
1.1 --- a/src/gui/gui.c Wed Mar 15 13:17:23 2006 +0000
1.2 +++ b/src/gui/gui.c Mon Jun 19 11:00:42 2006 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: gui.c,v 1.11 2006-03-15 13:17:23 nkeynes Exp $
1.6 + * $Id: gui.c,v 1.12 2006-06-19 11:00:42 nkeynes Exp $
1.7 *
1.8 * Top-level GUI (GTK2) module.
1.9 *
1.10 @@ -166,10 +166,10 @@
1.11 }
1.12 }
1.13
1.14 -void open_file_dialog( char *title, file_callback_t action, char *pattern, char *patname )
1.15 +void open_file_dialog( char *title, file_callback_t action, char *pattern, char *patname,
1.16 + gchar const *initial_dir )
1.17 {
1.18 GtkWidget *file;
1.19 -
1.20 file = gtk_file_chooser_dialog_new( title, NULL,
1.21 GTK_FILE_CHOOSER_ACTION_OPEN,
1.22 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1.23 @@ -179,13 +179,14 @@
1.24 g_signal_connect( GTK_OBJECT(file), "response",
1.25 GTK_SIGNAL_FUNC(open_file_callback), file );
1.26 gtk_object_set_data( GTK_OBJECT(file), "file_action", action );
1.27 + gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(file), initial_dir );
1.28 gtk_widget_show( file );
1.29 }
1.30
1.31 -void save_file_dialog( char *title, file_callback_t action, char *pattern, char *patname )
1.32 +void save_file_dialog( char *title, file_callback_t action, char *pattern, char *patname,
1.33 + gchar const *initial_dir )
1.34 {
1.35 GtkWidget *file;
1.36 -
1.37 file = gtk_file_chooser_dialog_new( title, NULL,
1.38 GTK_FILE_CHOOSER_ACTION_SAVE,
1.39 GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
1.40 @@ -195,6 +196,7 @@
1.41 g_signal_connect( GTK_OBJECT(file), "response",
1.42 GTK_SIGNAL_FUNC(open_file_callback), file );
1.43 gtk_object_set_data( GTK_OBJECT(file), "file_action", action );
1.44 + gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(file), initial_dir );
1.45 gtk_widget_show( file );
1.46 }
1.47
.