3195 static int text_width = 12;
3204 GtkWidget *frame_pg, *table_pg;
3207 GtkWidget *button_okay;
3210 window_conn = gtk_window_new(GTK_WINDOW_TOPLEVEL);
3211 gtk_container_set_border_width(GTK_CONTAINER(
window_conn), 10);
3212 gtk_window_set_title(GTK_WINDOW(
window_conn),
_(
"PostGIS connection"));
3213 gtk_window_set_position(GTK_WINDOW(
window_conn), GTK_WIN_POS_CENTER);
3217 vbox = gtk_vbox_new(
FALSE, 15);
3222 frame_pg = gtk_frame_new(
_(
"PostGIS Connection"));
3223 table_pg = gtk_table_new(5, 3,
TRUE);
3224 gtk_container_set_border_width (GTK_CONTAINER (table_pg), 8);
3225 gtk_table_set_col_spacings(GTK_TABLE(table_pg), 7);
3226 gtk_table_set_row_spacings(GTK_TABLE(table_pg), 3);
3229 label = gtk_label_new(
_(
"Username:"));
3231 gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 0, 1 );
3232 gtk_table_attach_defaults(GTK_TABLE(table_pg),
entry_pg_user, 1, 3, 0, 1 );
3235 label = gtk_label_new(
_(
"Password:"));
3238 gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 1, 2 );
3239 gtk_table_attach_defaults(GTK_TABLE(table_pg),
entry_pg_pass, 1, 3, 1, 2 );
3242 label = gtk_label_new(
_(
"Server Host:"));
3244 gtk_entry_set_width_chars(GTK_ENTRY(
entry_pg_host), text_width);
3245 gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 2, 3 );
3246 gtk_table_attach_defaults(GTK_TABLE(table_pg),
entry_pg_host, 1, 2, 2, 3 );
3250 gtk_table_attach_defaults(GTK_TABLE(table_pg),
entry_pg_port, 2, 3, 2, 3 );
3253 label = gtk_label_new(
_(
"Database:"));
3255 gtk_table_attach_defaults(GTK_TABLE(table_pg), label, 0, 1, 3, 4 );
3256 gtk_table_attach_defaults(GTK_TABLE(table_pg),
entry_pg_db, 1, 3, 3, 4 );
3259 gtk_container_add(GTK_CONTAINER(frame_pg), table_pg);
3262 gtk_container_add(GTK_CONTAINER(
window_conn), vbox);
3265 gtk_container_add(GTK_CONTAINER(vbox), frame_pg);
3268 button_okay = gtk_button_new_with_label(
_(
"OK"));
3269 gtk_container_add(GTK_CONTAINER(vbox), button_okay);
static GtkWidget * entry_pg_db
static GtkWidget * entry_pg_host
static gint pgui_event_popup_delete(GtkWidget *widget, GdkEvent *event, gpointer data)
static GtkWidget * entry_pg_port
static void pgui_action_connection_okay(GtkWidget *widget, gpointer data)
static GtkWidget * entry_pg_user
static GtkWidget * window_conn
static GtkWidget * entry_pg_pass