From: Steven Luo Date: Thu, 26 Aug 2010 01:18:28 +0000 (-0700) Subject: Remove continuous_mode config option from Fremantle UI X-Git-Tag: v3.3b2~20 X-Git-Url: http://git.maemo.org/git/?p=browser-switch;a=commitdiff_plain;h=074b02973ab2530b312ef04cbaced00ab7351e57 Remove continuous_mode config option from Fremantle UI Now that we force continuous_mode on for Fremantle, there's no point in having the setting exposed in the UI. Remove it. --- diff --git a/config-ui/browser-switchboard-cp.c b/config-ui/browser-switchboard-cp.c index 0c768e1..a08a063 100644 --- a/config-ui/browser-switchboard-cp.c +++ b/config-ui/browser-switchboard-cp.c @@ -77,7 +77,6 @@ struct swb_config orig_cfg; struct config_widgets { #if defined(HILDON) && defined(FREMANTLE) - GtkWidget *continuous_mode_selector; GtkWidget *default_browser_selector; #else GtkWidget *continuous_mode_off_radio; @@ -97,13 +96,6 @@ GtkWidget *dialog; #if defined(HILDON) && defined(FREMANTLE) -static inline int get_continuous_mode(void) { - return hildon_touch_selector_get_active(HILDON_TOUCH_SELECTOR(cw.continuous_mode_selector), 0); -} -static inline void set_continuous_mode(int state) { - hildon_touch_selector_set_active(HILDON_TOUCH_SELECTOR(cw.continuous_mode_selector), 0, state); -} - static inline char *get_default_browser(void) { return browsers[hildon_touch_selector_get_active(HILDON_TOUCH_SELECTOR(cw.default_browser_selector), 0)].config; } @@ -156,7 +148,9 @@ static void load_config(void) { swb_config_load(&orig_cfg); +#ifndef FREMANTLE set_continuous_mode(orig_cfg.continuous_mode); +#endif set_default_browser(orig_cfg.default_browser); if (orig_cfg.other_browser_cmd) set_other_browser_cmd(orig_cfg.other_browser_cmd); @@ -167,10 +161,12 @@ static void save_config(void) { swb_config_copy(&new_cfg, &orig_cfg); +#ifndef FREMANTLE if (get_continuous_mode() != orig_cfg.continuous_mode) { new_cfg.continuous_mode = get_continuous_mode(); new_cfg.flags |= SWB_CONFIG_CONTINUOUS_MODE_SET; } +#endif if (strcmp(get_default_browser(), orig_cfg.default_browser)) { new_cfg.default_browser = get_default_browser(); new_cfg.flags |= SWB_CONFIG_DEFAULT_BROWSER_SET; @@ -232,7 +228,6 @@ static GtkDialog *swb_config_dialog(gpointer cp_window) { GtkWidget *dialog_vbox; GtkWidget *default_browser_selector_button; - GtkWidget *continuous_mode_selector_button; int i; HildonGtkInputMode input_mode; @@ -281,20 +276,6 @@ static GtkDialog *swb_config_dialog(gpointer cp_window) { gtk_box_pack_start(GTK_BOX(dialog_vbox), cw.other_browser_cmd_entry_label, FALSE, FALSE, 0); - cw.continuous_mode_selector = hildon_touch_selector_new_text(); - hildon_touch_selector_append_text(HILDON_TOUCH_SELECTOR(cw.continuous_mode_selector), "Lower memory usage"); - hildon_touch_selector_append_text(HILDON_TOUCH_SELECTOR(cw.continuous_mode_selector), "Faster browser startup time"); - - continuous_mode_selector_button = hildon_picker_button_new(_HILDON_SIZE_DEFAULT, HILDON_BUTTON_ARRANGEMENT_VERTICAL); - hildon_button_set_title(HILDON_BUTTON(continuous_mode_selector_button), - "Optimize Browser Switchboard for:"); - hildon_picker_button_set_selector(HILDON_PICKER_BUTTON(continuous_mode_selector_button), HILDON_TOUCH_SELECTOR(cw.continuous_mode_selector)); - hildon_button_set_alignment(HILDON_BUTTON(continuous_mode_selector_button), - 0, 0, 0, 0); - set_continuous_mode(CONTINUOUS_MODE_DEFAULT); - gtk_box_pack_start(GTK_BOX(dialog_vbox), - continuous_mode_selector_button, FALSE, FALSE, 0); - gtk_widget_show_all(dialog); return GTK_DIALOG(dialog); }