Only show cache preference if there is a cache
App and private mode never make use of the web cache.
This commit is contained in:
parent
5a0e6099c3
commit
5c08872db0
1 changed files with 15 additions and 7 deletions
|
@ -22,6 +22,11 @@
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
#include <libsoup/soup.h>
|
#include <libsoup/soup.h>
|
||||||
|
|
||||||
|
#if WEBKIT_CHECK_VERSION (1, 3, 11)
|
||||||
|
#define LIBSOUP_USE_UNSTABLE_REQUEST_API
|
||||||
|
#include <libsoup/soup-cache.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAVE_LIBNOTIFY
|
#if HAVE_LIBNOTIFY
|
||||||
#include <libnotify/notify.h>
|
#include <libnotify/notify.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -456,6 +461,8 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
|
midori_preferences_notify_proxy_type_cb (settings, NULL, entry);
|
||||||
#endif
|
#endif
|
||||||
#if WEBKIT_CHECK_VERSION (1, 3, 11)
|
#if WEBKIT_CHECK_VERSION (1, 3, 11)
|
||||||
|
if (soup_session_get_feature (webkit_get_default_session (), SOUP_TYPE_CACHE))
|
||||||
|
{
|
||||||
label = katze_property_label (settings, "maximum-cache-size");
|
label = katze_property_label (settings, "maximum-cache-size");
|
||||||
INDENTED_ADD (label);
|
INDENTED_ADD (label);
|
||||||
button = katze_property_proxy (settings, "maximum-cache-size", NULL);
|
button = katze_property_proxy (settings, "maximum-cache-size", NULL);
|
||||||
|
@ -463,6 +470,7 @@ midori_preferences_set_settings (MidoriPreferences* preferences,
|
||||||
label = gtk_label_new (_("MB"));
|
label = gtk_label_new (_("MB"));
|
||||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||||
SPANNED_ADD (label);
|
SPANNED_ADD (label);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
label = katze_property_label (settings, "identify-as");
|
label = katze_property_label (settings, "identify-as");
|
||||||
INDENTED_ADD (label);
|
INDENTED_ADD (label);
|
||||||
|
|
Loading…
Reference in a new issue