preferences: remove gtkrc option
parent
d7d587c284
commit
b91a8c813c
63
src/pref.c
63
src/pref.c
|
@ -124,8 +124,6 @@ char *sound_stop = NULL;
|
|||
char *sound_server_connect = NULL;
|
||||
char *sound_redial_success = NULL;
|
||||
|
||||
gboolean use_custom_gtkrc;
|
||||
|
||||
GtkTooltips *tooltips;
|
||||
|
||||
static int pref_q1_top_color;
|
||||
|
@ -181,7 +179,6 @@ static GtkWidget *refresh_sorts_check_button;
|
|||
static GtkWidget *refresh_on_update_check_button;
|
||||
static GtkWidget *resolve_on_update_check_button;
|
||||
static GtkWidget *show_only_configured_games_check_button;
|
||||
static GtkWidget *use_custom_gtkrc_check_button;
|
||||
|
||||
static GtkWidget *pushlatency_mode_radio_buttons[3];
|
||||
static GtkWidget *pushlatency_value_spinner;
|
||||
|
@ -1240,11 +1237,6 @@ static void get_new_defaults (void) {
|
|||
config_set_bool ("show only configured games", default_show_only_configured_games = i);
|
||||
}
|
||||
|
||||
i = GTK_TOGGLE_BUTTON (use_custom_gtkrc_check_button)->active;
|
||||
if (i != use_custom_gtkrc) {
|
||||
config_set_bool ("use custom gtkrc", use_custom_gtkrc = i);
|
||||
}
|
||||
|
||||
config_pop_prefix();
|
||||
|
||||
/* General */
|
||||
|
@ -3813,24 +3805,6 @@ static GtkWidget *appearance_options_page (void) {
|
|||
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* gtkrc */
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
|
||||
|
||||
use_custom_gtkrc_check_button = gtk_check_button_new_with_label (_("Use custom color settings"));
|
||||
|
||||
gtk_tooltips_set_tip (tooltips, use_custom_gtkrc_check_button, _("Use XQF's"
|
||||
" color settings instead of the system ones. You need to restart XQF"
|
||||
" for this setting to take effect. Note that you may need to install"
|
||||
" the gtk-engines package."), NULL);
|
||||
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (use_custom_gtkrc_check_button), use_custom_gtkrc);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), use_custom_gtkrc_check_button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (use_custom_gtkrc_check_button);
|
||||
|
||||
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (frame);
|
||||
|
@ -4635,41 +4609,6 @@ void free_user_info (void) {
|
|||
}
|
||||
}
|
||||
|
||||
#define XQF_GTKRCNAME "gtkrc-2.0"
|
||||
|
||||
static void set_style() {
|
||||
char path[PATH_MAX];
|
||||
int deflt = 0;
|
||||
|
||||
use_custom_gtkrc = config_get_bool_with_default("use custom gtkrc=true", &deflt);
|
||||
|
||||
/** do not apply custom colors in GTK2 by default */
|
||||
if (deflt) {
|
||||
use_custom_gtkrc = FALSE;
|
||||
}
|
||||
|
||||
if (use_custom_gtkrc) {
|
||||
if (default_icontheme) {
|
||||
snprintf(path, sizeof(path), "%s/%s/" XQF_GTKRCNAME, default_icontheme, xqf_PACKAGE_DATA_DIR);
|
||||
|
||||
if (access(path, R_OK) != 0) {
|
||||
path[0] = '\0';
|
||||
}
|
||||
}
|
||||
else {
|
||||
path[0] = '\0';
|
||||
}
|
||||
|
||||
if (!*path) {
|
||||
snprintf(path, sizeof(path), "%s/default/" XQF_GTKRCNAME, xqf_PACKAGE_DATA_DIR);
|
||||
}
|
||||
|
||||
if (access(path, R_OK) == 0) {
|
||||
gtk_rc_parse(path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void prefs_load_for_game(enum server_type type) {
|
||||
char buf[256];
|
||||
struct game *g = &games[type];
|
||||
|
@ -4845,8 +4784,6 @@ int prefs_load (void) {
|
|||
default_show_only_configured_games = config_get_bool("show only configured games=false");
|
||||
default_icontheme = config_get_string("icontheme");
|
||||
|
||||
set_style();
|
||||
|
||||
config_pop_prefix();
|
||||
|
||||
config_push_prefix ("/" CONFIG_FILE "/General");
|
||||
|
|
Loading…
Reference in New Issue