Patch by Maxime Simon: In the default font handling, make menu and plain font

synonymous, since they are the same font by default. This fixes the Default
button enabled/disabled state and ticket #3759. Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30181 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-04-15 19:40:03 +00:00
parent 108987eae1
commit 32ac8d0823
1 changed files with 15 additions and 2 deletions

View File

@ -381,7 +381,14 @@ FontSelectionView::SetDefaults()
font_family family;
font_style style;
float size;
if (_get_system_default_font_(Name(), family, style, &size) != B_OK) {
const char* fontName;
if (!strcmp(Name(), "menu"))
fontName = "plain";
else
fontName = Name();
if (_get_system_default_font_(fontName, family, style, &size) != B_OK) {
Revert();
return;
}
@ -425,8 +432,14 @@ FontSelectionView::IsDefaultable()
font_family defaultFamily;
font_style defaultStyle;
float defaultSize;
const char* fontName;
if (_get_system_default_font_(Name(), defaultFamily, defaultStyle, &defaultSize) != B_OK)
if (!strcmp(Name(), "menu"))
fontName = "plain";
else
fontName = Name();
if (_get_system_default_font_(fontName, defaultFamily, defaultStyle, &defaultSize) != B_OK)
return false;
font_family currentFamily;