[haiku-commits] r33945 - haiku/trunk/src/apps/terminal

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 8 Nov 2009 12:47:04 +0100 (CET)

Author: jackburton
Date: 2009-11-08 12:47:04 +0100 (Sun, 08 Nov 2009)
New Revision: 33945
Changeset: http://dev.haiku-os.org/changeset/33945/haiku
Ticket: http://dev.haiku-os.org/ticket/4489

Modified:
   haiku/trunk/src/apps/terminal/TermWindow.cpp
Log:
Fix for bug #4489. Terminal wasn't using the saved font style, only the
font family. Moreover, it defaulted to be_plain_font, instead of be_fixed_font.


Modified: haiku/trunk/src/apps/terminal/TermWindow.cpp
===================================================================
--- haiku/trunk/src/apps/terminal/TermWindow.cpp        2009-11-08 08:06:03 UTC 
(rev 33944)
+++ haiku/trunk/src/apps/terminal/TermWindow.cpp        2009-11-08 11:47:04 UTC 
(rev 33945)
@@ -338,14 +338,18 @@
 void
 TermWindow::_GetPreferredFont(BFont &font)
 {
+       // Default to be_fixed_font
+       font = be_fixed_font;
+       
        const char *family = 
PrefHandler::Default()->getString(PREF_HALF_FONT_FAMILY);
-
-       font.SetFamilyAndStyle(family, NULL);
+       const char *style = 
PrefHandler::Default()->getString(PREF_HALF_FONT_STYLE);
+       
+       font.SetFamilyAndStyle(family, style);
+                       
        float size = PrefHandler::Default()->getFloat(PREF_HALF_FONT_SIZE);
        if (size < 6.0f)
                size = 6.0f;
        font.SetSize(size);
-       font.SetSpacing(B_FIXED_SPACING);
 }
 
 
@@ -614,7 +618,6 @@
                case kIncreaseFontSize:
                case kDecreaseFontSize:
                {
-                       message->PrintToStream();
                        TermView *view = _ActiveTermView();
                        BFont font;
                        view->GetTermFont(&font);


Other related posts:

  • » [haiku-commits] r33945 - haiku/trunk/src/apps/terminal - stefano . ceccherini