[haiku-bugs] Re: [Haiku] #7238: A Processcontroller About box font fix

  • From: "siarzhuk" <trac@xxxxxxxxxxxx>
  • Date: Fri, 18 Feb 2011 05:55:10 -0000

#7238: A Processcontroller About box font fix
-------------------------------------+-------------------------------------
  Reporter:  Karvjorm                |        Owner:  nobody
      Type:  bug                     |       Status:  new
  Priority:  normal                  |    Milestone:  R1
 Component:                          |      Version:  R1/alpha2
  Applications/ProcessController     |     Keywords:  Processcontroller
Resolution:                          |  localization
Blocked By:                          |  Has a Patch:  1
  Platform:  All                     |     Blocking:
-------------------------------------+-------------------------------------

Comment (by siarzhuk):

 {{{
         BString str1(B_TRANSLATE("ProcessController"));
         BAlert *alert = new BAlert(B_TRANSLATE("about"),
                 B_TRANSLATE("ProcessController\n\n"
                             "Copyright 1997-2001,\n"
 }}}

 Some remarks:[[BR]]

 1) Variable names must be descriptive - this is the requirement of our
 coding guidelines. I found "str1" is not a descriptive one. May be
 "appName", "title", "name" make your code a bit better?[[BR]]
 2) There is [theoretical] possibility to break the font style selection by
 translating first line differently than the beginning of the second line.
 So I preferred for my syslog_daemon changes using additional snprintf
 parameter during composing the Alert text. But, this one is not the case,
 I think - adding additional formatting call will make the code a bit
 complicate so actual version looks OK in this place. This is just for your
 information. ;-)

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/7238#comment:3>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: