From f12be4ed854d9dd44fa6e3117fe8bd9525deae51 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 28 Dec 2012 01:08:23 +0000 Subject: restructure GTK frontend options dialog to be compiant with the gnome HIG and actually work --- gtk/dialogs/options.c | 362 +++--- gtk/res/options.gtk2.ui | 2911 +++++++++++++++++++++++------------------------ gtk/res/options.gtk3.ui | 2 +- 3 files changed, 1687 insertions(+), 1588 deletions(-) diff --git a/gtk/dialogs/options.c b/gtk/dialogs/options.c index a449e6fb9..8bd5665a3 100644 --- a/gtk/dialogs/options.c +++ b/gtk/dialogs/options.c @@ -46,8 +46,6 @@ static GtkBuilder *gladeFile; static struct browser_window *current_browser; -static int proxy_type; - static void dialog_response_handler (GtkDialog *dlg, gint res_id); static gboolean on_dialog_close (GtkDialog *dlg, gboolean stay_alive); static void nsgtk_options_theme_combo(void); @@ -66,30 +64,35 @@ DECLARE(checkDisablePlugins); DECLARE(spinHistoryAge); DECLARE(checkHoverURLs); DECLARE(checkDisplayRecentURLs); -DECLARE(comboLanguage); +//DECLARE(comboboxLanguage); +static GtkWidget *comboboxLanguage; +static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data); DECLARE(checkSendReferer); +DECLARE(checkSendDNT); DECLARE(comboProxyType); DECLARE(entryProxyHost); -DECLARE(entryProxyPort); +DECLARE(spinProxyPort); DECLARE(entryProxyUser); DECLARE(entryProxyPassword); DECLARE(spinMaxFetchers); DECLARE(spinFetchesPerHost); DECLARE(spinCachedConnections); +DECLARE(checkEnableJavascript); + DECLARE(checkResampleImages); DECLARE(spinAnimationSpeed); -DECLARE(checkDisableAnimations); +DECLARE(checkEnableAnimations); -DECLARE(fontSansSerif); -DECLARE(fontSerif); -DECLARE(fontMonospace); -DECLARE(fontCursive); -DECLARE(fontFantasy); +//DECLARE(fontSansSerif); +//DECLARE(fontSerif); +//DECLARE(fontMonospace); +//DECLARE(fontCursive); +//DECLARE(fontFantasy); DECLARE(comboDefault); DECLARE(spinDefaultSize); -DECLARE(spinMinimumSize); +//DECLARE(spinMinimumSize); DECLARE(fontPreview); DECLARE(comboButtonType); @@ -123,7 +126,7 @@ DECLARE(checkRemoveBackgrounds); DECLARE(checkFitPage); DECLARE(checkCompressPDF); DECLARE(checkPasswordPDF); -DECLARE(setDefaultExportOptions); +//DECLARE(setDefaultExportOptions); /* Used when the feature is not implemented yet */ #define FIND_WIDGET(wname) \ @@ -135,12 +138,22 @@ DECLARE(setDefaultExportOptions); /* Assigns widget and connects it to its callback function */ #define CONNECT(wname, event) \ + do { \ + if ((wname) == NULL) \ + LOG(("Unable to find widget '%s'!", #wname)); \ + else \ g_signal_connect(G_OBJECT(wname), event, \ - G_CALLBACK(on_##wname##_changed), NULL) + G_CALLBACK(on_##wname##_changed), NULL); \ + } while (0) -GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) +/* exported interface documented in gtk/dialogs/options.h */ +GtkDialog* +nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) { - GError* error = NULL; + GError *error = NULL; + GObject *dlgobject; + //GSList *group; + gladeFile = gtk_builder_new(); if (!gtk_builder_add_from_file(gladeFile, glade_file_location->options, &error)) { g_warning("Couldn't load builder file: %s", error->message); @@ -148,18 +161,25 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) return NULL; } + + dlgobject = gtk_builder_get_object(gladeFile, "dialogPreferences"); + if (dlgobject == NULL) { + LOG(("Unable to get object for preferences dialog")); + return NULL; + } + current_browser = bw; - wndPreferences = GTK_DIALOG(gtk_builder_get_object(gladeFile, "dlgPreferences")); + wndPreferences = GTK_DIALOG(dlgobject); gtk_window_set_transient_for(GTK_WINDOW(wndPreferences), parent); + + /* set the widgets to reflect the current options */ + nsgtk_options_load(); FIND_WIDGET(sourceButtonTab); FIND_WIDGET(sourceButtonWindow); - GSList *group = gtk_radio_button_get_group(GTK_RADIO_BUTTON( - sourceButtonWindow)); - gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group); + //group = gtk_radio_button_get_group(GTK_RADIO_BUTTON(sourceButtonWindow)); + //gtk_radio_button_set_group(GTK_RADIO_BUTTON(sourceButtonTab), group); - /* set the widgets to reflect the current options */ - nsgtk_options_load(); /* Connect all widgets to their appropriate callbacks */ CONNECT(entryHomePageURL, "focus-out-event"); @@ -172,33 +192,37 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) CONNECT(spinHistoryAge, "focus-out-event"); CONNECT(checkHoverURLs, "toggled"); - CONNECT(comboLanguage, "changed"); + CONNECT(comboboxLanguage, "changed"); CONNECT(checkDisplayRecentURLs, "toggled"); CONNECT(checkSendReferer, "toggled"); + CONNECT(checkSendDNT, "toggled"); CONNECT(checkShowSingleTab, "toggled"); CONNECT(comboProxyType, "changed"); CONNECT(entryProxyHost, "focus-out-event"); - CONNECT(entryProxyPort, "focus-out-event"); + CONNECT(spinProxyPort, "focus-out-event"); CONNECT(entryProxyUser, "focus-out-event"); CONNECT(entryProxyPassword, "focus-out-event"); CONNECT(spinMaxFetchers, "value-changed"); CONNECT(spinFetchesPerHost, "value-changed"); CONNECT(spinCachedConnections, "value-changed"); + CONNECT(checkEnableJavascript, "toggled"); + CONNECT(checkResampleImages, "toggled"); CONNECT(spinAnimationSpeed, "value-changed"); - CONNECT(checkDisableAnimations, "toggled"); + CONNECT(checkEnableAnimations, "toggled"); - CONNECT(fontSansSerif, "font-set"); +/* CONNECT(fontSansSerif, "font-set"); CONNECT(fontSerif, "font-set"); CONNECT(fontMonospace, "font-set"); CONNECT(fontCursive, "font-set"); CONNECT(fontFantasy, "font-set"); + CONNECT(spinMinimumSize, "value-changed"); +*/ CONNECT(comboDefault, "changed"); CONNECT(spinDefaultSize, "value-changed"); - CONNECT(spinMinimumSize, "value-changed"); CONNECT(fontPreview, "clicked"); CONNECT(comboButtonType, "changed"); @@ -231,7 +255,7 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) CONNECT(checkFitPage, "toggled"); CONNECT(checkCompressPDF, "toggled"); CONNECT(checkPasswordPDF, "toggled"); - CONNECT(setDefaultExportOptions, "clicked"); +// CONNECT(setDefaultExportOptions, "clicked"); g_signal_connect(G_OBJECT(wndPreferences), "response", G_CALLBACK (dialog_response_handler), NULL); @@ -291,53 +315,122 @@ GtkDialog* nsgtk_options_init(struct browser_window *bw, GtkWindow *parent) (widget) = GTK_WIDGET(gtk_builder_get_object(gladeFile, #widget)); \ } while (0) +static void set_proxy_widgets_sensitivity(int proxyval) +{ + switch (proxyval) { + case 0: /* no proxy */ + gtk_widget_set_sensitive(entryProxyHost, FALSE); + gtk_widget_set_sensitive(spinProxyPort, FALSE); + gtk_widget_set_sensitive(entryProxyUser, FALSE); + gtk_widget_set_sensitive(entryProxyPassword, FALSE); + break; + + case 1: /* proxy with no auth */ + gtk_widget_set_sensitive(entryProxyHost, TRUE); + gtk_widget_set_sensitive(spinProxyPort, TRUE); + gtk_widget_set_sensitive(entryProxyUser, FALSE); + gtk_widget_set_sensitive(entryProxyPassword, FALSE); + break; + + case 2: /* proxy with basic auth */ + gtk_widget_set_sensitive(entryProxyHost, TRUE); + gtk_widget_set_sensitive(spinProxyPort, TRUE); + gtk_widget_set_sensitive(entryProxyUser, TRUE); + gtk_widget_set_sensitive(entryProxyPassword, TRUE); + break; + + case 3: /* proxy with ntlm auth */ + gtk_widget_set_sensitive(entryProxyHost, TRUE); + gtk_widget_set_sensitive(spinProxyPort, TRUE); + gtk_widget_set_sensitive(entryProxyUser, TRUE); + gtk_widget_set_sensitive(entryProxyPassword, TRUE); + break; + + case 4: /* system proxy */ + gtk_widget_set_sensitive(entryProxyHost, FALSE); + gtk_widget_set_sensitive(spinProxyPort, FALSE); + gtk_widget_set_sensitive(entryProxyUser, FALSE); + gtk_widget_set_sensitive(entryProxyPassword, FALSE); + break; + + } +} void nsgtk_options_load(void) { - GtkBox *box; const char *default_accept_language = "en"; const char *default_homepage_url = ""; - const char *default_http_proxy_host = ""; - const char *default_http_proxy_auth_user = ""; - const char *default_http_proxy_auth_pass = ""; - int combo_row_count = 0; + const char *default_http_proxy_host; + const char *default_http_proxy_auth_user; + const char *default_http_proxy_auth_pass; + int active_language = 0; + GtkListStore *liststore; + GtkTreeIter iter; + int proxytype = 0; FILE *fp; char buf[50]; - /* get widget text */ - if (nsoption_charp(accept_language) != NULL) { - default_accept_language = nsoption_charp(accept_language); - } + /* Network - HTTP Proxy */ + default_http_proxy_host = nsoption_charp(http_proxy_host); + default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user); + default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass); - if (nsoption_charp(homepage_url) != NULL) { - default_homepage_url = nsoption_charp(homepage_url); + if (nsoption_bool(http_proxy) == true) { + /* proxy type combo box starts with disabled, to allow + * for this the http_proxy option needs combining with + * the http_proxy_auth option + */ + proxytype = nsoption_int(http_proxy_auth) + 1; + if (default_http_proxy_host == NULL) { + /* set to use a proxy without a host, turn proxy off */ + proxytype = 0; + } else if (((proxytype == 2) || + (proxytype == 3)) && + ((default_http_proxy_auth_user == NULL) || + (default_http_proxy_auth_pass == NULL))) { + /* authentication selected with empty credentials, turn proxy off */ + proxytype = 0; + } } - if (nsoption_charp(http_proxy_host) != NULL) { - default_http_proxy_host = nsoption_charp(http_proxy_host); + if (default_http_proxy_host == NULL) { + default_http_proxy_host = ""; } - if (nsoption_charp(http_proxy_auth_user) != NULL) { - default_http_proxy_auth_user = nsoption_charp(http_proxy_auth_user); + if (default_http_proxy_auth_user == NULL) { + default_http_proxy_auth_user = ""; } - if (nsoption_charp(http_proxy_auth_pass) != NULL) { - default_http_proxy_auth_pass = nsoption_charp(http_proxy_auth_pass); + if (default_http_proxy_auth_pass == NULL) { + default_http_proxy_auth_pass = ""; } - if (nsoption_bool(http_proxy) == true) { - proxytype = nsoption_int(http_proxy_auth) + 1; - } + SET_COMBO(comboProxyType, proxytype); + SET_ENTRY(entryProxyHost, default_http_proxy_host); + SET_SPIN(spinProxyPort, nsoption_int(http_proxy_port)); + SET_ENTRY(entryProxyUser, default_http_proxy_auth_user); + SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass); - /* Create combobox */ - box = GTK_BOX(gtk_builder_get_object(gladeFile, "combolanguagevbox")); - comboLanguage = nsgtk_combo_box_text_new(); + set_proxy_widgets_sensitivity(proxytype); - /* Populate combobox from languages file */ - if ((languages_file_location != NULL) && + + /* accept language selection */ + if (nsoption_charp(accept_language) != NULL) { + default_accept_language = nsoption_charp(accept_language); + } + + /* Fill content language list store */ + liststore = GTK_LIST_STORE(gtk_builder_get_object(gladeFile, "liststore_content_language")); + if ((liststore != NULL) && + (languages_file_location != NULL) && ((fp = fopen(languages_file_location, "r")) != NULL)) { + int combo_row_count = 0; + + gtk_list_store_clear(liststore); + active_language = -1; + LOG(("Used %s for languages", languages_file_location)); while (fgets(buf, sizeof(buf), fp)) { /* Ignore blank lines */ @@ -347,34 +440,44 @@ void nsgtk_options_load(void) /* Remove trailing \n */ buf[strlen(buf) - 1] = '\0'; - nsgtk_combo_box_text_append_text(comboLanguage, buf); + gtk_list_store_append(liststore, &iter); + gtk_list_store_set(liststore, &iter, 0, buf, -1 ); - if (strcmp(buf, default_accept_language) == 0) + if (strcmp(buf, default_accept_language) == 0) { active_language = combo_row_count; + } combo_row_count++; } - fclose(fp); + if (active_language == -1) { + /* configured language was not in list, add it */ + gtk_list_store_append(liststore, &iter); + gtk_list_store_set(liststore, &iter, 0, default_accept_language, -1 ); + active_language = combo_row_count; + + } + + fclose(fp); } else { LOG(("Failed opening languages file")); - warn_user("FileError", languages_file_location); - nsgtk_combo_box_text_append_text(comboLanguage, "en"); } + SET_COMBO(comboboxLanguage, active_language); - gtk_combo_box_set_active(GTK_COMBO_BOX(comboLanguage), active_language); - /** \todo localisation */ - gtk_widget_set_tooltip_text(GTK_WIDGET(comboLanguage), - "set preferred language for web pages"); - gtk_box_pack_start(box, comboLanguage, FALSE, FALSE, 0); - gtk_widget_show(comboLanguage); - - nsgtk_options_theme_combo(); + + /* Startup */ + if (nsoption_charp(homepage_url) != NULL) { + default_homepage_url = nsoption_charp(homepage_url); + } SET_ENTRY(entryHomePageURL, default_homepage_url); SET_BUTTON(setCurrentPage); SET_BUTTON(setDefaultPage); + + /* Theme */ + nsgtk_options_theme_combo(); + SET_CHECK(checkHideAdverts, nsoption_bool(block_ads)); SET_CHECK(checkDisablePopups, nsoption_bool(disable_popups)); @@ -384,42 +487,28 @@ void nsgtk_options_load(void) SET_CHECK(checkDisplayRecentURLs, nsoption_bool(url_suggestion)); SET_CHECK(checkSendReferer, nsoption_bool(send_referer)); + SET_CHECK(checkSendDNT, nsoption_bool(do_not_track)); SET_CHECK(checkShowSingleTab, nsoption_bool(show_single_tab)); - SET_COMBO(comboProxyType, proxytype); - SET_ENTRY(entryProxyHost, default_http_proxy_host); - - gtk_widget_set_sensitive(entryProxyHost, proxytype != 0); - - snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port)); - - SET_ENTRY(entryProxyPort, buf); - gtk_widget_set_sensitive(entryProxyPort, proxytype != 0); - - SET_ENTRY(entryProxyUser, default_http_proxy_auth_user); - - gtk_widget_set_sensitive(entryProxyUser, proxytype != 0); - - SET_ENTRY(entryProxyPassword, default_http_proxy_auth_pass); - - gtk_widget_set_sensitive(entryProxyPassword, proxytype != 0); - SET_SPIN(spinMaxFetchers, nsoption_int(max_fetchers)); SET_SPIN(spinFetchesPerHost, nsoption_int(max_fetchers_per_host)); SET_SPIN(spinCachedConnections, nsoption_int(max_cached_fetch_handles)); + SET_CHECK(checkEnableJavascript, nsoption_bool(enable_javascript)); + SET_CHECK(checkResampleImages, nsoption_bool(render_resample)); SET_SPIN(spinAnimationSpeed, nsoption_int(minimum_gif_delay) / 100.0); - SET_CHECK(checkDisableAnimations, !nsoption_bool(animate_images)); + SET_CHECK(checkEnableAnimations, nsoption_bool(animate_images)); - SET_FONT(fontSansSerif, nsoption_charp(font_sans)); +/* SET_FONT(fontSansSerif, nsoption_charp(font_sans)); SET_FONT(fontSerif, nsoption_charp(font_serif)); SET_FONT(fontMonospace, nsoption_charp(font_mono)); SET_FONT(fontCursive, nsoption_charp(font_cursive)); SET_FONT(fontFantasy, nsoption_charp(font_fantasy)); + SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10); +*/ SET_COMBO(comboDefault, nsoption_int(font_default)); SET_SPIN(spinDefaultSize, nsoption_int(font_size) / 10); - SET_SPIN(spinMinimumSize, nsoption_bool(font_min_size) / 10); SET_BUTTON(fontPreview); SET_COMBO(comboButtonType, nsoption_int(button_type) -1); @@ -451,16 +540,12 @@ void nsgtk_options_load(void) SET_CHECK(checkFitPage, nsoption_bool(enable_loosening)); SET_CHECK(checkCompressPDF, nsoption_bool(enable_PDF_compression)); SET_CHECK(checkPasswordPDF, nsoption_bool(enable_PDF_password)); - SET_BUTTON(setDefaultExportOptions); +// SET_BUTTON(setDefaultExportOptions); } -static void dialog_response_handler (GtkDialog *dlg, gint res_id) +static void dialog_response_handler(GtkDialog *dlg, gint res_id) { switch (res_id) { - case GTK_RESPONSE_HELP: - /* Ready to implement Help */ - break; - case GTK_RESPONSE_CLOSE: on_dialog_close(dlg, TRUE); } @@ -572,18 +657,28 @@ static gboolean on_##widget##_changed(GtkWidget *widget, gpointer data) \ return FALSE; \ } -static gboolean on_comboLanguage_changed(GtkWidget *widget, gpointer data) +static gboolean on_comboboxLanguage_changed(GtkComboBox *combo, gpointer data) { - gchar *lang; - - lang = nsgtk_combo_box_text_get_active_text(comboLanguage); - if (lang == NULL) - return FALSE; + gchar *lang = NULL; + GtkTreeIter iter; + GtkTreeModel *model; + + /* Obtain currently selected item from combo box. + * If nothing is selected, do nothing. + */ + if (gtk_combo_box_get_active_iter(combo, &iter)) { + /* Obtain data model from combo box. */ + model = gtk_combo_box_get_model(combo); + + /* Obtain string from model. */ + gtk_tree_model_get(model, &iter, 0, &lang, -1); + } - nsoption_set_charp(accept_language, strdup(lang)); + if (lang != NULL) { + nsoption_set_charp(accept_language, strdup(lang)); + g_free(lang); + } - g_free(lang); - return FALSE; } @@ -621,6 +716,11 @@ CHECK_CHANGED(checkSendReferer, send_referer) { } END_HANDLER + +CHECK_CHANGED(checkSendDNT, do_not_track) +{ +} +END_HANDLER CHECK_CHANGED(checkShowSingleTab, show_single_tab) { @@ -628,54 +728,48 @@ CHECK_CHANGED(checkShowSingleTab, show_single_tab) } END_HANDLER + COMBO_CHANGED(comboProxyType, http_proxy_auth) { LOG(("proxy auth: %d", nsoption_int(http_proxy_auth))); + + set_proxy_widgets_sensitivity(nsoption_int(http_proxy_auth)); switch (nsoption_int(http_proxy_auth)) { - case 0: + case 0: /* no proxy */ nsoption_set_bool(http_proxy, false); nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE); break; - case 1: + + case 1: /* proxy with no auth */ nsoption_set_bool(http_proxy, true); nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE); break; - case 2: + + case 2: /* proxy with basic auth */ nsoption_set_bool(http_proxy, true); nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_BASIC); break; - case 3: + + case 3: /* proxy with ntlm auth */ nsoption_set_bool(http_proxy, true); nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NTLM); break; + + case 4: /* system proxy */ + nsoption_set_bool(http_proxy, true); + nsoption_set_int(http_proxy_auth, OPTION_HTTP_PROXY_AUTH_NONE); + break; + } - gboolean sensitive = (!proxy_type == 0); - gtk_widget_set_sensitive(entryProxyHost, sensitive); - gtk_widget_set_sensitive(entryProxyPort, sensitive); - gtk_widget_set_sensitive(entryProxyUser, sensitive); - gtk_widget_set_sensitive(entryProxyPassword, sensitive); } END_HANDLER ENTRY_CHANGED(entryProxyHost, http_proxy_host) -gboolean on_entryProxyPort_changed(GtkWidget *widget, gpointer data) +SPIN_CHANGED(spinProxyPort, http_proxy_port) { - long port; - - errno = 0; - port = strtol((char *)gtk_entry_get_text(GTK_ENTRY(entryProxyPort)), - NULL, 10) & 0xffff; - if ((port != 0) && (errno == 0)) { - nsoption_set_int(http_proxy_port, port); - } else { - char buf[32]; - snprintf(buf, sizeof(buf), "%d", nsoption_int(http_proxy_port)); - SET_ENTRY(entryProxyPort, buf); - } - - return FALSE; } +END_HANDLER ENTRY_CHANGED(entryProxyUser, http_proxy_auth_user) @@ -709,9 +803,13 @@ static gboolean on_spinAnimationSpeed_changed(GtkWidget *widget, gpointer data) return FALSE; } -CHECK_CHANGED(checkDisableAnimations, animate_images) +CHECK_CHANGED(checkEnableAnimations, animate_images) +{ +} +END_HANDLER + +CHECK_CHANGED(checkEnableJavascript, enable_javascript) { - nsoption_set_bool(animate_images, !nsoption_bool(animate_images)); } END_HANDLER @@ -734,7 +832,7 @@ CHECK_CHANGED(checkHoverURLs, hover_urls) { } END_HANDLER - +/* FONT_CHANGED(fontSansSerif, font_sans) { } @@ -759,7 +857,7 @@ FONT_CHANGED(fontFantasy, font_fantasy) { } END_HANDLER - +*/ COMBO_CHANGED(comboDefault, font_default) { } @@ -771,12 +869,12 @@ SPIN_CHANGED(spinDefaultSize, font_size) } END_HANDLER -SPIN_CHANGED(spinMinimumSize, font_min_size) +/*SPIN_CHANGED(spinMinimumSize, font_min_size) { nsoption_set_int(font_min_size, nsoption_int(font_min_size) * 10); } END_HANDLER - +*/ BUTTON_CLICKED(fontPreview) { nsgtk_reflow_all_windows(); @@ -1057,6 +1155,7 @@ CHECK_CHANGED(checkPasswordPDF, enable_PDF_password) } END_HANDLER +/* BUTTON_CLICKED(setDefaultExportOptions) { nsoption_set_int(margin_top, DEFAULT_MARGIN_TOP_MM); @@ -1082,3 +1181,4 @@ BUTTON_CLICKED(setDefaultExportOptions) SET_CHECK(checkFitPage, nsoption_bool(enable_loosening)); } END_HANDLER +*/ diff --git a/gtk/res/options.gtk2.ui b/gtk/res/options.gtk2.ui index 1a17cc104..5dd793062 100644 --- a/gtk/res/options.gtk2.ui +++ b/gtk/res/options.gtk2.ui @@ -1,8 +1,8 @@ - - + + 5 Netsurf Preferences center-on-parent @@ -10,42 +10,43 @@ dialog False - + True vertical 2 - + True True - 4 - + True vertical + 6 - + True - 5 0 none - + True + 6 12 + 12 - + True vertical + 6 - + True - 5 - 5 + 12 - + True - URL + Page: False @@ -60,6 +61,7 @@ + end 1 @@ -69,38 +71,42 @@ - + True - 5 + 6 + + + - Current Page + Use Current Page True True - False - True + True - 5 - 0 + False + False + 1 - Default Page + Use Default Page True True - False - True + True - 5 - end - 1 + False + False + 2 + False + end 1 @@ -109,44 +115,55 @@ - + True - <b>Home page</b> + <b>Startup</b> True False + 6 0 - + True + 0 + none - + True - 5 - 0 - none + 6 + 12 + 12 - + True - 12 + vertical + 6 + + + Search from URL bar + True + True + False + True + + + 0 + + - + True - vertical - True + 12 - - Hide advertisements + True - True - False - True - True + Provider: False @@ -155,185 +172,112 @@ - - Disable pop-up windows + True - True - False - True - True + liststore_search_provider + + + + 0 + + - False - False 1 - - - Disable plug-ins - True - False - True - True - - - False - False - 2 - - + + 1 + - - - True - <b>Content blocking</b> - True - - - - False - 0 - - - + + True - 0 - none - - - True - 12 - - - True - vertical - - - - - - True - vertical - - - - - - - - - - - - False - False - 1 - - - - - - - - - - - - True - <b>Content Language</b> - True - - + <b>Search</b> + True - - 1 - False + 6 1 - + True - 5 0 none - + True + 6 12 + 12 - + True - 1 vertical - 2 + 6 - + + Remove download from list when complete + True + True + False + True + + + False + 0 + + + + + Confirm before overwriting files + True + True + False + True + + + False + 1 + + + + True - 4 - 4 + 12 - + True - Keep history for + Location: False - False 0 - + True - True - 1 + select-folder - False - False 1 - - - True - days - - - False - False - 2 - - - - - 0 - - - - - Hover URLs by pointer in local history - True - True - False - True - True False - False - 1 + 2 @@ -341,62 +285,63 @@ - + True - <b>History</b> + <b>Downloads</b> True False - False + 6 2 + + + + + True + Main + + + False + + + + + True + vertical + 6 - + True - 5 0 none - + True + 6 12 + 12 - + True - vertical - True + 12 - - Display recently visited URLs as you type - True - True - False - True - True - - - False - False - 0 - + - - Send site referral information + + Add Theme... True True - False - True - True - True + True False - False + end 1 @@ -405,189 +350,104 @@ - + True - <b>Misc</b> + <b>Themes</b> True False - 3 + 6 + 0 - - - - - True - General - - - False - - - - - True - vertical - + True - 5 0 none - + True + 6 12 + 12 - + True - 4 - 2 - 3 - 3 + vertical + 6 - + + Always show tab bar True True - + False + True - 1 - 2 - 2 - 3 - + 0 - + + Switch to newly opened tabs immediately True - liststore_proxytype - - - - 0 - - + True + False + True - 1 - 2 - + 1 - + + Newly opened tabs are blank True + True + False + True + + + 2 + + + + + True + 12 - - True - True - - - - 0 - - - - + True - : + Position: False False - 1 + 0 - - 64 + True - True - + liststore_tab_position + + + + 0 + + - False - 2 + 1 - 1 - 2 - 1 - 2 - - - - - - True - True - False - - - - 1 - 2 - 3 - 4 - - - - - - True - 0.89999997615814209 - Host - - - 1 - 2 - GTK_FILL - - - - - - True - 0.89999997615814209 - Proxy type - - - GTK_FILL - - - - - - True - 0.89999997615814209 - Username - - - 2 - 3 - GTK_FILL - - - - - - True - 0.89999997615814209 - Password - - - 3 - 4 - GTK_FILL - + 3 @@ -595,176 +455,121 @@ - + True - <b>HTTP Proxy</b> + <b>Tabs</b> True False - 0 + 6 + 1 - + True - 5 0 none - + True + 6 12 + 12 - + True - 3 - 3 - 3 - 3 - 3 - - - True - True - 1 - - - 1 - 2 - - - - - - True - True - 1 - - - 1 - 2 - 1 - 2 - - - - - - True - True - 1 - - - 1 - 2 - 2 - 3 - - - - - - True - 0.89999997615814209 - Maximum fetchers - - - - - + vertical + 6 - + True - 0.89999997615814209 - Fetches per host + 0 + Open source view in new: - 1 - 2 - + 0 - + True - 0.89999997615814209 - Cached connections + + + window + True + True + False + 0.54000002145767212 + True + True + sourceButtonTab + + + 0 + + + + + tab + True + True + False + True + True + + + 1 + + - 2 - 3 - + 1 - - - - - - - - - - + True - <b>Fetching</b> + <b>Source</b> True False - 1 + 6 + 2 - - - 1 - - - - - True - Network - - - 1 - False - - - - - True - vertical - + True - 5 0 none - + True + 6 12 + 12 - + True + vertical + 6 - - Resample images when not at natural size + + Display recently visited URLs as you type True True False - True - True True @@ -776,319 +581,223 @@ - + True - <b>Quality</b> + <b>URLbar</b> True False - 0 + 7 + 3 - + True - 5 0 none - + True + 6 12 + 12 - + True + vertical + 6 - + True + 6 - + True - 0.89999997615814209 - Limit speed to + Buttons: + False 0 - + True - True - 1 - 1 - True - if-valid + liststore_toolbar_buttontype + + + + 0 + + - False 1 - - - True - 0 - seconds between frames - - - 2 - - 0 - - - Disable animations - True - True - False - True - True - - - False - False - 1 - - - + True - <b>Animations</b> + <b>Toolbar</b> True False - False - 1 + 6 + 4 - 2 + 1 - + True - Rendering + Appearance - 2 + 1 False - + True vertical + 6 - + True - 5 0 none - + True + 6 12 + 12 - + True - 2 - 6 - 2 - 3 - 3 + vertical + 6 - + + Prevent pop-up windows True True False - False - False - - - 1 - 2 - - - - - - True - 0.89999997615814209 - Sans-serif - - - GTK_FILL - - - - - - True - 0.89999997615814209 - Serif - - - 1 - 2 - GTK_FILL - - - - - - True - 0.89999997615814209 - Monospace - - - 2 - 3 - GTK_FILL - - - - - - True - 0.89999997615814209 - Cursive - - - 3 - 4 - GTK_FILL - - - - - - True - 0.89999997615814209 - Fantasy - - - 4 - 5 - GTK_FILL - - - - - - True - 0.89999997615814209 - Default + True - 5 - 6 - GTK_FILL - + False + False + 0 - + + Hide Adverts True True False - False - False + True - 1 - 2 - 1 - 2 - GTK_FILL - + False + False + 1 - + + Enable JavaScript True True False - False - False + True - 1 - 2 - 2 - 3 - GTK_FILL - + False + False + 2 - + + Disable plug-ins True True False - False - False + True - 1 - 2 - 3 - 4 - GTK_FILL - + False + False + 3 - + + High quality image scaling True True False - False - False + True - 1 - 2 - 4 - 5 - GTK_FILL - + 4 - + True - liststore_defaultfont + 6 - - - 0 - + + True + Load and display + + + False + 0 + + + + + True + liststore_image_loading + + + + 0 + + + + + 1 + - 1 - 2 - 5 - 6 - GTK_FILL - + 5 @@ -1096,152 +805,82 @@ - + True - <b>Font faces</b> + <b>Control</b> True False + 6 0 - + True - 5 0 none - + True + 6 12 + 12 - + True - 2 - 4 - 3 - 3 + vertical + 6 - + + Enable True True False - - - True - 2 - - - True - gtk-apply - - - 0 - - - - - True - _Preview - True - - - 1 - - - - - - - 3 - 4 - 2 - - - 2 - - - - - True - True - 1 - True - - - 1 - 2 - - - - - - - True - True - 1 - - - 1 - 2 - 1 - 2 - - - - - - - True - 0 - pt - - - 2 - 3 - - - - - - True - 0 - pt - - - 2 - 3 - 1 - 2 - - - - - - True - 0.89999997615814209 - Minimum + True - 1 - 2 - GTK_FILL - + 0 - + True - 0.89999997615814209 - Default + 12 + + + True + Minimum time between frames: + + + False + 0 + + + + + True + True + True + Do not update animations any more often than this. + + adjustment_animation_time + 1 + 1 + True + if-valid + + + False + 1 + + - GTK_FILL - + 1 @@ -1249,137 +888,117 @@ - + True - <b>Font size</b> + <b>Animation</b> True False + 6 1 - + True 0 none - + True + 6 12 + 12 - + True - 2 - 10 - 3 + 12 - + True + 6 + + + True + Default + + + False + 0 + + + + + True + liststore_defaultfont + + + + 0 + + + + + 1 + + - 1 - 2 - - + 0 - + True - Toolbar buttons - right - - - - GTK_FILL - - - - - - - - - True - 5 - <b>Icons</b> - True - - - - - 2 - - - - - 3 - - - - - True - Style - - - 3 - False - - - - - True - vertical - - - True - 5 - 0 - none - - - True - 12 - - - True - 2 - 6 - - - True - Size - - - False - False - 0 - - - - - True - True - 1 + 6 + + + True + Size + + + False + 0 + + + + + True + True + True + The base-line font size to use. + 3 + + 3 + adjustment_font_default_size + 1 + True + + + False + 1 + + False - False 1 - + + _Preview True - MB + True + True + image1 + True False - False 2 @@ -1388,142 +1007,78 @@ - + True - <b>Memory cache</b> + <b>Fonts</b> True False - False - 0 + 2 - + True - 5 0 none - + True + 6 12 + 12 - + True vertical - 5 + 6 - + True - 3 + 12 - + True - Duration + Preferred language: False - False 0 - - True - True - 1 - - - False - False - 1 - - - - - True - days - - - False - False - 2 - - - - - 0 - - - - - True - 4 - 4 - - - - - + True - True - False + True + set preferred language for web pages + liststore_content_language - - True - 0 - 0 - - - True - 2 - - - True - gtk-delete - - - False - False - 0 - - - - - True - False - Perform maintainance - True - - - False - False - 1 - - - - + + 0 + + + 1 + + + + + 1 + + 0 + - False - False 1 - - - - False - False - 1 + 0 @@ -1531,59 +1086,60 @@ - + True - <b>Disc cache</b> + <b>Language</b> True False - 1 + 3 - 4 + 2 - + True - Cache + Content - 4 + 2 False - + True vertical + 6 - + True - 5 0 none - + True + 6 12 + 12 - + True vertical + 6 - - Automatically clear downloads when completed + + Local history shows URL in tooltip True True False - True - True True @@ -1591,50 +1147,48 @@ - - Request confirmation before overwriting files - True - True - False - True - True - - - False - False - 1 - - - - + True + 6 - + True - 2 - Download directory + Remember browsing history for up to False - False - 2 0 - + True - True - select-folder - 23 + True + 4 + + 4 + adjustment_history_age + 1 + True + False 1 + + + True + days + + + False + 2 + + - 2 + 1 @@ -1642,166 +1196,251 @@ - + True - <b>Downloads</b> + <b>History</b> True False + 6 0 - + True 0 none - + True + 6 12 + 12 - + True vertical + 6 - - Show tab bar with only one tab - True - True - False - True - True - - - False - False - 0 - - - - - Shift focus to new tab - True - True - False - True - True - - - 1 - - - - - Open blank window - True - True - False - True - True - - - 2 - - - - + True + 3 + 3 + 6 + 6 - + True - 0.4699999988079071 - 2 - Tabs position + 0 + Memory cache size - False - False - 2 - 0 + GTK_FILL - + True - liststore_tabpositions - - - - 0 - - + 0 + Disc cache size - 1 + 1 + 2 + GTK_FILL - - - 3 - - - - - - - - - True - <b>Tabs</b> - True - - - - + + + True + 0 + Expire cache entries after + + + 2 + 3 + GTK_FILL + + + + + True + True + + 5 + adjustment_cache_memory_size + 1 + True + + + 1 + 2 + GTK_FILL + + + + + True + True + + 5 + adjustment_cache_disc_size + 1 + True + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + True + + 3 + adjustment_disc_cache_age + 1 + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + 0 + MB + + + 2 + 3 + GTK_FILL + + + + + True + 0 + MB + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + True + 0 + days + + + 2 + 3 + 2 + 3 + GTK_FILL + + + + + 0 + + + + + True + + + + + + Maintinance + True + True + True + + + False + 1 + + + + + 1 + + + + + + + + + True + <b>Cache</b> + True + + + + False + 6 1 - + True 0 none - + True + 6 12 + 12 - + True + vertical + 6 - - in own window + + Enable referral submission True True False - True - True True - False - False 0 - - in new tab + + Enable sending "Do Not Track" request True True False - True True - False - False 1 @@ -1810,117 +1449,329 @@ - + True - <b>View Source</b> + <b>General</b> True False - False 2 + + + 3 + + + + + True + Privacy + + + 3 + False + + + + + True + vertical + 6 - + True 0 none - + True + 6 12 + 12 - + True + 4 + 2 + 6 + 6 - - Search from URL bar + + True + 0 + Proxy type + + + GTK_FILL + + + + + True + 0 + Host + + + 1 + 2 + GTK_FILL + + + + + True + 0 + Username + + + 2 + 3 + GTK_FILL + + + + + True + 0 + Password + + + 3 + 4 + GTK_FILL + + + + + True + True + The type of HTTP proxy server. + liststore_proxy_type + + + + 0 + + + + + 1 + 2 + + + + + True + 6 + + + True + True + True + Host name of your proxy server. + + + + 0 + + + + + True + : + + + False + 1 + + + + + True + True + True + Port number to connect to on proxy server. + 5 + + 5 + adjustment_proxy_port + 1 + True + if-valid + + + False + 2 + + + + + 1 + 2 + 1 + 2 + + + + True True - False - True - True + True + Username to access the proxy + - False - 0 + 1 + 2 + 2 + 3 - + True - Default provider - right + True + True + Password to access the proxy + - False - 1 + 1 + 2 + 3 + 4 + + + + + + + + + True + <b>HTTP Proxy</b> + True + + + + + False + 6 + 0 + + + + + True + 0 + none + + + True + 6 + 12 + 12 + + + True + 3 + 2 + 6 + 6 + + + True + 0 + Maximum fetchers + + + GTK_FILL + + + + + True + 0 + Fetches per host + + + 1 + 2 + GTK_FILL + + + + + True + 0 + Cached connections + + + 2 + 3 + GTK_FILL - + + True + True + True + Maximum number of concurrent items to fetch at once. + + 3 + adjustment_fetching_max + 1 + True + + + 1 + 2 + GTK_FILL + + + + True - liststore_searchproviders - - - - 0 - - + True + True + Maximum number of item fetches per web server. + + 3 + adjustment_fetching_perhost + 1 + True - 2 + 1 + 2 + 1 + 2 + GTK_FILL - - - - - - - True - <b>Search</b> - True - - - - - False - False - 3 - - - - - True - 0 - none - - - True - 12 - - - True - - - - - Add theme… + True True - False - True + True + Number of connections to keep in case they are needed again. + + 3 + adjustment_fetching_cached + 1 + True - False - False - end - 1 + 1 + 2 + 2 + 3 + GTK_FILL @@ -1928,204 +1779,371 @@ - + True - <b>Select themes</b> + <b>Fetching</b> True False - 4 + 6 + 1 - 5 + 4 - + True - Advanced + Network - 5 + 4 False - + True vertical + 6 - + True - 5 0 none - + True + 6 12 + 12 - + True - True + vertical + 6 - + + No images in output True - 2 - 3 - 4 - 5 - - - True - mm - - - 2 - 3 - 1 - 2 - - + True + False + True + + + 0 + + + + + No background images in output + True + True + False + True + + + 1 + + + + + Scale output to fit page + True + True + False + True + + + 2 + + + + + True + 6 - + True - mm + Scale output - 2 - 3 + False + 0 - + True True + 4 + + 4 + 1 + adjustment_pdf_scale 1 + True - 1 - 2 - 1 - 2 + False + 1 - + True - True - 1 + % - 1 - 2 + False + 2 + + + 3 + + + + + + + + + True + <b>Appearance</b> + True + + + + + False + 6 + 0 + + + + + True + 0 + none + + + True + 6 + 12 + 12 + + + True + vertical + 6 + + + True - + True - 0.89999997615814209 - Bottom + measurements in mm - 1 - 2 + False + 0 - - True - 0.89999997615814209 - Top - + - False - False 0 - + True - 2 + 3 3 - 4 - 5 - + + True + 6 + + + True + Top + + + False + 0 + + + + + True + True + 4 + + 5 + 1 + 1 + 1 + True + + + False + 1 + + + + + 1 + 2 + GTK_EXPAND + + + + True - mm + 6 + + + True + Left + + + False + 0 + + + + + True + True + 4 + + 5 + 1 + adjustment_pdf_lmargin + 1 + 1 + True + + + False + 1 + + - 2 - 3 1 2 + GTK_EXPAND - + True - mm + 6 + + + True + Bottom + + + False + 0 + + + + + True + True + 4 + + 5 + 1 + 1 + 1 + True + + + False + 1 + + - 2 - 3 + 1 + 2 + 2 + 3 + GTK_EXPAND - + True - True - 1 + 6 + + + True + Right + + + False + 0 + + + + + True + True + 4 + + 5 + 1 + 1 + 1 + True + + + False + 1 + + - 1 - 2 + 2 + 3 1 2 + GTK_EXPAND - - True - True - 1 - - - 1 - 2 - + - - True - 0.89999997615814209 - Right - - - 1 - 2 - + - - True - 0.89999997615814209 - Left - + + + + + + + - False - False 1 @@ -2134,7 +2152,7 @@ - + True <b>Margins</b> True @@ -2143,164 +2161,32 @@ False - 0 - - - - - True - 5 - 0 - none - - - True - 12 - - - True - 4 - - - True - Scale - - - False - 0 - - - - - True - True - 1 - - - False - False - 1 - - - - - True - % - - - False - 2 - - - - - - - - - True - <b>Scaling</b> - True - - - - - False - False + 6 1 - - True - 5 - 0 - none - - - True - 12 - - - True - vertical - - - Suppress images - True - True - False - True - True - - - 0 - - - - - Remove backgrounds - True - True - False - True - True - - - 1 - - - - - Fit page - True - True - False - True - True - - - 2 - - - - - - - - - True - <b>Appearance</b> - True - - - - - False - 2 - - - - + True - 5 0 none - + True + 6 12 + 12 - + True vertical + 7 - Compress PDF + Output is compressed True True False - True True @@ -2309,11 +2195,10 @@ - Set a password for PDF + Output has a password True True False - True True @@ -2325,55 +2210,31 @@ - + True - <b>Advanced</b> + <b>Generation</b> True False - False - 3 - - - - - True - 10 - - - Default - True - True - False - True - - - False - False - 0 - - - - - False - 4 + 6 + 2 - 6 + 5 - + True - Export + PDF - 6 + 5 False @@ -2383,14 +2244,13 @@ - + True edge gtk-help True - False True False True @@ -2429,29 +2289,9 @@ close - - - - - - - - Top - - - Left - - - Right - - - Bottom - - - - + - + @@ -2465,7 +2305,7 @@ Microsoft Live - Buisness.com + Buisiness.com Omgili @@ -2489,10 +2329,10 @@ Dictionary.com - Youtube + YouTube - AeroMp3 + AeroMP3 AOL @@ -2507,7 +2347,7 @@ Ebay - IMDB + IMBD ESPN @@ -2520,6 +2360,66 @@ + + + + + + + + Top + + + Left + + + Right + + + Bottom + + + + + + + + + + + Small Icons + + + Large Icons + + + Large Icons and Text + + + Text only + + + + + + + + + + + foreground and background images + + + foreground images + + + background images + + + no images + + + @@ -2543,23 +2443,122 @@ - + + True + 3 + gtk-apply + + - No proxy + Direct connection + + + Manual with no authentication + + + Manual with basic authentication - Simple proxy + Manual with NTLM authentication - Basic authentication + System settings + + + + 0.10000000000000001 + 0.10000000000000001 + 10 + 0.10000000000000001 + 1 + + + 16 + 1 + 100 + 1 + 10 + + + 28 + 999 + 1 + 28 + + + 16 + 2048 + 4 + 16 + + + 16 + 2048 + 4 + 16 + + + 28 + 999 + 1 + 10 + + + 3128 + 1 + 65535 + 1 + 10 + + + 10 + 1 + 100 + 1 + 10 + + + 1 + 1 + 100 + 1 + 10 + + + 1 + 100 + 1 + 10 + + + 100 + 1 + 1000 + 1 + 10 + + + 999 + 1 + 10 + + + + + + + + + - NTLM authentication + en + English diff --git a/gtk/res/options.gtk3.ui b/gtk/res/options.gtk3.ui index b6254a34d..7fb513ef5 100644 --- a/gtk/res/options.gtk3.ui +++ b/gtk/res/options.gtk3.ui @@ -263,7 +263,7 @@ - + 5 Netsurf Preferences center-on-parent -- cgit v1.2.3