[haiku-commits] Re: haiku: hrev47180 - src/apps/showimage

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 29 Apr 2014 09:22:47 +0200 (CEST)

> On April 28, 2014 at 10:04 PM pulkomandy@xxxxxxxxxxxxx wrote:
> 554e207: ShowImage: add feature to force original size.

Looks good now, AFAICT.

>               case kMsgOriginalSize:
> +                     if (message->FindInt32("behavior") ==
> BButton::B_TOGGLE_BEHAVIOR)
> +                     {

Coding style.

> +                             bool force = message->FindInt32("be:value");

bool == int?

> +class LockableButton: public BButton
> +{
> +public:
> +     LockableButton(const char* name, const char* label, BMessage* message);
> +
> +     void MouseDown(BPoint point);
> +};

Coding style (parenthesis, indentation).
We really don't have a toggle button? That is somewhat incredible.

> +LockableButton::LockableButton(const char* name, const char* label,
> +     BMessage* message)
> +     : BButton(name, label, message)

Coding style.

> +     if (modifiers() & B_SHIFT_KEY || Value() == B_CONTROL_ON)

Coding style ((m & B) != 0)).

Bye,
   Axel.

Other related posts: