PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ update_conn_config_from_conn_ui()

static void update_conn_config_from_conn_ui ( void  )
static

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

References shp_connection_state::database, entry_pg_db, entry_pg_host, entry_pg_pass, entry_pg_port, entry_pg_user, free(), shp_connection_state::host, shp_connection_state::password, shp_connection_state::port, and shp_connection_state::username.

Referenced by pgui_action_connection_okay().

2405 {
2406  const char *text;
2407 
2408  text = gtk_entry_get_text(GTK_ENTRY(entry_pg_user));
2409  if (conn->username)
2410  free(conn->username);
2411 
2412  if (strlen(text))
2413  conn->username = strdup(text);
2414  else
2415  conn->username = NULL;
2416 
2417  text = gtk_entry_get_text(GTK_ENTRY(entry_pg_pass));
2418  if (conn->password)
2419  free(conn->password);
2420 
2421  if (strlen(text))
2422  conn->password = strdup(text);
2423  else
2424  conn->password = NULL;
2425 
2426  text = gtk_entry_get_text(GTK_ENTRY(entry_pg_host));
2427  if (conn->host)
2428  free(conn->host);
2429 
2430  if (strlen(text))
2431  conn->host = strdup(text);
2432  else
2433  conn->host = NULL;
2434 
2435  text = gtk_entry_get_text(GTK_ENTRY(entry_pg_port));
2436  if (conn->port)
2437  free(conn->port);
2438 
2439  if (strlen(text))
2440  conn->port = strdup(text);
2441  else
2442  conn->port = NULL;
2443 
2444  text = gtk_entry_get_text(GTK_ENTRY(entry_pg_db));
2445  if (conn->database)
2446  free(conn->database);
2447 
2448  if (strlen(text))
2449  conn->database = strdup(text);
2450  else
2451  conn->database = NULL;
2452 
2453  return;
2454 }
static GtkWidget * entry_pg_db
static GtkWidget * entry_pg_host
static SHPCONNECTIONCONFIG * conn
static GtkWidget * entry_pg_port
static GtkWidget * entry_pg_user
void free(void *)
static GtkWidget * entry_pg_pass
Here is the call graph for this function:
Here is the caller graph for this function: