NetSurf
|
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#include "utils/messages.h"
#include "utils/nsoption.h"
#include "utils/file.h"
#include "utils/log.h"
#include "utils/nsurl.h"
#include "netsurf/browser_window.h"
#include "desktop/searchweb.h"
#include "gtk/compat.h"
#include "gtk/toolbar_items.h"
#include "gtk/window.h"
#include "gtk/gui.h"
#include "gtk/scaffolding.h"
#include "gtk/resources.h"
#include "gtk/preferences.h"
Go to the source code of this file.
Data Structures | |
struct | ppref |
Macros | |
#define | TOGGLEBUTTON_SIGNALS(WIDGET, OPTION) |
#define | SPINBUTTON_SIGNALS(WIDGET, OPTION, MULTIPLIER) |
#define | SPINBUTTON_UINT_SIGNALS(WIDGET, OPTION, MULTIPLIER) |
#define | ENTRY_SIGNALS(WIDGET, OPTION) |
#define | GB(TYPE, NAME) GTK_##TYPE(gtk_builder_get_object(preferences_builder, #NAME)) |
Functions | |
G_MODULE_EXPORT void | nsgtk_preferences_comboProxyType_changed (GtkComboBox *combo, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboProxyType_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboboxLoadImages_changed (GtkComboBox *combo, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboboxLoadImages_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboDefault_changed (GtkComboBox *combo, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboDefault_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_fontPreview_clicked (GtkButton *button, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboboxLanguage_changed (GtkComboBox *combo, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboboxLanguage_realize (GtkWidget *widget, struct ppref *priv) |
Fill content language list store. More... | |
G_MODULE_EXPORT void | nsgtk_preferences_checkShowSingleTab_toggled (GtkToggleButton *togglebutton, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_checkShowSingleTab_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboTabPosition_changed (GtkComboBox *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboTabPosition_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboDeveloperView_changed (GtkComboBox *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboDeveloperView_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboButtonType_changed (GtkComboBox *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboButtonType_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_setCurrentPage_clicked (GtkButton *button, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_setDefaultPage_clicked (GtkButton *button, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboSearch_changed (GtkComboBox *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_comboSearch_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_fileChooserDownloads_selectionchanged (GtkFileChooser *chooser, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_fileChooserDownloads_realize (GtkWidget *widget, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_dialogPreferences_response (GtkDialog *dlg, gint resid) |
G_MODULE_EXPORT gboolean | nsgtk_preferences_dialogPreferences_deleteevent (GtkDialog *dlg, struct ppref *priv) |
G_MODULE_EXPORT void | nsgtk_preferences_dialogPreferences_destroy (GtkDialog *dlg, struct ppref *priv) |
static void | set_proxy_widgets_sensitivity (int proxyval, struct ppref *priv) |
static nserror | comboboxLanguage_add_from_data (GtkListStore *liststore, GtkComboBox *combobox, const char *accept_language, const uint8_t *data, size_t data_size) |
populate language combo from data More... | |
static nserror | comboboxLanguage_add_from_file (GtkListStore *liststore, GtkComboBox *combobox, const char *accept_language, const char *file_location) |
populate language combo from file More... | |
GtkWidget * | nsgtk_preferences (struct browser_window *bw, GtkWindow *parent) |
Initialise prefernces window. More... | |
Variables | |
static struct ppref | ppref |
#define ENTRY_SIGNALS | ( | WIDGET, | |
OPTION | |||
) |
Definition at line 133 of file preferences.c.
#define GB | ( | TYPE, | |
NAME | |||
) | GTK_##TYPE(gtk_builder_get_object(preferences_builder, #NAME)) |
#define SPINBUTTON_SIGNALS | ( | WIDGET, | |
OPTION, | |||
MULTIPLIER | |||
) |
Definition at line 91 of file preferences.c.
#define SPINBUTTON_UINT_SIGNALS | ( | WIDGET, | |
OPTION, | |||
MULTIPLIER | |||
) |
Definition at line 112 of file preferences.c.
#define TOGGLEBUTTON_SIGNALS | ( | WIDGET, | |
OPTION | |||
) |
Definition at line 68 of file preferences.c.
|
static |
populate language combo from data
Definition at line 542 of file preferences.c.
References NSERROR_OK.
Referenced by nsgtk_preferences_comboboxLanguage_realize().
|
static |
populate language combo from file
Definition at line 598 of file preferences.c.
References NSERROR_NOT_FOUND, NSERROR_OK, and NSLOG.
Referenced by nsgtk_preferences_comboboxLanguage_realize().
GtkWidget * nsgtk_preferences | ( | struct browser_window * | bw, |
GtkWindow * | parent | ||
) |
Initialise prefernces window.
Definition at line 978 of file preferences.c.
References ppref::bw, ppref::content_language, ppref::dialog, ppref::entryHomePageURL, ppref::entryProxyHost, ppref::entryProxyNoproxy, ppref::entryProxyPassword, ppref::entryProxyUser, GB, NSERROR_OK, nsgtk_builder_new_from_resname(), NSLOG, parent, ppref, ppref::search_providers, and ppref::spinProxyPort.
Referenced by preferences_button_clicked_cb().
G_MODULE_EXPORT void nsgtk_preferences_checkShowSingleTab_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 712 of file preferences.c.
References nsoption_bool.
G_MODULE_EXPORT void nsgtk_preferences_checkShowSingleTab_toggled | ( | GtkToggleButton * | togglebutton, |
struct ppref * | priv | ||
) |
Definition at line 703 of file preferences.c.
References nsgtk_window_update_all(), and nsoption_set_bool.
G_MODULE_EXPORT void nsgtk_preferences_comboboxLanguage_changed | ( | GtkComboBox * | combo, |
struct ppref * | priv | ||
) |
Definition at line 514 of file preferences.c.
References nsoption_set_charp.
G_MODULE_EXPORT void nsgtk_preferences_comboboxLanguage_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Fill content language list store.
Definition at line 653 of file preferences.c.
References comboboxLanguage_add_from_data(), comboboxLanguage_add_from_file(), ppref::content_language, NSERROR_OK, nsgtk_data_from_resname(), nsgtk_path_from_resname(), NSLOG, and nsoption_charp.
G_MODULE_EXPORT void nsgtk_preferences_comboboxLoadImages_changed | ( | GtkComboBox * | combo, |
struct ppref * | priv | ||
) |
Definition at line 417 of file preferences.c.
References nsoption_set_bool.
G_MODULE_EXPORT void nsgtk_preferences_comboboxLoadImages_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 451 of file preferences.c.
References nsoption_bool.
G_MODULE_EXPORT void nsgtk_preferences_comboButtonType_changed | ( | GtkComboBox * | widget, |
struct ppref * | priv | ||
) |
Definition at line 774 of file preferences.c.
References nsgtk_window_update_all(), and nsoption_set_int.
G_MODULE_EXPORT void nsgtk_preferences_comboButtonType_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 784 of file preferences.c.
References nsoption_int.
G_MODULE_EXPORT void nsgtk_preferences_comboDefault_changed | ( | GtkComboBox * | combo, |
struct ppref * | priv | ||
) |
Definition at line 482 of file preferences.c.
References nsoption_set_int.
G_MODULE_EXPORT void nsgtk_preferences_comboDefault_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 493 of file preferences.c.
References nsoption_int.
G_MODULE_EXPORT void nsgtk_preferences_comboDeveloperView_changed | ( | GtkComboBox * | widget, |
struct ppref * | priv | ||
) |
Definition at line 749 of file preferences.c.
References nsoption_set_int.
G_MODULE_EXPORT void nsgtk_preferences_comboDeveloperView_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 757 of file preferences.c.
References nsoption_int.
G_MODULE_EXPORT void nsgtk_preferences_comboProxyType_changed | ( | GtkComboBox * | combo, |
struct ppref * | priv | ||
) |
Definition at line 282 of file preferences.c.
References nsoption_set_bool, nsoption_set_int, OPTION_HTTP_PROXY_AUTH_BASIC, OPTION_HTTP_PROXY_AUTH_NONE, OPTION_HTTP_PROXY_AUTH_NTLM, and set_proxy_widgets_sensitivity().
G_MODULE_EXPORT void nsgtk_preferences_comboProxyType_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 317 of file preferences.c.
References nsoption_bool, nsoption_charp, nsoption_int, and set_proxy_widgets_sensitivity().
G_MODULE_EXPORT void nsgtk_preferences_comboSearch_changed | ( | GtkComboBox * | widget, |
struct ppref * | priv | ||
) |
Definition at line 831 of file preferences.c.
References nsoption_set_charp, search_web_iterate_providers(), and search_web_select_provider().
G_MODULE_EXPORT void nsgtk_preferences_comboSearch_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 863 of file preferences.c.
References nsoption_charp, ppref::search_providers, and search_web_iterate_providers().
G_MODULE_EXPORT void nsgtk_preferences_comboTabPosition_changed | ( | GtkComboBox * | widget, |
struct ppref * | priv | ||
) |
Definition at line 727 of file preferences.c.
References nsgtk_window_update_all(), and nsoption_set_int.
G_MODULE_EXPORT void nsgtk_preferences_comboTabPosition_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 738 of file preferences.c.
References nsoption_int.
G_MODULE_EXPORT gboolean nsgtk_preferences_dialogPreferences_deleteevent | ( | GtkDialog * | dlg, |
struct ppref * | priv | ||
) |
Definition at line 945 of file preferences.c.
References netsurf_mkpath(), nsgtk_config_home, and nsoption_write().
G_MODULE_EXPORT void nsgtk_preferences_dialogPreferences_destroy | ( | GtkDialog * | dlg, |
struct ppref * | priv | ||
) |
Definition at line 965 of file preferences.c.
References netsurf_mkpath(), nsgtk_config_home, and nsoption_write().
G_MODULE_EXPORT void nsgtk_preferences_dialogPreferences_response | ( | GtkDialog * | dlg, |
gint | resid | ||
) |
Definition at line 930 of file preferences.c.
References netsurf_mkpath(), nsgtk_config_home, and nsoption_write().
G_MODULE_EXPORT void nsgtk_preferences_fileChooserDownloads_realize | ( | GtkWidget * | widget, |
struct ppref * | priv | ||
) |
Definition at line 918 of file preferences.c.
References nsoption_charp.
G_MODULE_EXPORT void nsgtk_preferences_fileChooserDownloads_selectionchanged | ( | GtkFileChooser * | chooser, |
struct ppref * | priv | ||
) |
Definition at line 908 of file preferences.c.
References nsoption_set_charp.
G_MODULE_EXPORT void nsgtk_preferences_fontPreview_clicked | ( | GtkButton * | button, |
struct ppref * | priv | ||
) |
Definition at line 504 of file preferences.c.
References nsgtk_window_update_all().
G_MODULE_EXPORT void nsgtk_preferences_setCurrentPage_clicked | ( | GtkButton * | button, |
struct ppref * | priv | ||
) |
Definition at line 802 of file preferences.c.
References browser_window_access_url(), ppref::bw, ppref::entryHomePageURL, nsoption_set_charp, and nsurl_access().
G_MODULE_EXPORT void nsgtk_preferences_setDefaultPage_clicked | ( | GtkButton * | button, |
struct ppref * | priv | ||
) |
Definition at line 814 of file preferences.c.
References ppref::entryHomePageURL, and nsoption_set_charp.
|
static |
Definition at line 220 of file preferences.c.
Referenced by nsgtk_preferences_comboProxyType_changed(), and nsgtk_preferences_comboProxyType_realize().
Definition at line 60 of file preferences.c.
Referenced by nsgtk_preferences().