PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ pgui_action_connection_okay()

static void pgui_action_connection_okay ( GtkWidget *  widget,
gpointer  data 
)
static

Definition at line 2518 of file shp2pgsql-gui.c.

2519 {
2520  /* Update the configuration structure from the form */
2522 
2523  /* Make sure have a valid connection first */
2524  if (!pgui_validate_connection())
2525  {
2527  return;
2528  }
2529 
2530  if (!connection_test())
2531  {
2532  pgui_logf(_("Connection failed."));
2533 
2534  /* If the connection failed, display a warning before closing */
2535  pgui_seterr(_("Unable to connect to the database - please check your connection settings"));
2537  }
2538  else
2539  {
2540  pgui_logf(_("Connection succeeded."));
2541  }
2542 
2543 
2544  /* Hide the window after the test */
2545  gtk_widget_hide(GTK_WIDGET(window_conn));
2546 }
static void pgui_seterr(const char *fmt,...)
static void pgui_raise_error_dialogue(void)
static int pgui_validate_connection()
static int connection_test(void)
static void update_conn_config_from_conn_ui(void)
static GtkWidget * window_conn
Definition: shp2pgsql-gui.c:98
static void pgui_logf(const char *fmt,...)
#define _(String)
Definition: shpcommon.h:24

References _, connection_test(), pgui_logf(), pgui_raise_error_dialogue(), pgui_seterr(), pgui_validate_connection(), update_conn_config_from_conn_ui(), and window_conn.

Referenced by pgui_create_connection_window().

Here is the call graph for this function:
Here is the caller graph for this function: