diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | data/default-prefs.js | 3 | ||||
-rw-r--r-- | data/glade/prefs-dialog.glade | 633 | ||||
-rw-r--r-- | embed/ephy-embed-single.c | 7 | ||||
-rw-r--r-- | embed/ephy-embed-single.h | 8 | ||||
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 13 | ||||
-rw-r--r-- | embed/mozilla/mozilla-notifiers.cpp | 2 | ||||
-rw-r--r-- | src/prefs-dialog.c | 56 |
8 files changed, 265 insertions, 473 deletions
@@ -1,3 +1,19 @@ +2003-09-09 Marco Pesenti Gritti <marco@gnome.org> + + * data/default-prefs.js: + * data/glade/prefs-dialog.glade: + * embed/ephy-embed-single.c: (ephy_embed_single_get_font_list): + * embed/ephy-embed-single.h: + * embed/mozilla/mozilla-embed-single.cpp: + * embed/mozilla/mozilla-notifiers.cpp: + * src/prefs-dialog.c: (setup_font_menu), (attach_fonts_signals), + (setup_size_controls), (setup_fonts), (prefs_dialog_init): + + First important step in solving the fonts mess. + Allow to select the variable width instead of + families. Also use points instead of pixels. + Set a minimum font size by default. + 2003-09-09 Christian Persch <chpe@cvs.gnome.org> * lib/widgets/Makefile.am: diff --git a/data/default-prefs.js b/data/default-prefs.js index ceba11b0f..e225055a1 100644 --- a/data/default-prefs.js +++ b/data/default-prefs.js @@ -36,3 +36,6 @@ pref("keyword.enabled", true); pref("security.warn_entering_secure", false); pref("security.warn_leaving_secure", false); pref("security.warn_submit_insecure", false); + +// fonts +pref("font.size.unit", "pt"); diff --git a/data/glade/prefs-dialog.glade b/data/glade/prefs-dialog.glade index 44e0e5498..ec6224ce2 100644 --- a/data/glade/prefs-dialog.glade +++ b/data/glade/prefs-dialog.glade @@ -495,319 +495,199 @@ </child> <child> - <widget class="GtkTable" id="table70"> + <widget class="GtkVBox" id="vbox195"> <property name="visible">True</property> - <property name="n_rows">7</property> - <property name="n_columns">4</property> <property name="homogeneous">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="spacing">18</property> <child> - <widget class="GtkLabel" id="label1132"> + <widget class="GtkTable" id="table70"> <property name="visible">True</property> - <property name="label" translatable="yes">Siz_e:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">fixed_size_spinbutton</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="fixed_size_spinbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">1 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options"></property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1131"> - <property name="visible">True</property> - <property name="label" translatable="yes">Si_ze:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">variable_size_spinbutton</property> - </widget> - <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkSpinButton" id="variable_size_spinbutton"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="climb_rate">1</property> - <property name="digits">0</property> - <property name="numeric">False</property> - <property name="update_policy">GTK_UPDATE_ALWAYS</property> - <property name="snap_to_ticks">False</property> - <property name="wrap">False</property> - <property name="adjustment">0 0 100 1 10 10</property> - </widget> - <packing> - <property name="left_attach">3</property> - <property name="right_attach">4</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1133"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Proportional:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">proportional_optionmenu</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1134"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Serif:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry1</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1135"> - <property name="visible">True</property> - <property name="label" translatable="yes">S_ans serif:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry2</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1138"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Monospace:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry5</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkLabel" id="label1121"> - <property name="visible">True</property> - <property name="label" translatable="yes">_Language:</property> - <property name="use_underline">True</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_CENTER</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - <property name="mnemonic_widget">fonts_language_optionmenu</property> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> + <property name="n_rows">4</property> + <property name="n_columns">3</property> + <property name="homogeneous">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">12</property> - <child> - <widget class="GtkOptionMenu" id="fonts_language_optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">-1</property> + <child> + <widget class="GtkSpinButton" id="fixed_size_spinbutton"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">1 0 100 1 10 10</property> + </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> + </child> - <child internal-child="menu"> - <widget class="GtkMenu" id="menu2"> + <child> + <widget class="GtkLabel" id="label1134"> <property name="visible">True</property> + <property name="label" translatable="yes">_Variable width:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">combo-entry1</property> </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">0</property> - <property name="bottom_attach">1</property> - <property name="x_options">fill</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkOptionMenu" id="proportional_optionmenu"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="history">0</property> + <child> + <widget class="GtkLabel" id="label1138"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Fixed width:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">combo-entry5</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> <child> - <widget class="GtkMenu" id="menu3"> + <widget class="GtkLabel" id="label1121"> + <property name="visible">True</property> + <property name="label" translatable="yes">For _Language:</property> + <property name="use_underline">True</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_CENTER</property> + <property name="wrap">False</property> + <property name="selectable">False</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + <property name="mnemonic_widget">fonts_language_optionmenu</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> - <child> - <widget class="GtkMenuItem" id="serif1"> + <child> + <widget class="GtkCombo" id="variable_combo"> + <property name="visible">True</property> + <property name="value_in_list">False</property> + <property name="allow_empty">True</property> + <property name="case_sensitive">False</property> + <property name="enable_arrow_keys">True</property> + <property name="enable_arrows_always">False</property> + + <child internal-child="entry"> + <widget class="GtkEntry" id="combo-entry1"> <property name="visible">True</property> - <property name="label" translatable="yes">Serif</property> - <property name="use_underline">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char" translatable="yes">*</property> + <property name="activates_default">False</property> </widget> </child> - <child> - <widget class="GtkMenuItem" id="sans_serif1"> + <child internal-child="list"> + <widget class="GtkList" id="combo-list1"> <property name="visible">True</property> - <property name="label" translatable="yes">Sans Serif</property> - <property name="use_underline">True</property> + <property name="selection_mode">GTK_SELECTION_BROWSE</property> </widget> </child> </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkHBox" id="hbox133"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">12</property> <child> - <widget class="GtkCheckButton" id="use_fonts_checkbutton"> + <widget class="GtkCombo" id="monospace_combo"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Always use _these fonts</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> + <property name="value_in_list">False</property> + <property name="allow_empty">True</property> + <property name="case_sensitive">False</property> + <property name="enable_arrow_keys">True</property> + <property name="enable_arrows_always">False</property> + + <child internal-child="entry"> + <widget class="GtkEntry" id="combo-entry5"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="editable">False</property> + <property name="visibility">True</property> + <property name="max_length">0</property> + <property name="text" translatable="yes"></property> + <property name="has_frame">True</property> + <property name="invisible_char" translatable="yes">*</property> + <property name="activates_default">False</property> + </widget> + </child> + + <child internal-child="list"> + <widget class="GtkList" id="combo-list5"> + <property name="visible">True</property> + <property name="selection_mode">GTK_SELECTION_BROWSE</property> + </widget> + </child> </widget> <packing> - <property name="padding">0</property> - <property name="expand">True</property> - <property name="fill">True</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="y_options"></property> </packing> </child> <child> <widget class="GtkLabel" id="label1217"> <property name="visible">True</property> - <property name="label" translatable="yes">Min_imum font size:</property> + <property name="label" translatable="yes">Min_imum size:</property> <property name="use_underline">True</property> <property name="use_markup">False</property> <property name="justify">GTK_JUSTIFY_LEFT</property> @@ -820,14 +700,17 @@ <property name="mnemonic_widget">min_size_spinbutton</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkSpinButton" id="min_size_spinbutton"> + <widget class="GtkSpinButton" id="variable_size_spinbutton"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="climb_rate">1</property> @@ -839,159 +722,81 @@ <property name="adjustment">0 0 100 1 10 10</property> </widget> <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">True</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options"></property> + <property name="y_options"></property> </packing> </child> - </widget> - <packing> - <property name="left_attach">0</property> - <property name="right_attach">4</property> - <property name="top_attach">6</property> - <property name="bottom_attach">7</property> - <property name="x_options">fill</property> - </packing> - </child> - <child> - <widget class="GtkCombo" id="serif_combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry1"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list1"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> - </widget> - </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="y_options"></property> - </packing> - </child> - - <child> - <widget class="GtkCombo" id="sansserif_combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry2"> + <child> + <widget class="GtkOptionMenu" id="fonts_language_optionmenu"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - </widget> - </child> + <property name="history">-1</property> - <child internal-child="list"> - <widget class="GtkList" id="combo-list2"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> + <child internal-child="menu"> + <widget class="GtkMenu" id="menu2"> + <property name="visible">True</property> + </widget> + </child> </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">3</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> </child> - </widget> - <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">3</property> - <property name="bottom_attach">4</property> - <property name="y_options"></property> - </packing> - </child> - <child> - <widget class="GtkCombo" id="monospace_combo"> - <property name="visible">True</property> - <property name="value_in_list">False</property> - <property name="allow_empty">True</property> - <property name="case_sensitive">False</property> - <property name="enable_arrow_keys">True</property> - <property name="enable_arrows_always">False</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry5"> + <child> + <widget class="GtkSpinButton" id="min_size_spinbutton"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char" translatable="yes">*</property> - <property name="activates_default">False</property> - </widget> - </child> - - <child internal-child="list"> - <widget class="GtkList" id="combo-list5"> - <property name="visible">True</property> - <property name="selection_mode">GTK_SELECTION_BROWSE</property> + <property name="climb_rate">1</property> + <property name="digits">0</property> + <property name="numeric">False</property> + <property name="update_policy">GTK_UPDATE_ALWAYS</property> + <property name="snap_to_ticks">False</property> + <property name="wrap">False</property> + <property name="adjustment">0 0 100 1 10 10</property> </widget> + <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options"></property> + <property name="y_options"></property> + </packing> </child> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> </packing> </child> <child> - <widget class="GtkLabel" id="label1275"> + <widget class="GtkCheckButton" id="use_fonts_checkbutton"> <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Always use _these fonts</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="active">False</property> + <property name="inconsistent">False</property> + <property name="draw_indicator">True</property> </widget> <packing> - <property name="left_attach">0</property> - <property name="right_attach">1</property> - <property name="top_attach">5</property> - <property name="bottom_attach">6</property> - <property name="x_options">fill</property> - <property name="y_options"></property> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> </packing> </child> </widget> diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c index fe42ba07b..83c60026a 100644 --- a/embed/ephy-embed-single.c +++ b/embed/ephy-embed-single.c @@ -159,13 +159,10 @@ ephy_embed_single_get_language_groups (EphyEmbedSingle *shell, gresult ephy_embed_single_get_font_list (EphyEmbedSingle *shell, const char *langGroup, - const char *fontType, - GList **fontList, - char **default_font) + GList **fontList) { EphyEmbedSingleClass *klass = EPHY_EMBED_SINGLE_GET_CLASS (shell); - return klass->get_font_list (shell, langGroup, fontType, fontList, - default_font); + return klass->get_font_list (shell, langGroup, fontList); } gresult diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h index 2ca30f41b..4ef689d3f 100644 --- a/embed/ephy-embed-single.h +++ b/embed/ephy-embed-single.h @@ -127,9 +127,7 @@ struct EphyEmbedSingleClass GList **encodings); gresult (* get_font_list) (EphyEmbedSingle *shell, const char *langGroup, - const char *fontType, - GList **fontList, - char **default_font); + GList **fontList); gresult (* list_cookies) (EphyEmbedSingle *shell, GList **cokies); gresult (* remove_cookies) (EphyEmbedSingle *shell, @@ -172,9 +170,7 @@ gresult ephy_embed_single_get_encodings (EphyEmbedSingle *shell, gresult ephy_embed_single_get_font_list (EphyEmbedSingle *shell, const char *langGroup, - const char *fontType, - GList **fontList, - char **default_font); + GList **fontList); /* Cookies */ gresult ephy_embed_single_list_cookies (EphyEmbedSingle *shell, diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index a850fecd0..4cee89bd5 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -214,9 +214,7 @@ impl_get_language_groups (EphyEmbedSingle *shell, static gresult impl_get_font_list (EphyEmbedSingle *shell, const char *langGroup, - const char *fontType, - GList **fontList, - char **default_font); + GList **fontList); static gresult impl_list_cookies (EphyEmbedSingle *shell, GList **cookies); @@ -811,9 +809,7 @@ impl_get_language_groups (EphyEmbedSingle *shell, static gresult impl_get_font_list (EphyEmbedSingle *shell, const char *langGroup, - const char *fontType, - GList **fontList, - char **default_font) + GList **fontList) { nsresult rv; PRUint32 fontCount; @@ -841,11 +837,6 @@ impl_get_font_list (EphyEmbedSingle *shell, *fontList = g_list_reverse (l); - if (default_font != NULL) - { - *default_font = g_strdup (fontType); - } - return G_OK; } diff --git a/embed/mozilla/mozilla-notifiers.cpp b/embed/mozilla/mozilla-notifiers.cpp index 6c46fe55e..0b5867921 100644 --- a/embed/mozilla/mozilla-notifiers.cpp +++ b/embed/mozilla/mozilla-notifiers.cpp @@ -440,7 +440,7 @@ mozilla_notifiers_init(EphyEmbedSingle *single) for (i = 0; i < n_fonts_languages; i++) { guint k; - char *types [] = { "serif", "sans-serif", "cursive", "fantasy", "monospace" }; + char *types [] = { "variable", "monospace" }; char key[255]; char *info; diff --git a/src/prefs-dialog.c b/src/prefs-dialog.c index 6f0b05e97..b99b75de4 100644 --- a/src/prefs-dialog.c +++ b/src/prefs-dialog.c @@ -175,25 +175,16 @@ char *cookies_accept_enum [] = }; static guint n_cookies_accept_enum = G_N_ELEMENTS (cookies_accept_enum); -static const -char *proportional_enum [] = -{ - "serif", "sans-serif" -}; -static guint n_proportional_enum = G_N_ELEMENTS (proportional_enum); - enum { - FONT_TYPE_SERIF, - FONT_TYPE_SANSSERIF, + FONT_TYPE_VARIABLE, FONT_TYPE_MONOSPACE }; const char *fonts_types[] = { - "serif", - "sans-serif", + "variable", "monospace" }; @@ -223,13 +214,11 @@ enum /* Fonts and Colors */ FONTS_LANGUAGE_PROP, - SERIF_PROP, - SANSSERIF_PROP, + VARIABLE_PROP, MONOSPACE_PROP, FIXED_SIZE_PROP, VARIABLE_SIZE_PROP, MIN_SIZE_PROP, - PROPORTIONAL_PROP, USE_COLORS_PROP, USE_FONTS_PROP, @@ -263,13 +252,11 @@ EphyDialogProperty properties [] = /* Fonts and Colors */ { FONTS_LANGUAGE_PROP, "fonts_language_optionmenu", CONF_FONTS_FOR_LANGUAGE, PT_AUTOAPPLY, NULL }, - { SERIF_PROP, "serif_combo", NULL, PT_NORMAL, NULL }, - { SANSSERIF_PROP, "sansserif_combo", NULL, PT_NORMAL, NULL }, + { VARIABLE_PROP, "variable_combo", NULL, PT_NORMAL, NULL }, { MONOSPACE_PROP, "monospace_combo", NULL, PT_NORMAL, NULL }, { FIXED_SIZE_PROP, "fixed_size_spinbutton", NULL, PT_NORMAL, NULL }, { VARIABLE_SIZE_PROP, "variable_size_spinbutton", NULL, PT_NORMAL, NULL }, { MIN_SIZE_PROP, "min_size_spinbutton", NULL, PT_NORMAL, NULL }, - { PROPORTIONAL_PROP, "proportional_optionmenu", CONF_RENDERING_DEFAULT_FONT, PT_AUTOAPPLY, NULL }, { USE_COLORS_PROP, "use_colors_checkbutton", CONF_RENDERING_USE_OWN_COLORS, PT_AUTOAPPLY, NULL }, { USE_FONTS_PROP, "use_fonts_checkbutton", CONF_RENDERING_USE_OWN_FONTS, PT_AUTOAPPLY, NULL }, @@ -447,7 +434,6 @@ setup_font_menu (PrefsDialog *dialog, const char *type, GtkWidget *combo) { - char *default_font; GList *fonts = NULL; gchar *name; char key[255]; @@ -459,7 +445,7 @@ setup_font_menu (PrefsDialog *dialog, ephy_embed_single_get_font_list (single, get_current_language_code (dialog), - type, &fonts, &default_font); + &fonts); /* Get the default font */ g_snprintf (key, 255, "%s_%s_%s", CONF_RENDERING_FONT, type, @@ -467,7 +453,14 @@ setup_font_menu (PrefsDialog *dialog, name = eel_gconf_get_string (key); if (name == NULL) { - name = g_strdup (default_font); + if (strcmp (type, "variable") == 0) + { + name = g_strdup ("sans-serif"); + } + else + { + name = g_strdup ("monospace"); + } } /* set popdown doesnt like NULL */ @@ -489,7 +482,6 @@ setup_font_menu (PrefsDialog *dialog, &pos); } - g_free (default_font); g_free (name); g_list_foreach (fonts, (GFunc)g_free, NULL); @@ -551,10 +543,8 @@ attach_font_signal (PrefsDialog *dialog, int prop, static void attach_fonts_signals (PrefsDialog *dialog) { - attach_font_signal (dialog, SERIF_PROP, - GINT_TO_POINTER(FONT_TYPE_SERIF)); - attach_font_signal (dialog, SANSSERIF_PROP, - GINT_TO_POINTER(FONT_TYPE_SANSSERIF)); + attach_font_signal (dialog, VARIABLE_PROP, + GINT_TO_POINTER(FONT_TYPE_VARIABLE)); attach_font_signal (dialog, MONOSPACE_PROP, GINT_TO_POINTER(FONT_TYPE_MONOSPACE)); } @@ -630,15 +620,15 @@ setup_size_controls (PrefsDialog *dialog) spin = ephy_dialog_get_control (EPHY_DIALOG(dialog), FIXED_SIZE_PROP); - setup_size_control (dialog, CONF_RENDERING_FONT_FIXED_SIZE, 12, spin); + setup_size_control (dialog, CONF_RENDERING_FONT_FIXED_SIZE, 10, spin); spin = ephy_dialog_get_control (EPHY_DIALOG(dialog), VARIABLE_SIZE_PROP); - setup_size_control (dialog, CONF_RENDERING_FONT_VAR_SIZE, 16, spin); + setup_size_control (dialog, CONF_RENDERING_FONT_VAR_SIZE, 12, spin); spin = ephy_dialog_get_control (EPHY_DIALOG(dialog), MIN_SIZE_PROP); - setup_size_control (dialog, CONF_RENDERING_FONT_MIN_SIZE, 0, spin); + setup_size_control (dialog, CONF_RENDERING_FONT_MIN_SIZE, 7, spin); } static gint @@ -655,12 +645,8 @@ setup_fonts (PrefsDialog *dialog) dialog->priv->switching = TRUE; combo = ephy_dialog_get_control (EPHY_DIALOG(dialog), - SERIF_PROP); - setup_font_menu (dialog, "serif", combo); - - combo = ephy_dialog_get_control (EPHY_DIALOG(dialog), - SANSSERIF_PROP); - setup_font_menu (dialog, "sans-serif", combo); + VARIABLE_PROP); + setup_font_menu (dialog, "variable", combo); combo = ephy_dialog_get_control (EPHY_DIALOG(dialog), MONOSPACE_PROP); @@ -1088,8 +1074,6 @@ prefs_dialog_init (PrefsDialog *pd) ephy_dialog_add_enum (EPHY_DIALOG (pd), ACCEPT_COOKIES_PROP, n_cookies_accept_enum, cookies_accept_enum); - ephy_dialog_add_enum (EPHY_DIALOG (pd), PROPORTIONAL_PROP, - n_proportional_enum, proportional_enum); ephy_dialog_set_size_group (EPHY_DIALOG (pd), lang_size_group, n_lang_size_group); |