Diff of /trunk/src/misc.c

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

revision 195 by harbaum, Wed Jul 8 08:51:02 2009 UTC revision 200 by harbaum, Thu Jul 9 11:44:27 2009 UTC
# Line 221  static const gint dialog_sizes[][2] = { Line 221  static const gint dialog_sizes[][2] = {
221    { 800, 380 },  // LARGE    { 800, 380 },  // LARGE
222  #endif  #endif
223    { 640, 100 },  // WIDE    { 640, 100 },  // WIDE
224    {   0,   0 },  // HIGH    { 450, 480 },  // HIGH
225  };  };
226  #else  #else
227  static const gint dialog_sizes[][2] = {  static const gint dialog_sizes[][2] = {
# Line 229  static const gint dialog_sizes[][2] = { Line 229  static const gint dialog_sizes[][2] = {
229    { 400, 300 },  // MEDIUM    { 400, 300 },  // MEDIUM
230    { 500, 350 },  // LARGE    { 500, 350 },  // LARGE
231    { 450, 100 },  // WIDE    { 450, 100 },  // WIDE
232    {   0,   0 },  // HIGH    { 200, 350 },  // HIGH
233  };  };
234  #endif  #endif
235    
# Line 291  void misc_scrolled_window_add_with_viewp Line 291  void misc_scrolled_window_add_with_viewp
291    
292  #endif  #endif
293    
294    const char *misc_get_proxy_uri(settings_t *settings) {
295      static char proxy_buffer[64];
296    
297      /* use environment settings if preset */
298      const char *proxy = g_getenv("http_proxy");
299      if(proxy) return proxy;
300    
301      /* otherwise try settings */
302      if(!settings || !settings->proxy ||
303         !settings->proxy->host) return NULL;
304    
305      snprintf(proxy_buffer, sizeof(proxy_buffer),
306               "http://%s:%u", settings->proxy->host,
307               settings->proxy->port);
308      proxy_buffer[sizeof(proxy_buffer)-1] = 0;
309      return proxy_buffer;
310    }

Legend:
Removed from v.195  
changed lines
  Added in v.200