diff options
author | Ramiro Estrugo <ramiro@eazel.com> | 2001-03-08 02:01:18 +0000 |
---|---|---|
committer | Ramiro Estrugo <ramiro@src.gnome.org> | 2001-03-08 02:01:18 +0000 |
commit | d393d7c606289e0f561d43b86564a12e988749f8 (patch) | |
tree | 1a056d6ce6376069a44c0814f2e77f9cff1d7b16 /libnautilus-extensions/nautilus-global-preferences.c | |
parent | ecb4df4078fd6d55684788cec3ce11886226519f (diff) | |
download | nautilus-d393d7c606289e0f561d43b86564a12e988749f8.tar.gz |
Merge from HEAD:
2001-03-07 Ramiro Estrugo <ramiro@eazel.com>
reviewed by: John Sullivan <sullivan@eazel.com>
Fix bugs:
7349 - Sidebar tabs no longer display in a bold font
7477 - Sidebar tab labels don't update to new font when font is
changed
7492 - Font style regression on Sidebar title
* libnautilus-extensions/nautilus-global-preferences.h:
* libnautilus-extensions/nautilus-global-preferences.c:
(nautilus_global_preferences_get_smooth_font): Add documentation
to clarify the fact that the result needs to be unrefed.
(nautilus_global_preferences_get_smooth_bold_font): New function
that returns a bold version of the user's preferred font.
* src/nautilus-sidebar-tabs.c:
(nautilus_sidebar_tabs_load_theme_data): Use the user's bold
preffered font instead of the default font. (bug 7349)
(smooth_font_changed_callback), (nautilus_sidebar_tabs_initialize),
(nautilus_sidebar_tabs_destroy): Listen for changes in the user's
preferred font and update the tabs accordingly (bug 7477)
* src/nautilus-sidebar-title.c: (smooth_font_changed_callback):
Use the user's bold preferred font instead of the plain one. Also
unref the font when done to plug a tiny leak. (bug 7492)
Diffstat (limited to 'libnautilus-extensions/nautilus-global-preferences.c')
-rw-r--r-- | libnautilus-extensions/nautilus-global-preferences.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libnautilus-extensions/nautilus-global-preferences.c b/libnautilus-extensions/nautilus-global-preferences.c index 61f716dc6..2ae55a2d5 100644 --- a/libnautilus-extensions/nautilus-global-preferences.c +++ b/libnautilus-extensions/nautilus-global-preferences.c @@ -1261,6 +1261,12 @@ nautilus_global_preferences_set_dialog_title (const char *title) gtk_window_set_title (GTK_WINDOW (dialog), title); } +/** + * nautilus_global_preferences_get_smooth_font + * + * Return value: The user's preferred smooth font. Need to + * unref the returned GtkObject when done with it. + */ NautilusScalableFont * nautilus_global_preferences_get_smooth_font (void) { @@ -1280,6 +1286,35 @@ nautilus_global_preferences_get_smooth_font (void) return scalable_font; } +/** + * nautilus_global_preferences_get_smooth_bold_font + * + * Return value: A bold flavor on the user's preferred smooth font. If + * no bold font is found, then the plain preffered font is + * used. Need to unref the returned GtkObject when done + * with it. + */ +NautilusScalableFont * +nautilus_global_preferences_get_smooth_bold_font (void) +{ + NautilusScalableFont *plain_font; + NautilusScalableFont *bold_font; + + plain_font = nautilus_global_preferences_get_smooth_font (); + g_assert (NAUTILUS_IS_SCALABLE_FONT (plain_font)); + + bold_font = nautilus_scalable_font_make_bold (plain_font); + + if (bold_font == NULL) { + bold_font = plain_font; + } else { + gtk_object_unref (GTK_OBJECT (plain_font)); + } + + g_assert (NAUTILUS_IS_SCALABLE_FONT (bold_font)); + return bold_font; +} + void nautilus_global_preferences_initialize (void) { |