]> spindle.queued.net Git - midori/commitdiff
Remove the proxy hack, it's not reliable at all
authorChristian Dywan <christian@twotoasts.de>
Sun, 5 Oct 2008 22:27:25 +0000 (00:27 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 5 Oct 2008 22:27:25 +0000 (00:27 +0200)
midori/midori-view.c
midori/midori-websettings.c

index 7873e237dffeddb15871522d6c9a145630a3700e..32181953f1c350aedb69576edbd2cafa3ca4855f 100644 (file)
@@ -77,7 +77,6 @@ struct _MidoriView
     gboolean middle_click_opens_selection;
     gboolean open_tabs_in_the_background;
     gboolean close_buttons_on_tabs;
-    gchar* http_proxy;
 
     GtkWidget* menu_item;
     GtkWidget* tab_label;
@@ -908,11 +907,6 @@ receive_command (MidoriView*  view,
     {
         view->open_tabs_in_the_background = atoi (&command[8]);
     }
-    else if (!strncmp (command, "proxy ", 6))
-    {
-        katze_assign (view->http_proxy, g_strdup (&command[6]));
-        g_setenv ("http_proxy", view->http_proxy ? view->http_proxy : "", TRUE);
-    }
     else if (g_str_has_prefix (command, "**"))
         g_print ("%s\n", command);
     else
@@ -1643,7 +1637,6 @@ midori_view_init (MidoriView* view)
     view->download_manager = NULL;
     view->default_font_family = NULL;
     view->default_encoding = NULL;
-    view->http_proxy = NULL;
 
     g_object_connect (view,
                       "signal::notify::uri",
@@ -1895,7 +1888,6 @@ _midori_view_update_settings (MidoriView* view)
         "close-buttons-on-tabs", &view->close_buttons_on_tabs,
         "middle-click-opens-selection", &view->middle_click_opens_selection,
         "open-tabs-in-the-background", &view->open_tabs_in_the_background,
-        "http-proxy", &view->http_proxy,
         NULL);
 
     if (midori_view_is_socket (view))
@@ -1915,7 +1907,6 @@ _midori_view_update_settings (MidoriView* view)
             int_to_str (view->middle_click_opens_selection));
         send_command (view, "tabsbkg",
             int_to_str (view->open_tabs_in_the_background));
-        send_command (view, "proxy", view->http_proxy);
     }
 }
 
@@ -2017,12 +2008,6 @@ midori_view_settings_notify_cb (MidoriWebSettings* settings,
             send_command (view, "tabsbkg",
                 int_to_str (view->open_tabs_in_the_background));
     }
-    else if (name == g_intern_string ("http-proxy"))
-    {
-        katze_assign (view->http_proxy, g_value_dup_string (&value));
-        if (midori_view_is_socket (view))
-            send_command (view, "proxy", view->http_proxy);
-    }
 
     g_value_unset (&value);
 }
index 4d234ebf0909bca8b23d8a291d2a4612d64b19c2..70613ed2833d1e01581b053991f7d8f5003bc4e7 100644 (file)
@@ -582,8 +582,8 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
                                      "http-proxy",
                                      _("HTTP Proxy"),
                                      _("The proxy used for HTTP connections"),
-                                     g_getenv ("http_proxy"),
-                                     flags));
+                                     NULL,
+                                     G_PARAM_READABLE));
 
     g_object_class_install_property (gobject_class,
                                      PROP_CACHE_SIZE,
@@ -622,6 +622,8 @@ notify_default_encoding_cb (GObject*    object,
 static void
 midori_web_settings_init (MidoriWebSettings* web_settings)
 {
+    web_settings->http_proxy = NULL;
+
     g_signal_connect (web_settings, "notify::default-encoding",
                       G_CALLBACK (notify_default_encoding_cb), NULL);
 }
@@ -779,7 +781,6 @@ midori_web_settings_set_property (GObject*      object,
 
     case PROP_HTTP_PROXY:
         katze_assign (web_settings->http_proxy, g_value_dup_string (value));
-        g_setenv ("http_proxy", web_settings->http_proxy ? web_settings->http_proxy : "", TRUE);
         break;
     case PROP_CACHE_SIZE:
         web_settings->cache_size = g_value_get_int (value);
@@ -988,7 +989,6 @@ midori_web_settings_copy (MidoriWebSettings* web_settings)
                   "remember-last-form-inputs", web_settings->remember_last_form_inputs,
                   "remember-last-downloaded-files", web_settings->remember_last_downloaded_files,
 
-                  "http-proxy", web_settings->http_proxy,
                   "cache-size", web_settings->cache_size,
                   NULL);