Diff of /trunk/src/gconf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 129 by harbaum, Tue Sep 29 14:30:16 2009 UTC revision 158 by harbaum, Wed Nov 4 14:54:52 2009 UTC
# Line 132  char *gconf_restore_closed_name(appdata_ Line 132  char *gconf_restore_closed_name(appdata_
132  void gconf_save_state(appdata_t *appdata) {  void gconf_save_state(appdata_t *appdata) {
133    int entries = 0;    int entries = 0;
134    
135      /* free proxy settings */
136      if(appdata->proxy) {
137        proxy_t *proxy = appdata->proxy;
138    
139        if(proxy->authentication_password) g_free(proxy->authentication_password);
140        if(proxy->authentication_user)     g_free(proxy->authentication_user);
141        if(proxy->host)                    g_free(proxy->host);
142        if(proxy->ignore_hosts)            g_free(proxy->ignore_hosts);
143    
144        g_free(proxy);
145        appdata->proxy = NULL;
146      }
147    
148    gpx_t *gpx = appdata->gpx;    gpx_t *gpx = appdata->gpx;
149    while(gpx) {    while(gpx) {
150      char str[128];      char str[128];
# Line 207  void gconf_load_state(appdata_t *appdata Line 220  void gconf_load_state(appdata_t *appdata
220    appdata->manual_goto.lat = appdata->manual_goto.lon = NAN;    appdata->manual_goto.lat = appdata->manual_goto.lon = NAN;
221    appdata->gps.lat = appdata->gps.lon = NAN;    appdata->gps.lat = appdata->gps.lon = NAN;
222    
223      /* ------------- get proxy settings -------------------- */
224      if(gconf_client_get_bool(appdata->gconf_client,
225                               PROXY_KEY "use_http_proxy", NULL)) {
226        proxy_t *proxy = appdata->proxy = g_new0(proxy_t, 1);
227    
228        /* get basic settings */
229        proxy->host = gconf_client_get_string(appdata->gconf_client,
230                                              PROXY_KEY "host", NULL);
231        proxy->port = gconf_client_get_int(appdata->gconf_client,
232                                           PROXY_KEY "port", NULL);
233        proxy->ignore_hosts =
234          gconf_client_get_string(appdata->gconf_client,
235                                  PROXY_KEY "ignore_hosts", NULL);
236    
237        /* check for authentication */
238        proxy->use_authentication =
239          gconf_client_get_bool(appdata->gconf_client,
240                                PROXY_KEY "use_authentication", NULL);
241    
242        if(proxy->use_authentication) {
243          proxy->authentication_user =
244            gconf_client_get_string(appdata->gconf_client,
245                                    PROXY_KEY "authentication_user", NULL);
246          proxy->authentication_password =
247            gconf_client_get_string(appdata->gconf_client,
248                                    PROXY_KEY "authentication_password", NULL);
249        }
250      }
251    
252    int i, entries = gconf_client_get_int(appdata->gconf_client,    int i, entries = gconf_client_get_int(appdata->gconf_client,
253                                   GCONF_KEY_CNT, NULL);                                   GCONF_KEY_CNT, NULL);
254    

Legend:
Removed from v.129  
changed lines
  Added in v.158