Added use system font
This commit is contained in:
parent
c12a050ec8
commit
b553e1791b
|
@ -27,7 +27,10 @@
|
||||||
|
|
||||||
void gm_preferences_dialog_run_dialog();
|
void gm_preferences_dialog_run_dialog();
|
||||||
|
|
||||||
void on_gm_preferences_font_set(GtkFontButton *button, gpointer user_data);
|
void on_gm_preferences_dialog_check_button_system_font_clicked(
|
||||||
|
GtkButton *button, gpointer user_data);
|
||||||
|
void on_gm_preferences_dialog_font_set(GtkFontButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
void on_gm_preferences_dialog_check_button_embed_editor_clicked(
|
void on_gm_preferences_dialog_check_button_embed_editor_clicked(
|
||||||
GtkButton *button, gpointer user_data);
|
GtkButton *button, gpointer user_data);
|
||||||
|
@ -263,12 +266,22 @@ gm_preferences_dialog_run() {
|
||||||
gm_preferences_dialog_update_color_buttons(TRUE);
|
gm_preferences_dialog_update_color_buttons(TRUE);
|
||||||
gm_preferences_dialog_init_combo_box_scheme();
|
gm_preferences_dialog_init_combo_box_scheme();
|
||||||
gm_preferences_dialog_init_logging();
|
gm_preferences_dialog_init_logging();
|
||||||
|
|
||||||
|
// Connect this now so it can handle the sensitivity on activation
|
||||||
|
glade_xml_signal_connect(preferences->xml,
|
||||||
|
"on_check_button_system_font_clicked", G_CALLBACK(
|
||||||
|
on_gm_preferences_dialog_check_button_system_font_clicked));
|
||||||
|
|
||||||
|
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(
|
||||||
|
gm_preferences_dialog_widget("check_button_system_font")),
|
||||||
|
gm_color_table_get_use_system_font(gm_app_color_table(
|
||||||
|
gm_app_instance())));
|
||||||
|
|
||||||
gtk_font_button_set_font_name(GTK_FONT_BUTTON(
|
gtk_font_button_set_font_name(GTK_FONT_BUTTON(
|
||||||
gm_preferences_dialog_widget("font_button_font")),
|
gm_preferences_dialog_widget("font_button_font")),
|
||||||
gm_color_table_font_description(gm_app_color_table(
|
gm_color_table_font_description(gm_app_color_table(
|
||||||
gm_app_instance())));
|
gm_app_instance())));
|
||||||
|
|
||||||
alt_editor = gm_options_get(options, "editor_alternative");
|
alt_editor = gm_options_get(options, "editor_alternative");
|
||||||
|
|
||||||
if (strcmp(alt_editor, "0") == 0) {
|
if (strcmp(alt_editor, "0") == 0) {
|
||||||
|
@ -305,7 +318,7 @@ gm_preferences_dialog_run() {
|
||||||
|
|
||||||
glade_xml_signal_connect(preferences->xml,
|
glade_xml_signal_connect(preferences->xml,
|
||||||
"on_font_button_font_font_set", G_CALLBACK(
|
"on_font_button_font_font_set", G_CALLBACK(
|
||||||
on_gm_preferences_font_set));
|
on_gm_preferences_dialog_font_set));
|
||||||
|
|
||||||
glade_xml_signal_connect(preferences->xml,
|
glade_xml_signal_connect(preferences->xml,
|
||||||
"on_entry_alt_editor_focus_out", G_CALLBACK(
|
"on_entry_alt_editor_focus_out", G_CALLBACK(
|
||||||
|
@ -353,7 +366,21 @@ on_gm_preferences_dialog_response(GtkDialog *dialog, gint response,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
on_gm_preferences_font_set(GtkFontButton *button, gpointer user_data) {
|
on_gm_preferences_dialog_check_button_system_font_clicked(
|
||||||
|
GtkButton *button, gpointer user_data) {
|
||||||
|
gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive(gm_preferences_dialog_widget(
|
||||||
|
"label_font_description"), !active);
|
||||||
|
gtk_widget_set_sensitive(gm_preferences_dialog_widget(
|
||||||
|
"font_button_font"), !active);
|
||||||
|
|
||||||
|
gm_color_table_set_use_system_font(gm_app_color_table(gm_app_instance()),
|
||||||
|
active);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
on_gm_preferences_dialog_font_set(GtkFontButton *button, gpointer user_data) {
|
||||||
gchar const *font = gtk_font_button_get_font_name(button);
|
gchar const *font = gtk_font_button_get_font_name(button);
|
||||||
|
|
||||||
gm_color_table_set_font_description(gm_app_color_table(gm_app_instance()),
|
gm_color_table_set_font_description(gm_app_color_table(gm_app_instance()),
|
||||||
|
@ -499,7 +526,8 @@ on_gm_preferences_dialog_check_button_logging_toggled(
|
||||||
g_free(opt);
|
g_free(opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void on_gm_preferences_dialog_check_button_logging_enable_toggled(
|
void
|
||||||
|
on_gm_preferences_dialog_check_button_logging_enable_toggled(
|
||||||
GtkToggleButton *button, gpointer user_data) {
|
GtkToggleButton *button, gpointer user_data) {
|
||||||
gboolean active = gtk_toggle_button_get_active(button);
|
gboolean active = gtk_toggle_button_get_active(button);
|
||||||
|
|
||||||
|
|
Reference in New Issue