From a13f8b64b3658c6be248afe100b675e2eba8d4fe Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 6 Oct 2008 00:27:25 +0200 Subject: [PATCH] Remove the proxy hack, it's not reliable at all --- midori/midori-view.c | 15 --------------- midori/midori-websettings.c | 8 ++++---- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 7873e237..32181953 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -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); } diff --git a/midori/midori-websettings.c b/midori/midori-websettings.c index 4d234ebf..70613ed2 100644 --- a/midori/midori-websettings.c +++ b/midori/midori-websettings.c @@ -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);