PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ update_conn_config_from_conn_ui()

static void update_conn_config_from_conn_ui ( void  )
static

Definition at line 2403 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().

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