Ticket #7275: deskcalc-about-update.patch

File deskcalc-about-update.patch, 1.6 KB (added by Karvjorm, 13 years ago)

An updated About box update for the DeskCalc application

  • src/apps/deskcalc/CalcApplication.cpp

     
    155155    return ret;
    156156}
    157157
    158 
  • src/apps/deskcalc/CalcView.cpp

     
    3535#include <PopUpMenu.h>
    3636#include <Region.h>
    3737#include <Roster.h>
     38#include <TextView.h>
    3839
    3940#include <ExpressionParser.h>
    4041
     
    685686void
    686687CalcView::AboutRequested()
    687688{
    688     BAlert* alert = new BAlert(B_TRANSLATE("about"),B_TRANSLATE(
    689         "DeskCalc v2.1.0\n\n"
    690         "written by Timothy Wayper,\nStephan Aßmus and Ingo Weinhold\n\n"
     689    BString alertText(B_TRANSLATE("DeskCalc"));
     690    int32 titleLength = alertText.Length();
     691    alertText << "\n\n";
     692    alertText << B_TRANSLATE("Version");
     693    alertText << " 2.1.0\n\n";
     694    alertText << B_TRANSLATE("Written by Timothy Wayper,\n"
     695        "Stephan Aßmus and Ingo Weinhold\n\n"
    691696        B_UTF8_COPYRIGHT "1997, 1998 R3 Software Ltd.\n"
    692         B_UTF8_COPYRIGHT "2006-2009 Haiku, Inc.\n\n"
    693         "All Rights Reserved."), "OK");
     697        B_UTF8_COPYRIGHT "2006-2011 Haiku, Inc.\n\n"
     698        "All Rights Reserved.\n");
     699    BAlert* alert = new BAlert(B_TRANSLATE("About"), alertText.String(),
     700        B_TRANSLATE("OK"));
     701    BTextView* view = alert->TextView();
     702    BFont font;
     703           
     704    view->SetStylable(true);
     705           
     706    view->GetFont(&font);
     707    font.SetSize(18);
     708    font.SetFace(B_BOLD_FACE);
     709    view->SetFontAndColor(0, titleLength, &font);
     710
    694711    alert->Go(NULL);
    695712}
    696713