Ticket #7275: tv-about-update.patch

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

About box update for the TV application

  • src/apps/tv/MainWin.cpp

     
    4040#include <PopUpMenu.h>
    4141#include <Screen.h>
    4242#include <String.h>
     43#include <TextView.h>
    4344#include <View.h>
    4445
    4546
     
    12411242                alertStr << B_TRANSLATE("\nVersion ");
    12421243                alertStr << VERSION;
    12431244                alertStr << B_TRANSLATE("\nRevision ");
    1244                 if (strcmp(REVISION, "unknown") == 0)
     1245                if (strncmp(REVISION, "unknown", sizeof("unknown")) == 0)
    12451246                    alertStr << fLocalizedRevision;
    12461247                else
    12471248                    alertStr << REVISION;
    12481249                alertStr << B_TRANSLATE("\nBuild ");
    12491250                alertStr << BUILD;
     1251                alertStr << "\n";
    12501252           
    12511253                BAlert *alert;
    1252                 alert = new BAlert("about", alertStr.String(), B_TRANSLATE("OK"));
     1254                alert = new BAlert(B_TRANSLATE("About"), alertStr.String(),
     1255                    B_TRANSLATE("OK"));
     1256                BTextView* view = alert->TextView();
     1257                BFont font;
     1258               
     1259                view->SetStylable(true);
     1260               
     1261                view->GetFont(&font);
     1262                font.SetSize(18);
     1263                font.SetFace(B_BOLD_FACE);
     1264                view->SetFontAndColor(0, strlen(fLocalizedName), &font);
    12531265                if (fAlwaysOnTop) {
    12541266                    ToggleAlwaysOnTop();
    12551267                    alert->Go();