Branch data Line data Source code
1 : : /********************************************************************\
2 : : * dialog-file-access.c -- dialog for opening a file or making a *
3 : : * connection to a libdbi database *
4 : : * *
5 : : * Copyright (C) 2009 Phil Longstaff (plongstaff@rogers.com) *
6 : : * *
7 : : * This program is free software; you can redistribute it and/or *
8 : : * modify it under the terms of the GNU General Public License as *
9 : : * published by the Free Software Foundation; either version 2 of *
10 : : * the License, or (at your option) any later version. *
11 : : * *
12 : : * This program is distributed in the hope that it will be useful, *
13 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 : : * GNU General Public License for more details. *
16 : : * *
17 : : * You should have received a copy of the GNU General Public License*
18 : : * along with this program; if not, contact: *
19 : : * *
20 : : * Free Software Foundation Voice: +1-617-542-5942 *
21 : : * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
22 : : * Boston, MA 02110-1301, USA gnu@gnu.org *
23 : : \********************************************************************/
24 : :
25 : : #include <config.h>
26 : :
27 : : #include <gtk/gtk.h>
28 : : #include <glib/gi18n.h>
29 : :
30 : : #include "gnc-ui.h"
31 : : #include "gnc-ui-util.h"
32 : : #include "gnc-uri-utils.h"
33 : : #include "dialog-utils.h"
34 : : #include "dialog-file-access.h"
35 : : #include "gnc-file.h"
36 : : #include "gnc-plugin-file-history.h"
37 : : #include "gnc-session.h"
38 : :
39 : : static QofLogModule log_module = GNC_MOD_GUI;
40 : :
41 : : /* MariaDB/MySQL/Postgres optimize localhost to a unix socket but
42 : : * flatpak won't connect to unix sockets without gymnastics default to
43 : : * the localhost IP to force a network connection.
44 : : */
45 : : #define DEFAULT_HOST "127.0.0.1"
46 : : #define DEFAULT_DATABASE PROJECT_NAME
47 : : #define FILE_ACCESS_OPEN 0
48 : : #define FILE_ACCESS_SAVE_AS 1
49 : : #define FILE_ACCESS_EXPORT 2
50 : :
51 : : typedef struct FileAccessWindow
52 : : {
53 : : /* Parts of the dialog */
54 : : int type;
55 : :
56 : : GtkWidget *dialog;
57 : : GtkWidget *frame_file;
58 : : GtkWidget *frame_database;
59 : : GtkWidget *readonly_checkbutton;
60 : : GtkFileChooser *fileChooser;
61 : : gchar *starting_dir;
62 : : GtkComboBoxText *cb_uri_type;
63 : : GtkEntry *tf_host;
64 : : GtkEntry *tf_database;
65 : : GtkEntry *tf_username;
66 : : GtkEntry *tf_password;
67 : : GtkEntry *tf_port;
68 : : } FileAccessWindow;
69 : :
70 : : void gnc_ui_file_access_file_activated_cb( GtkFileChooser *chooser,
71 : : FileAccessWindow *faw );
72 : : void gnc_ui_file_access_response_cb( GtkDialog *, gint, GtkDialog * );
73 : : static void cb_uri_type_changed_cb( GtkComboBoxText* cb );
74 : : static void port_insert_text_cb( GtkEditable *editable, const gchar *text,
75 : : gint length, gint *position, gpointer data );
76 : :
77 : : static gchar*
78 : 0 : geturl( FileAccessWindow* faw )
79 : : {
80 : 0 : gchar* url = NULL;
81 : 0 : const gchar* host = NULL;
82 : 0 : const gchar* username = NULL;
83 : 0 : const gchar* password = NULL;
84 : : /* Not const as return value of gtk_combo_box_text_get_active_text must be freed */
85 : 0 : gchar* type = NULL;
86 : : /* Not const as return value of gtk_file_chooser_get_filename must be freed */
87 : 0 : gchar* path = NULL;
88 : 0 : gint32 port = 0;
89 : 0 : const gchar* port_text = NULL;
90 : :
91 : 0 : type = gtk_combo_box_text_get_active_text (faw->cb_uri_type);
92 : 0 : if (gnc_uri_is_file_scheme (type))
93 : : {
94 : 0 : path = gtk_file_chooser_get_filename (faw->fileChooser);
95 : 0 : if ( !path ) /* file protocol was chosen but no filename was set */
96 : : {
97 : 0 : g_free (type);
98 : 0 : return NULL;
99 : : }
100 : : }
101 : : else /* db protocol was chosen */
102 : : {
103 : 0 : host = gtk_entry_get_text( faw->tf_host );
104 : 0 : path = g_strdup(gtk_entry_get_text(faw->tf_database));
105 : 0 : username = gtk_entry_get_text( faw->tf_username );
106 : 0 : password = gtk_entry_get_text( faw->tf_password );
107 : : }
108 : :
109 : 0 : g_assert (faw->tf_port != NULL);
110 : 0 : port_text = gtk_entry_get_text (faw->tf_port);
111 : 0 : if (port_text && *port_text)
112 : 0 : port = atoi (port_text) & 0xffff;
113 : :
114 : 0 : url = gnc_uri_create_uri (type, host, port, username, password, path);
115 : :
116 : 0 : g_free (type);
117 : 0 : g_free (path);
118 : :
119 : 0 : return url;
120 : : }
121 : :
122 : : void
123 : 0 : gnc_ui_file_access_file_activated_cb( GtkFileChooser *chooser, FileAccessWindow *faw )
124 : : {
125 : 0 : g_return_if_fail( chooser != NULL );
126 : :
127 : 0 : gnc_ui_file_access_response_cb( GTK_DIALOG(faw->dialog), GTK_RESPONSE_OK, NULL );
128 : : }
129 : :
130 : : void
131 : 0 : gnc_ui_file_access_response_cb(GtkDialog *dialog, gint response, GtkDialog *unused)
132 : : {
133 : : FileAccessWindow* faw;
134 : : gchar* url;
135 : :
136 : 0 : g_return_if_fail( dialog != NULL );
137 : :
138 : 0 : faw = g_object_get_data( G_OBJECT(dialog), "FileAccessWindow" );
139 : 0 : g_return_if_fail( faw != NULL );
140 : :
141 : 0 : switch ( response )
142 : : {
143 : 0 : case GTK_RESPONSE_HELP:
144 : 0 : gnc_gnome_help (GTK_WINDOW(dialog), DF_MANUAL, DL_GLOBPREFS );
145 : 0 : break;
146 : :
147 : 0 : case GTK_RESPONSE_OK:
148 : 0 : url = geturl( faw );
149 : 0 : if ( url == NULL )
150 : : {
151 : 0 : return;
152 : : }
153 : 0 : if (g_str_has_prefix (url, "file://"))
154 : : {
155 : 0 : if ( g_file_test (gnc_uri_get_path (url), G_FILE_TEST_IS_DIR))
156 : : {
157 : 0 : gtk_file_chooser_set_current_folder_uri( faw->fileChooser, url );
158 : 0 : return;
159 : : }
160 : : }
161 : 0 : if ( faw->type == FILE_ACCESS_OPEN )
162 : : {
163 : 0 : gboolean open_readonly = faw->readonly_checkbutton
164 : 0 : ? gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(faw->readonly_checkbutton))
165 : 0 : : FALSE;
166 : 0 : gnc_file_open_file (GTK_WINDOW(dialog), url, open_readonly);
167 : : }
168 : 0 : else if ( faw->type == FILE_ACCESS_SAVE_AS )
169 : : {
170 : 0 : gnc_file_do_save_as (GTK_WINDOW(dialog), url);
171 : : }
172 : 0 : else if ( faw->type == FILE_ACCESS_EXPORT )
173 : : {
174 : 0 : gnc_file_do_export (GTK_WINDOW(dialog), url);
175 : : }
176 : 0 : break;
177 : :
178 : 0 : case GTK_RESPONSE_CANCEL:
179 : : case GTK_RESPONSE_DELETE_EVENT:
180 : 0 : break;
181 : :
182 : 0 : default:
183 : 0 : PERR( "Invalid response" );
184 : 0 : break;
185 : : }
186 : :
187 : 0 : if ( response != GTK_RESPONSE_HELP )
188 : : {
189 : 0 : gtk_widget_destroy( GTK_WIDGET(dialog) );
190 : : }
191 : : }
192 : :
193 : : /* Activate the file chooser and deactivate the db selection fields */
194 : : static void
195 : 0 : set_widget_sensitivity( FileAccessWindow* faw, gboolean is_file_based_uri )
196 : : {
197 : 0 : if (is_file_based_uri)
198 : : {
199 : 0 : gtk_widget_show(faw->frame_file);
200 : 0 : gtk_widget_hide(faw->frame_database);
201 : 0 : gtk_file_chooser_set_current_folder(faw->fileChooser, faw->starting_dir);
202 : : }
203 : : else
204 : : {
205 : 0 : gtk_widget_show(faw->frame_database);
206 : 0 : gtk_widget_hide(faw->frame_file);
207 : : }
208 : : // gtk_widget_set_sensitive( faw->frame_file, is_file_based_uri );
209 : : // gtk_widget_set_sensitive( faw->frame_database, !is_file_based_uri );
210 : 0 : }
211 : :
212 : : static void
213 : 0 : set_widget_sensitivity_for_uri_type( FileAccessWindow* faw, const gchar* uri_type )
214 : : {
215 : 0 : if ( strcmp( uri_type, "file" ) == 0 || strcmp( uri_type, "xml" ) == 0
216 : 0 : || strcmp( uri_type, "sqlite3" ) == 0 )
217 : : {
218 : 0 : set_widget_sensitivity( faw, /* is_file_based_uri */ TRUE );
219 : : }
220 : 0 : else if ( strcmp( uri_type, "mysql" ) == 0 || strcmp( uri_type, "postgres" ) == 0 )
221 : : {
222 : 0 : set_widget_sensitivity( faw, /* is_file_based_uri */ FALSE );
223 : 0 : gtk_entry_set_placeholder_text( faw->tf_port,
224 : 0 : strcmp( uri_type, "mysql" ) == 0 ? _("Default: 3306") : _("Default: 5432") );
225 : : }
226 : : else
227 : : {
228 : 0 : g_assert( FALSE );
229 : : }
230 : 0 : }
231 : :
232 : : static void
233 : 0 : port_insert_text_cb( GtkEditable *editable, const gchar *text, gint length,
234 : : gint *position, gpointer data )
235 : : {
236 : 0 : for ( gint i = 0; i < length; i++ )
237 : : {
238 : 0 : if ( !g_ascii_isdigit( text[i] ) )
239 : : {
240 : 0 : g_signal_stop_emission_by_name( G_OBJECT(editable), "insert-text" );
241 : 0 : return;
242 : : }
243 : : }
244 : : }
245 : :
246 : : static void
247 : 0 : cb_uri_type_changed_cb( GtkComboBoxText* cb )
248 : : {
249 : : GtkWidget* dialog;
250 : : FileAccessWindow* faw;
251 : : const gchar* type;
252 : :
253 : 0 : g_return_if_fail( cb != NULL );
254 : :
255 : 0 : dialog = gtk_widget_get_toplevel( GTK_WIDGET(cb) );
256 : 0 : g_return_if_fail( dialog != NULL );
257 : 0 : faw = g_object_get_data( G_OBJECT(dialog), "FileAccessWindow" );
258 : 0 : g_return_if_fail( faw != NULL );
259 : :
260 : 0 : type = gtk_combo_box_text_get_active_text( cb );
261 : 0 : set_widget_sensitivity_for_uri_type( faw, type );
262 : : }
263 : :
264 : : static const char*
265 : 0 : get_default_database( void )
266 : : {
267 : : const gchar* default_db;
268 : :
269 : 0 : default_db = g_getenv( "GNC_DEFAULT_DATABASE" );
270 : 0 : if ( default_db == NULL )
271 : : {
272 : 0 : default_db = DEFAULT_DATABASE;
273 : : }
274 : :
275 : 0 : return default_db;
276 : : }
277 : :
278 : 0 : static void free_file_access_window (FileAccessWindow *faw)
279 : : {
280 : 0 : g_free (faw->starting_dir);
281 : 0 : g_free (faw);
282 : 0 : }
283 : :
284 : : static void
285 : 0 : gnc_ui_file_access (GtkWindow *parent, int type)
286 : : {
287 : : FileAccessWindow *faw;
288 : : GtkBuilder* builder;
289 : : GtkButton* op;
290 : : GtkWidget* file_chooser;
291 : : GtkFileChooserWidget* fileChooser;
292 : 0 : GtkFileChooserAction fileChooserAction = GTK_FILE_CHOOSER_ACTION_OPEN;
293 : : GList* list;
294 : : GList* node;
295 : : GtkWidget* uri_type_container;
296 : 0 : gboolean need_access_method_file = FALSE;
297 : 0 : gboolean need_access_method_mysql = FALSE;
298 : 0 : gboolean need_access_method_postgres = FALSE;
299 : 0 : gboolean need_access_method_sqlite3 = FALSE;
300 : 0 : gboolean need_access_method_xml = FALSE;
301 : 0 : gint access_method_index = -1;
302 : 0 : gint active_access_method_index = -1;
303 : : const gchar* default_db;
304 : 0 : const gchar *button_label = NULL;
305 : 0 : const gchar *settings_section = NULL;
306 : : gchar *last;
307 : :
308 : 0 : g_return_if_fail( type == FILE_ACCESS_OPEN || type == FILE_ACCESS_SAVE_AS || type == FILE_ACCESS_EXPORT );
309 : :
310 : 0 : faw = g_new0(FileAccessWindow, 1);
311 : 0 : g_return_if_fail( faw != NULL );
312 : :
313 : 0 : faw->type = type;
314 : 0 : faw->starting_dir = NULL;
315 : :
316 : : /* Open the dialog */
317 : 0 : builder = gtk_builder_new();
318 : 0 : gnc_builder_add_from_file (builder, "dialog-file-access.glade", "file_access_dialog" );
319 : 0 : faw->dialog = GTK_WIDGET(gtk_builder_get_object (builder, "file_access_dialog" ));
320 : 0 : gtk_window_set_transient_for (GTK_WINDOW (faw->dialog), parent);
321 : 0 : g_object_set_data_full (G_OBJECT(faw->dialog), "FileAccessWindow", faw,
322 : : (GDestroyNotify)free_file_access_window);
323 : :
324 : : // Set the name for this dialog so it can be easily manipulated with css
325 : 0 : gtk_widget_set_name (GTK_WIDGET(faw->dialog), "gnc-id-file-access");
326 : :
327 : 0 : faw->frame_file = GTK_WIDGET(gtk_builder_get_object (builder, "frame_file" ));
328 : 0 : faw->frame_database = GTK_WIDGET(gtk_builder_get_object (builder, "frame_database" ));
329 : 0 : faw->readonly_checkbutton = GTK_WIDGET(gtk_builder_get_object (builder, "readonly_checkbutton"));
330 : 0 : faw->tf_host = GTK_ENTRY(gtk_builder_get_object (builder, "tf_host" ));
331 : 0 : gtk_entry_set_text( faw->tf_host, DEFAULT_HOST );
332 : 0 : faw->tf_database = GTK_ENTRY(gtk_builder_get_object (builder, "tf_database" ));
333 : 0 : default_db = get_default_database();
334 : 0 : gtk_entry_set_text( faw->tf_database, default_db );
335 : 0 : faw->tf_username = GTK_ENTRY(gtk_builder_get_object (builder, "tf_username" ));
336 : 0 : faw->tf_password = GTK_ENTRY(gtk_builder_get_object (builder, "tf_password" ));
337 : 0 : faw->tf_port = GTK_ENTRY(gtk_builder_get_object (builder, "tf_port" ));
338 : 0 : g_signal_connect( G_OBJECT(faw->tf_port), "insert-text",
339 : : G_CALLBACK(port_insert_text_cb), NULL );
340 : 0 : gtk_entry_set_max_length( faw->tf_port, 5 );
341 : :
342 : 0 : switch ( type )
343 : : {
344 : 0 : case FILE_ACCESS_OPEN:
345 : 0 : gtk_window_set_title(GTK_WINDOW(faw->dialog), _("Open…"));
346 : 0 : button_label = _("_Open");
347 : 0 : fileChooserAction = GTK_FILE_CHOOSER_ACTION_OPEN;
348 : 0 : settings_section = GNC_PREFS_GROUP_OPEN_SAVE;
349 : 0 : break;
350 : :
351 : 0 : case FILE_ACCESS_SAVE_AS:
352 : 0 : gtk_window_set_title(GTK_WINDOW(faw->dialog), _("Save As…"));
353 : 0 : button_label = _("_Save As");
354 : 0 : fileChooserAction = GTK_FILE_CHOOSER_ACTION_SAVE;
355 : 0 : settings_section = GNC_PREFS_GROUP_OPEN_SAVE;
356 : 0 : gtk_widget_destroy(faw->readonly_checkbutton);
357 : 0 : faw->readonly_checkbutton = NULL;
358 : 0 : break;
359 : :
360 : 0 : case FILE_ACCESS_EXPORT:
361 : 0 : gtk_window_set_title(GTK_WINDOW(faw->dialog), _("Export"));
362 : 0 : button_label = _("_Save As");
363 : 0 : fileChooserAction = GTK_FILE_CHOOSER_ACTION_SAVE;
364 : 0 : settings_section = GNC_PREFS_GROUP_EXPORT;
365 : 0 : gtk_widget_destroy(faw->readonly_checkbutton);
366 : 0 : faw->readonly_checkbutton = NULL;
367 : 0 : break;
368 : : }
369 : :
370 : 0 : op = GTK_BUTTON(gtk_builder_get_object (builder, "pb_op" ));
371 : 0 : if ( op != NULL )
372 : 0 : gtk_button_set_label( op, button_label );
373 : :
374 : 0 : file_chooser = GTK_WIDGET(gtk_builder_get_object (builder, "file_chooser" ));
375 : 0 : fileChooser = GTK_FILE_CHOOSER_WIDGET(gtk_file_chooser_widget_new( fileChooserAction ));
376 : 0 : faw->fileChooser = GTK_FILE_CHOOSER(fileChooser);
377 : 0 : gtk_box_pack_start( GTK_BOX(file_chooser), GTK_WIDGET(fileChooser), TRUE, TRUE, 6 );
378 : :
379 : 0 : gnc_file_chooser_add_filters (faw->fileChooser,
380 : : gnc_file_chooser_get_datafile_filters ());
381 : :
382 : : /* Set the default directory */
383 : 0 : if (type == FILE_ACCESS_OPEN || type == FILE_ACCESS_SAVE_AS)
384 : : {
385 : 0 : last = gnc_history_get_last();
386 : 0 : if ( last && *last && gnc_uri_targets_local_fs (last))
387 : : {
388 : 0 : gchar *filepath = gnc_uri_get_path ( last );
389 : 0 : faw->starting_dir = g_path_get_dirname( filepath );
390 : 0 : g_free ( filepath );
391 : : }
392 : 0 : g_free (last);
393 : : }
394 : 0 : if (!faw->starting_dir)
395 : 0 : faw->starting_dir = gnc_get_default_directory(settings_section);
396 : 0 : gtk_file_chooser_set_current_folder(faw->fileChooser, faw->starting_dir);
397 : :
398 : 0 : g_object_connect( G_OBJECT(faw->fileChooser), "signal::file-activated",
399 : : gnc_ui_file_access_file_activated_cb, faw, NULL );
400 : :
401 : 0 : uri_type_container = GTK_WIDGET(gtk_builder_get_object (builder, "vb_uri_type_container" ));
402 : 0 : faw->cb_uri_type = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
403 : 0 : gtk_container_add( GTK_CONTAINER(uri_type_container), GTK_WIDGET(faw->cb_uri_type) );
404 : 0 : gtk_box_set_child_packing( GTK_BOX(uri_type_container), GTK_WIDGET(faw->cb_uri_type),
405 : : /*expand*/TRUE, /*fill*/FALSE, /*padding*/0, GTK_PACK_START );
406 : 0 : g_object_connect( G_OBJECT(faw->cb_uri_type),
407 : : "signal::changed", cb_uri_type_changed_cb, NULL,
408 : : NULL );
409 : :
410 : : /* Autoconnect signals */
411 : 0 : gtk_builder_connect_signals_full (builder, gnc_builder_connect_full_func, faw);
412 : :
413 : : /* See what qof backends are available and add appropriate ones to the combo box */
414 : 0 : list = qof_backend_get_registered_access_method_list();
415 : 0 : for ( node = list; node != NULL; node = node->next )
416 : : {
417 : 0 : const gchar* access_method = node->data;
418 : :
419 : : /* For the different access methods, "mysql" and "postgres" are added if available. Access
420 : : methods "xml" and "sqlite3" are compressed to "file" if opening a file, but when saving a file,
421 : : both access methods are added. */
422 : 0 : if ( strcmp( access_method, "mysql" ) == 0 )
423 : : {
424 : 0 : need_access_method_mysql = TRUE;
425 : : }
426 : 0 : else if ( strcmp( access_method, "postgres" ) == 0 )
427 : : {
428 : 0 : need_access_method_postgres = TRUE;
429 : : }
430 : 0 : else if ( strcmp( access_method, "xml" ) == 0 )
431 : : {
432 : 0 : if ( type == FILE_ACCESS_OPEN )
433 : : {
434 : 0 : need_access_method_file = TRUE;
435 : : }
436 : : else
437 : : {
438 : 0 : need_access_method_xml = TRUE;
439 : : }
440 : : }
441 : 0 : else if ( strcmp( access_method, "sqlite3" ) == 0 )
442 : : {
443 : 0 : if ( type == FILE_ACCESS_OPEN )
444 : : {
445 : 0 : need_access_method_file = TRUE;
446 : : }
447 : : else
448 : : {
449 : 0 : need_access_method_sqlite3 = TRUE;
450 : : }
451 : : }
452 : : }
453 : 0 : g_list_free(list);
454 : :
455 : : /* Now that the set of access methods has been ascertained, add them to the list, and set the
456 : : default. */
457 : 0 : access_method_index = -1;
458 : 0 : if ( need_access_method_file )
459 : : {
460 : 0 : gtk_combo_box_text_append_text( faw->cb_uri_type, "file" );
461 : 0 : active_access_method_index = ++access_method_index;
462 : : }
463 : 0 : if ( need_access_method_mysql )
464 : : {
465 : 0 : gtk_combo_box_text_append_text( faw->cb_uri_type, "mysql" );
466 : 0 : ++access_method_index;
467 : : }
468 : 0 : if ( need_access_method_postgres )
469 : : {
470 : 0 : gtk_combo_box_text_append_text( faw->cb_uri_type, "postgres" );
471 : 0 : ++access_method_index;
472 : : }
473 : 0 : if ( need_access_method_sqlite3 )
474 : : {
475 : 0 : gtk_combo_box_text_append_text( faw->cb_uri_type, "sqlite3" );
476 : 0 : active_access_method_index = ++access_method_index;
477 : : }
478 : 0 : if ( need_access_method_xml )
479 : : {
480 : 0 : gtk_combo_box_text_append_text( faw->cb_uri_type, "xml" );
481 : 0 : ++access_method_index;
482 : :
483 : : // Set XML as default if it is offered (which mean we are in
484 : : // the "Save As" dialog)
485 : 0 : active_access_method_index = access_method_index;
486 : : }
487 : 0 : g_assert( active_access_method_index >= 0 );
488 : :
489 : 0 : g_object_unref(G_OBJECT(builder));
490 : :
491 : : /* Run the dialog */
492 : 0 : gtk_widget_show_all( faw->dialog );
493 : :
494 : : /* Hide the frame that's not required for the active access method so either only
495 : : * the File or only the Database frame are presented. */
496 : 0 : gtk_combo_box_set_active(GTK_COMBO_BOX(faw->cb_uri_type), active_access_method_index );
497 : 0 : set_widget_sensitivity_for_uri_type( faw, gtk_combo_box_text_get_active_text( faw->cb_uri_type ));
498 : : }
499 : :
500 : : void
501 : 0 : gnc_ui_file_access_for_open (GtkWindow *parent)
502 : : {
503 : 0 : gnc_ui_file_access (parent, FILE_ACCESS_OPEN);
504 : 0 : }
505 : :
506 : :
507 : : void
508 : 0 : gnc_ui_file_access_for_save_as (GtkWindow *parent)
509 : : {
510 : 0 : gnc_ui_file_access (parent, FILE_ACCESS_SAVE_AS);
511 : 0 : }
512 : :
513 : :
514 : : void
515 : 0 : gnc_ui_file_access_for_export (GtkWindow *parent)
516 : : {
517 : 0 : gnc_ui_file_access (parent, FILE_ACCESS_EXPORT);
518 : 0 : }
|