00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <gtk/gtk.h>
00024 #include <stdio.h>
00025
00026 #include "buf.h"
00027 #include "gui_common.h"
00028 #include "interface.h"
00029
00030 void query_import_dialog_hide(void)
00031 {
00032 if (queryImportDialog != NULL)
00033 gtk_widget_hide(GTK_WIDGET(queryImportDialog));
00034 }
00035
00036 GtkFileSelection *query_import_dialog_create() {
00037 ABuf *buf = buf_new(500);
00038
00039 if (queryImportDialog == NULL) {
00040 queryImportDialog = GTK_FILE_SELECTION(create_queryImportDlg());
00041
00042 buf_strcpy(buf, cfg_get_current_dir());
00043 buf_strcat(buf, "/*.sql");
00044 gtk_file_selection_set_filename(GTK_FILE_SELECTION(queryImportDialog), buf->b_dat);
00045 buf = buf_free(buf);
00046 }
00047 return queryImportDialog;
00048 }
00049
00050 void query_import_dialog_show(void)
00051 {
00052 query_import_dialog_create();
00053 gtk_widget_show(GTK_WIDGET(queryImportDialog));
00054 }