}
else if (proxy_type == MIDORI_PROXY_HTTP)
{
- gchar* http_proxy = katze_object_get_string (settings, "http-proxy");
- midori_soup_session_set_proxy_uri (session, http_proxy);
- g_free (http_proxy);
+ gchar* proxy = katze_object_get_string (settings, "http-proxy");
+ GString *http_proxy = g_string_new (proxy);
+ g_string_append_printf (http_proxy, ":%d", katze_object_get_int (settings, "http-proxy-port"));
+ midori_soup_session_set_proxy_uri (session, http_proxy->str);
+ g_string_free (http_proxy, TRUE);
+ g_free (proxy);
}
else
midori_soup_session_set_proxy_uri (session, NULL);
g_signal_connect (settings, "notify::proxy-type",
G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry);
midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
+ label = katze_property_label (settings, "http-proxy-port");
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ INDENTED_ADD (label);
+ entry = katze_property_proxy (settings, "http-proxy-port", NULL);
+ SPANNED_ADD (entry);
+ g_signal_connect (settings, "notify::proxy-type",
+ G_CALLBACK (midori_preferences_notify_proxy_type_cb), entry);
+ midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
#endif
#if WEBKIT_CHECK_VERSION (1, 3, 11)
if (soup_session_get_feature (webkit_get_default_session (), SOUP_TYPE_CACHE))
gchar* news_aggregator;
gchar* location_entry_search;
gchar* http_proxy;
+ gint http_proxy_port;
#if WEBKIT_CHECK_VERSION (1, 3, 11)
gint maximum_cache_size;
#endif
PROP_PROXY_TYPE,
PROP_HTTP_PROXY,
+ PROP_HTTP_PROXY_PORT,
PROP_MAXIMUM_CACHE_SIZE,
PROP_IDENTIFY_AS,
PROP_USER_AGENT,
NULL,
flags));
+ /**
+ * MidoriWebSettings:http-proxy-port:
+ *
+ * The proxy server port used for HTTP connections
+ *
+ * Since: 0.4.2
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_HTTP_PROXY_PORT,
+ g_param_spec_int (
+ "http-proxy-port",
+ _("Port"),
+ _("The proxy server port used for HTTP connections"),
+ 1, 65535, 8080,
+ flags
+ ));
+
#if WEBKIT_CHECK_VERSION (1, 3, 11)
/**
* MidoriWebSettings:maximum-cache-size:
case PROP_HTTP_PROXY:
katze_assign (web_settings->http_proxy, g_value_dup_string (value));
break;
+ case PROP_HTTP_PROXY_PORT:
+ web_settings->http_proxy_port = g_value_get_int (value);
+ break;
#if WEBKIT_CHECK_VERSION (1, 3, 11)
case PROP_MAXIMUM_CACHE_SIZE:
web_settings->maximum_cache_size = g_value_get_int (value);
case PROP_HTTP_PROXY:
g_value_set_string (value, web_settings->http_proxy);
break;
+ case PROP_HTTP_PROXY_PORT:
+ g_value_set_int (value, web_settings->http_proxy_port);
+ break;
#if WEBKIT_CHECK_VERSION (1, 3, 11)
case PROP_MAXIMUM_CACHE_SIZE:
g_value_set_int (value, web_settings->maximum_cache_size);