3282 GtkWidget *vbox_main, *vbox_loader, *vbox_dumper;
3285 GtkWidget *frame_pg, *import_list_frame, *export_list_frame, *frame_log;
3286 GtkWidget *button_pg_conn;
3289 GtkWidget *notebook;
3292 GtkWidget *loader_hbox_buttons, *loader_button_options, *loader_button_import, *loader_button_cancel, *loader_button_about;
3293 GtkWidget *dumper_hbox_buttons, *dumper_button_options, *dumper_button_export, *dumper_button_cancel, *dumper_button_about;
3296 GtkWidget *scrolledwindow_log;
3299 window_main = gtk_window_new(GTK_WINDOW_TOPLEVEL);
3300 gtk_container_set_border_width(GTK_CONTAINER(
window_main), 10);
3301 gtk_window_set_title(GTK_WINDOW(
window_main),
_(
"PostGIS Shapefile Import/Export Manager"));
3302 gtk_window_set_position(GTK_WINDOW(
window_main), GTK_WIN_POS_CENTER_ALWAYS);
3306 gtk_window_set_default_size(GTK_WINDOW(
window_main), 180, 500);
3315 frame_pg = gtk_frame_new(
_(
"PostGIS Connection"));
3318 button_pg_conn = gtk_button_new_with_label(
_(
"View connection details..."));
3320 gtk_container_set_border_width(GTK_CONTAINER(button_pg_conn), 10);
3321 gtk_container_add(GTK_CONTAINER(frame_pg), button_pg_conn);
3326 notebook = gtk_notebook_new();
3331 import_list_frame = gtk_frame_new(
_(
"Import List"));
3337 loader_hbox_buttons = gtk_hbox_new(
TRUE, 15);
3338 gtk_container_set_border_width (GTK_CONTAINER (loader_hbox_buttons), 0);
3341 loader_button_options = gtk_button_new_with_label(
_(
"Options..."));
3342 loader_button_import = gtk_button_new_with_label(
_(
"Import"));
3343 loader_button_cancel = gtk_button_new_with_label(
_(
"Cancel"));
3344 loader_button_about = gtk_button_new_with_label(
_(
"About"));
3347 g_signal_connect (G_OBJECT (loader_button_import),
"clicked", G_CALLBACK (
pgui_action_import), NULL);
3349 g_signal_connect (G_OBJECT (loader_button_cancel),
"clicked", G_CALLBACK (
pgui_action_cancel), NULL);
3353 gtk_box_pack_start(GTK_BOX(loader_hbox_buttons), loader_button_options,
TRUE,
TRUE, 0);
3354 gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_cancel,
TRUE,
TRUE, 0);
3355 gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_about,
TRUE,
TRUE, 0);
3356 gtk_box_pack_end(GTK_BOX(loader_hbox_buttons), loader_button_import,
TRUE,
TRUE, 0);
3361 export_list_frame = gtk_frame_new(
_(
"Export List"));
3367 dumper_hbox_buttons = gtk_hbox_new(
TRUE, 15);
3368 gtk_container_set_border_width (GTK_CONTAINER (dumper_hbox_buttons), 0);
3371 dumper_button_options = gtk_button_new_with_label(
_(
"Options..."));
3372 dumper_button_export = gtk_button_new_with_label(
_(
"Export"));
3373 dumper_button_cancel = gtk_button_new_with_label(
_(
"Cancel"));
3374 dumper_button_about = gtk_button_new_with_label(
_(
"About"));
3377 g_signal_connect (G_OBJECT (dumper_button_export),
"clicked", G_CALLBACK (
pgui_action_export), NULL);
3379 g_signal_connect (G_OBJECT (dumper_button_cancel),
"clicked", G_CALLBACK (
pgui_action_cancel), NULL);
3383 gtk_box_pack_start(GTK_BOX(dumper_hbox_buttons), dumper_button_options,
TRUE,
TRUE, 0);
3384 gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_cancel,
TRUE,
TRUE, 0);
3385 gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_about,
TRUE,
TRUE, 0);
3386 gtk_box_pack_end(GTK_BOX(dumper_hbox_buttons), dumper_button_export,
TRUE,
TRUE, 0);
3391 frame_log = gtk_frame_new(
_(
"Log Window"));
3392 gtk_container_set_border_width (GTK_CONTAINER (frame_log), 0);
3393 gtk_widget_set_size_request(frame_log, -1, 200);
3396 scrolledwindow_log = gtk_scrolled_window_new(NULL, NULL);
3397 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(scrolledwindow_log), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
3399 gtk_container_set_border_width (GTK_CONTAINER (
textview_log), 5);
3402 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(
textview_log), GTK_WRAP_WORD);
3403 gtk_container_add (GTK_CONTAINER (scrolledwindow_log),
textview_log);
3404 gtk_container_add (GTK_CONTAINER (frame_log), scrolledwindow_log);
3409 vbox_main = gtk_vbox_new(
FALSE, 10);
3410 gtk_container_set_border_width (GTK_CONTAINER (vbox_main), 0);
3413 vbox_loader = gtk_vbox_new(
FALSE, 10);
3414 gtk_container_set_border_width(GTK_CONTAINER(vbox_loader), 10);
3416 gtk_box_pack_start(GTK_BOX(vbox_loader), import_list_frame,
FALSE,
TRUE, 0);
3417 gtk_box_pack_start(GTK_BOX(vbox_loader), loader_hbox_buttons,
FALSE,
FALSE, 0);
3418 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_loader, gtk_label_new(
_(
"Import")));
3421 vbox_dumper = gtk_vbox_new(
FALSE, 10);
3422 gtk_container_set_border_width(GTK_CONTAINER(vbox_dumper), 10);
3424 gtk_box_pack_start(GTK_BOX(vbox_dumper), export_list_frame,
FALSE,
TRUE, 0);
3425 gtk_box_pack_start(GTK_BOX(vbox_dumper), dumper_hbox_buttons,
FALSE,
FALSE, 0);
3426 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), vbox_dumper, gtk_label_new(
_(
"Export")));
3429 gtk_box_pack_start(GTK_BOX(vbox_main), frame_pg,
FALSE,
TRUE, 0);
3430 gtk_box_pack_start(GTK_BOX(vbox_main), notebook,
FALSE,
TRUE, 0);
3431 gtk_box_pack_start(GTK_BOX(vbox_main), frame_log,
TRUE,
TRUE, 0);
3434 gtk_container_add(GTK_CONTAINER(
window_main), vbox_main);
static void pgui_action_connection_details(GtkWidget *widget, gpointer data)
static GtkTextBuffer * textbuffer_log
static void pgui_action_import(GtkWidget *widget, gpointer data)
static void pgui_action_export(GtkWidget *widget, gpointer data)
static void pgui_create_export_table_table(GtkWidget *export_list_frame)
static GtkWidget * textview_log
static void pgui_action_about_open()
static void pgui_action_loader_options_open(GtkWidget *widget, gpointer data)
static void pgui_quit(GtkWidget *widget, gpointer data)
static void pgui_action_dumper_options_open(GtkWidget *widget, gpointer data)
static GtkWidget * window_main
static void pgui_action_cancel(GtkWidget *widget, gpointer data)
static void pgui_create_import_file_table(GtkWidget *import_list_frame)