--- control-center-2.0.0/capplets/font/font-properties.glade.extrafonts Wed Jul 24 00:20:12 2002 +++ control-center-2.0.0/capplets/font/font-properties.glade Wed Jul 24 01:27:26 2002 @@ -45,6 +45,7 @@ True True True + True gtk-close True GTK_RELIEF_NORMAL @@ -61,106 +62,233 @@ - - 5 + True - 3 - 2 False - 8 - 5 + 5 - + + 5 True - Standard _application font: - True - False - GTK_JUSTIFY_RIGHT - False - False - 0 - 0.5 - 0 - 0 - application_font - - - 0 - 1 - 0 - 1 - fill - - - + 4 + 3 + False + 8 + 5 - - - True - _Desktop font: - True - False - GTK_JUSTIFY_RIGHT - False - False - 0 - 0.5 - 0 - 0 - desktop_font - - - 0 - 1 - 1 - 2 - fill - - - + + + True + _Application font: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + application_font + + + 0 + 1 + 0 + 1 + fill + + + - - - True - Set the font for applications - True - GNOME_FONT_PICKER_MODE_FONT_INFO - True - True - 14 - - - 1 - 2 - 0 - 1 - fill - - + + + True + _Desktop font: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + desktop_font + + + 0 + 1 + 1 + 2 + fill + + + - - - True - Set the font for the icons on the desktop - True - GNOME_FONT_PICKER_MODE_FONT_INFO - True - True - 14 + + + True + Set the font for applications + True + GNOME_FONT_PICKER_MODE_FONT_INFO + True + True + 14 + + + 1 + 2 + 0 + 1 + fill + + + + + + True + Set the font for the icons on the desktop + True + GNOME_FONT_PICKER_MODE_FONT_INFO + True + True + 14 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + _Window title font: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + desktop_font + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + _Terminal font: + True + False + GTK_JUSTIFY_RIGHT + False + False + 0 + 0.5 + 0 + 0 + desktop_font + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + Set the font for window titlebars + True + GNOME_FONT_PICKER_MODE_FONT_INFO + True + True + 14 + + + 1 + 2 + 2 + 3 + fill + + + + + + + True + Set the monospace font for terminals and similar applications + True + GNOME_FONT_PICKER_MODE_FONT_INFO + True + True + 14 + + + 1 + 2 + 3 + 4 + fill + + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 2 + 3 + 0 + 4 + + + - 1 - 2 - 1 - 2 - fill - + 0 + True + True - + + 5 True 0 0.5 @@ -411,7 +539,7 @@ True True - De_tails... + Detai_ls... True GTK_RELIEF_NORMAL @@ -449,11 +577,9 @@ - 0 - 2 - 2 - 3 - fill + 0 + True + True --- control-center-2.0.0/capplets/font/main.c.extrafonts Wed Jul 24 00:20:12 2002 +++ control-center-2.0.0/capplets/font/main.c Wed Jul 24 01:22:00 2002 @@ -28,6 +28,10 @@ #define GTK_FONT_KEY "/desktop/gnome/interface/font_name" #define DESKTOP_FONT_KEY "/apps/nautilus/preferences/desktop_font" +#define METACITY_DIR "/apps/metacity/general" +#define WINDOW_TITLE_FONT_KEY METACITY_DIR "/titlebar_font" +#define WINDOW_TITLE_USES_SYSTEM_KEY METACITY_DIR "/titlebar_uses_system_font" +#define MONOSPACE_FONT_KEY "/desktop/gnome/interface/monospace_font_name" #define FONT_RENDER_DIR "/desktop/gnome/font_rendering" #define FONT_ANTIALIASING_KEY FONT_RENDER_DIR "/antialiasing" @@ -207,7 +211,7 @@ pattern = FcPatternBuild (NULL, FC_FAMILY, FcTypeString, "Serif", FC_SLANT, FcTypeInteger, FC_SLANT_ROMAN, - FC_SIZE, FcTypeDouble, 20., + FC_SIZE, FcTypeDouble, 18., NULL); font1 = open_pattern (pattern, antialiasing, hinting); FcPatternDestroy (pattern); @@ -293,6 +297,8 @@ if (hint_str) gconf_string_to_enum (hint_enums, hint_str, &val); *hinting = val; + + g_object_unref (client); } typedef struct { @@ -355,6 +361,8 @@ gconf_client_set_string (client, FONT_HINTING_KEY, gconf_enum_to_string (hint_enums, pair->hinting), NULL); + + g_object_unref (client); } /* Restore back to the previous state until we get notification @@ -384,6 +392,26 @@ static void +metacity_titlebar_load_sensitivity (GConfClient *client, + GladeXML *dialog) +{ + gtk_widget_set_sensitive (WID ("window_title_font"), + !gconf_client_get_bool (client, + WINDOW_TITLE_USES_SYSTEM_KEY, + NULL)); +} + +static void +metacity_changed (GConfClient *client, + guint cnxn_id, + GConfEntry *entry, + gpointer user_data) +{ + if (strcmp (entry->key, WINDOW_TITLE_USES_SYSTEM_KEY) == 0) + metacity_titlebar_load_sensitivity (client, user_data); +} + +static void setup_dialog (GladeXML *dialog) { GConfClient *client; @@ -395,6 +423,7 @@ client = gconf_client_get_default (); gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); + gconf_client_add_dir (client, METACITY_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); gconf_client_add_dir (client, FONT_RENDER_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); peditor = gconf_peditor_new_font (NULL, GTK_FONT_KEY, @@ -405,6 +434,20 @@ WID ("desktop_font"), PEDITOR_FONT_COMBINED, NULL); + peditor = gconf_peditor_new_font (NULL, WINDOW_TITLE_FONT_KEY, + WID ("window_title_font"), + PEDITOR_FONT_COMBINED, NULL); + + peditor = gconf_peditor_new_font (NULL, MONOSPACE_FONT_KEY, + WID ("monospace_font"), + PEDITOR_FONT_COMBINED, NULL); + + gconf_client_notify_add (client, METACITY_DIR, + metacity_changed, + dialog, NULL, NULL); + + metacity_titlebar_load_sensitivity (client, dialog); + widget = WID ("font_dialog"); filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "font-capplet.png", TRUE, NULL); if (filename != NULL) @@ -438,7 +481,9 @@ "response", G_CALLBACK (cb_dialog_response), NULL); - gtk_widget_show (widget); + gtk_widget_show (widget); + + g_object_unref (client); } #ifdef HAVE_XFT2 @@ -678,6 +723,8 @@ g_signal_connect (G_OBJECT (details_dialog), "delete_event", G_CALLBACK (gtk_true), NULL); + + g_object_unref (client); } gtk_window_present (GTK_WINDOW (details_dialog));