Add a font button for the document font gconf key, and change the label of

2006-01-26  Christian Persch  <chpe@cvs.gnome.org>

	* capplets/font/font-properties.glade:
	* capplets/font/main.c: (setup_dialog):
	Add a font button for the document font gconf key, and change
	the label of the 'terminal font' button. Bug #160454,
	patch by Shaun McCance.
This commit is contained in:
Christian Persch 2006-01-26 13:23:05 +00:00 committed by Christian Persch
parent 072218356d
commit d73b4ee2d6
3 changed files with 216 additions and 127 deletions

View file

@ -1,3 +1,11 @@
2006-01-26 Christian Persch <chpe@cvs.gnome.org>
* capplets/font/font-properties.glade:
* capplets/font/main.c: (setup_dialog):
Add a font button for the document font gconf key, and change
the label of the 'terminal font' button. Bug #160454,
patch by Shaun McCance.
2006-01-22 Luca Cavalli <loopback@slackit.org> 2006-01-22 Luca Cavalli <loopback@slackit.org>
* capplets/about-me/gnome-about-me.desktop.in.in: * capplets/about-me/gnome-about-me.desktop.in.in:

View file

@ -17,6 +17,8 @@
<property name="skip_pager_hint">False</property> <property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">False</property> <property name="has_separator">False</property>
<child internal-child="vbox"> <child internal-child="vbox">
@ -74,7 +76,7 @@
<child> <child>
<widget class="GtkTable" id="table3"> <widget class="GtkTable" id="table3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">4</property> <property name="n_rows">5</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
@ -94,6 +96,10 @@
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="mnemonic_widget">application_font</property> <property name="mnemonic_widget">application_font</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
@ -105,81 +111,6 @@
</packing> </packing>
</child> </child>
<child>
<widget class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">_Desktop font:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</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">desktop_font</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="label12">
<property name="visible">True</property>
<property name="label" translatable="yes">_Window title font:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</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">window_title_font</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="label13">
<property name="visible">True</property>
<property name="label" translatable="yes">_Terminal font:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</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">monospace_font</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> <child>
<widget class="GtkFontButton" id="application_font"> <widget class="GtkFontButton" id="application_font">
<property name="visible">True</property> <property name="visible">True</property>
@ -200,39 +131,88 @@
</child> </child>
<child> <child>
<widget class="GtkFontButton" id="desktop_font"> <widget class="GtkLabel" id="label13">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="label" translatable="yes">_Monospace font:</property>
<property name="show_style">True</property> <property name="use_underline">True</property>
<property name="show_size">True</property> <property name="use_markup">False</property>
<property name="use_font">True</property> <property name="justify">GTK_JUSTIFY_RIGHT</property>
<property name="use_size">False</property> <property name="wrap">False</property>
<property name="focus_on_click">True</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">monospace_font</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">0</property>
<property name="right_attach">2</property> <property name="right_attach">1</property>
<property name="top_attach">1</property> <property name="top_attach">4</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">5</property>
<property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkFontButton" id="window_title_font"> <widget class="GtkLabel" id="label12">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="label" translatable="yes">_Window title font:</property>
<property name="show_style">True</property> <property name="use_underline">True</property>
<property name="show_size">True</property> <property name="use_markup">False</property>
<property name="use_font">True</property> <property name="justify">GTK_JUSTIFY_RIGHT</property>
<property name="use_size">False</property> <property name="wrap">False</property>
<property name="focus_on_click">True</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">window_title_font</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">0</property>
<property name="right_attach">2</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="label6">
<property name="visible">True</property>
<property name="label" translatable="yes">Des_ktop font:</property>
<property name="use_underline">True</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_RIGHT</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">desktop_font</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
<packing>
<property name="left_attach">0</property>
<property name="right_attach">1</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
<property name="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -247,11 +227,101 @@
<property name="use_size">False</property> <property name="use_size">False</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
</widget> </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="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkFontButton" id="window_title_font">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_style">True</property>
<property name="show_size">True</property>
<property name="use_font">True</property>
<property name="use_size">False</property>
<property name="focus_on_click">True</property>
</widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">3</property> <property name="top_attach">3</property>
<property name="bottom_attach">4</property> <property name="bottom_attach">4</property>
<property name="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkFontButton" id="desktop_font">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_style">True</property>
<property name="show_size">True</property>
<property name="use_font">True</property>
<property name="use_size">False</property>
<property name="focus_on_click">True</property>
</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="x_options">fill</property>
<property name="y_options"></property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="label" translatable="yes">_Document font:</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">document_font</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</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="GtkFontButton" id="document_font">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_style">True</property>
<property name="show_size">True</property>
<property name="use_font">True</property>
<property name="use_size">False</property>
<property name="focus_on_click">True</property>
</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="x_options">fill</property>
<property name="y_options"></property> <property name="y_options"></property>
</packing> </packing>
</child> </child>
@ -282,6 +352,10 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
@ -291,31 +365,16 @@
</child> </child>
<child> <child>
<widget class="GtkHBox" id="hbox6"> <widget class="GtkAlignment" id="alignment13">
<property name="visible">True</property> <property name="visible">True</property>
<property name="homogeneous">False</property> <property name="xalign">0.5</property>
<property name="spacing">0</property> <property name="yalign">0.5</property>
<property name="xscale">1</property>
<child> <property name="yscale">1</property>
<widget class="GtkLabel" id="label14"> <property name="top_padding">0</property>
<property name="visible">True</property> <property name="bottom_padding">0</property>
<property name="label" translatable="yes"> </property> <property name="left_padding">12</property>
<property name="use_underline">False</property> <property name="right_padding">0</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.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child> <child>
<widget class="GtkTable" id="font_render_frame"> <widget class="GtkTable" id="font_render_frame">
@ -324,7 +383,7 @@
<property name="n_columns">2</property> <property name="n_columns">2</property>
<property name="homogeneous">False</property> <property name="homogeneous">False</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">6</property> <property name="column_spacing">12</property>
<child> <child>
<widget class="GtkVBox" id="vbox1"> <widget class="GtkVBox" id="vbox1">
@ -336,7 +395,7 @@
<widget class="GtkRadioButton" id="monochrome_radio"> <widget class="GtkRadioButton" id="monochrome_radio">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">_Monochrome</property> <property name="label" translatable="yes">M_onochrome</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
@ -594,11 +653,6 @@
</packing> </packing>
</child> </child>
</widget> </widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child> </child>
</widget> </widget>
<packing> <packing>
@ -638,6 +692,8 @@
<property name="skip_pager_hint">False</property> <property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">False</property> <property name="has_separator">False</property>
<child internal-child="vbox"> <child internal-child="vbox">
@ -737,6 +793,10 @@
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="mnemonic_widget">dpi_spinner</property> <property name="mnemonic_widget">dpi_spinner</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
@ -777,6 +837,10 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
@ -813,6 +877,10 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
@ -1045,6 +1113,10 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>
@ -1338,6 +1410,10 @@
<property name="yalign">0.5</property> <property name="yalign">0.5</property>
<property name="xpad">0</property> <property name="xpad">0</property>
<property name="ypad">0</property> <property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget> </widget>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>

View file

@ -32,6 +32,7 @@ static void cb_show_details (GtkWidget *button,
#define WINDOW_TITLE_FONT_KEY METACITY_DIR "/titlebar_font" #define WINDOW_TITLE_FONT_KEY METACITY_DIR "/titlebar_font"
#define WINDOW_TITLE_USES_SYSTEM_KEY METACITY_DIR "/titlebar_uses_system_font" #define WINDOW_TITLE_USES_SYSTEM_KEY METACITY_DIR "/titlebar_uses_system_font"
#define MONOSPACE_FONT_KEY "/desktop/gnome/interface/monospace_font_name" #define MONOSPACE_FONT_KEY "/desktop/gnome/interface/monospace_font_name"
#define DOCUMENT_FONT_KEY "/desktop/gnome/interface/document_font_name"
#ifdef HAVE_XFT2 #ifdef HAVE_XFT2
#define FONT_RENDER_DIR "/desktop/gnome/font_rendering" #define FONT_RENDER_DIR "/desktop/gnome/font_rendering"
@ -581,6 +582,10 @@ setup_dialog (void)
G_CALLBACK (application_font_changed), WID ("application_font")); G_CALLBACK (application_font_changed), WID ("application_font"));
application_font_changed (WID ("application_font")); application_font_changed (WID ("application_font"));
peditor = gconf_peditor_new_font (NULL, DOCUMENT_FONT_KEY,
WID ("document_font"),
NULL);
peditor = gconf_peditor_new_font (NULL, DESKTOP_FONT_KEY, peditor = gconf_peditor_new_font (NULL, DESKTOP_FONT_KEY,
WID ("desktop_font"), WID ("desktop_font"),
NULL); NULL);