[haiku-bugs] Re: [Haiku] #7002: Context menu for TextInput

  • From: "stippi" <trac@xxxxxxxxxxxx>
  • Date: Sat, 25 Dec 2010 10:38:09 -0000

#7002: Context menu for TextInput
--------------------------+------------------------------------------------
  Reporter:  dancxjo      |        Owner:  axeld
      Type:  enhancement  |       Status:  new
  Priority:  normal       |    Milestone:  R1
 Component:               |      Version:  R1/Development
  Kits/Interface Kit      |     Keywords:  context menu text edit textinput
Resolution:               |  Has a Patch:  1
Blocked By:               |     Blocking:
  Platform:  All          |
--------------------------+------------------------------------------------

Comment (by stippi):

 The patch looks pretty clean now, however, there are some style violations
 with regards to variable declaration:

 Wrong:
 {{{
     if (buttons == B_SECONDARY_MOUSE_BUTTON) {
         undo_state state;
         bool isRedo, isUndo;
         state = UndoState(&isRedo);
         isUndo = state != B_UNDO_UNAVAILABLE && !isRedo;

         int32 start, finish;
         GetSelection(&start, &finish);
 }}}

 Correct:
 {{{
     if (buttons == B_SECONDARY_MOUSE_BUTTON) {
         bool isRedo;
         undo_state state = UndoState(&isRedo);
         bool isUndo = state != B_UNDO_UNAVAILABLE && !isRedo;

         int32 start;
         int32 finish;
         GetSelection(&start, &finish);
 }}}

 Thanks a lot for your work, hope you don't mind the picky reviews... :-)

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

Other related posts: