summaryrefslogtreecommitdiff
path: root/src/menu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/menu.cc')
-rw-r--r--src/menu.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/menu.cc b/src/menu.cc
index a1252989..865b843b 100644
--- a/src/menu.cc
+++ b/src/menu.cc
@@ -671,6 +671,19 @@ static void Menu_embedded_css_cb(Fl_Widget *wid, void*)
a_UIcmd_repush(popup_bw);
}
+
+/**
+ * Toggle use of force https mode
+ */
+static void Menu_force_https_cb(Fl_Widget *wid, void*)
+{
+ Fl_Menu_Item *item = (Fl_Menu_Item*) wid;
+
+ item->flags ^= FL_MENU_VALUE;
+ prefs.http_force_https = item->flags & FL_MENU_VALUE ? 1 : 0;
+ a_UIcmd_repush(popup_bw);
+}
+
static void Menu_panel_change_cb(Fl_Widget*, void *user_data)
{
UI *ui = (UI*)popup_bw->ui;
@@ -728,6 +741,8 @@ void a_Menu_tools_popup(BrowserWindow *bw, int x, int y)
FL_MENU_TOGGLE,0,0,0,0},
{"Load background images", 0, Menu_bgimg_load_toggle_cb, 0,
FL_MENU_TOGGLE|FL_MENU_DIVIDER,0,0,0,0},
+ {"Force HTTPS", 0, Menu_force_https_cb, 0,
+ FL_MENU_TOGGLE|FL_MENU_DIVIDER,0,0,0,0},
{"Panel size", 0, Menu_nop_cb, (void*)"Submenu1", FL_SUBMENU,0,0,0,0},
{"tiny", 0,Menu_panel_change_cb,(void*)0,FL_MENU_RADIO,0,0,0,0},
{"small", 0,Menu_panel_change_cb,(void*)1,FL_MENU_RADIO,0,0,0,0},
@@ -751,8 +766,10 @@ void a_Menu_tools_popup(BrowserWindow *bw, int x, int y)
pm[2].set();
if (prefs.load_background_images)
pm[3].set();
- pm[5+cur_panelsize].setonly();
- cur_smallicons ? pm[8].set() : pm[8].clear();
+ if (prefs.http_force_https)
+ pm[4].set();
+ pm[6+cur_panelsize].setonly();
+ cur_smallicons ? pm[9].set() : pm[9].clear();
item = pm->popup(x, y);
if (item) {