1771 char *output_shapefile, *orig_shapefile;
1775 int ret, success =
FALSE, i = 0;
1781 pgui_seterr(
_(
"ERROR: You haven't specified any tables to export"));
1791 pgui_seterr(
_(
"Unable to connect to the database - please check your connection settings"));
1821 pgui_logf(
"\n==============================");
1822 pgui_logf(
"Exporting with configuration: %s, %s, %s", dumper_table_config->
table, dumper_table_config->
schema, dumper_table_config->
shp_file);
1829 gtk_widget_set_sensitive(widget,
FALSE);
1832 while (gtk_events_pending())
1833 gtk_main_iteration();
1840 orig_shapefile = dumper_table_config->
shp_file;
1841 output_shapefile =
malloc(strlen(folder_path) + strlen(dumper_table_config->
shp_file) + 2);
1842 strcpy(output_shapefile, folder_path);
1843 strcat(output_shapefile, G_DIR_SEPARATOR_S);
1844 strcat(output_shapefile, dumper_table_config->
shp_file);
1846 dumper_table_config->
shp_file = output_shapefile;
1855 goto export_cleanup;
1860 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(
progress), 0.0);
1875 goto export_cleanup;
1885 while (gtk_events_pending())
1886 gtk_main_iteration();
1905 goto export_cleanup;
1913 while (gtk_events_pending())
1914 gtk_main_iteration();
1942 dumper_table_config->
shp_file = orig_shapefile;
1956 gtk_widget_set_sensitive(widget,
TRUE);
1959 gtk_widget_hide(widget);
1960 gtk_widget_show(widget);
1966 while (gtk_events_pending())
1967 gtk_main_iteration();
static int connection_test(void)
int ShpDumperOpenTable(SHPDUMPERSTATE *state)
static void pgui_logf(const char *fmt,...)
int ShpLoaderGenerateShapeRow(SHPDUMPERSTATE *state)
SHPDUMPERSTATE * ShpDumperCreate(SHPDUMPERCONFIG *config)
int ShpDumperCloseTable(SHPDUMPERSTATE *state)
static GtkWidget * dialog_folderchooser
static GtkWidget * progress
static SHPCONNECTIONCONFIG * conn
static void pgui_seterr(const char *fmt,...)
SHPCONNECTIONCONFIG * conn
static volatile int is_running
#define GUIMSG_LINE_MAXLEN
void ShpDumperDestroy(SHPDUMPERSTATE *state)
int ShpDumperGetRecordCount(SHPDUMPERSTATE *state)
static void update_conn_ui_from_conn_config(void)
static GtkWidget * label_progress
GtkListStore * export_table_list_store
static GtkWidget * window_conn
static void pgui_raise_error_dialogue(void)
int ShpDumperConnectDatabase(SHPDUMPERSTATE *state)
static GtkWidget * dialog_progress
char message[SHPDUMPERMSGLEN]
char * shapetypename(int num)