Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [T-Merge patch] syncing code for views

Project highlights: :. Download .: :. Support .: :. FAQ .: :. Translations .: :. Donate .: :. Report Bug .:

tortoisesvn
Discussion topic

Hide all messages in topic

All messages in topic

Re: [T-Merge patch] syncing code for views

Author steveking
Full name Stefan Küng
Date 2011-04-05 11:03:39 PDT
Message On 04.04.2011 22:57, Oto BREZINA wrote:
> Theme of patch: syncing code of BottomView.cpp, LeftView.cpp,
> RightView.cpp for later refactor common part to (BaseView.cpp)
>
> popup.AppendMenu(
> UINT nFlags,
> UINT_PTR nIDNewItem = 0,
> LPCTSTR lpszNewItem = NULL )
>
> 1. Is there any real gain to do not use nIDNewItem same value as IDS ?

That depends on whether we trust the optimizations of the compiler :)
If we use the IDS values, then the switch() could take up a lot of space
since those values are not continuous or even in the same value range.
Sure, we could edit the resource.h file manually to make sure those IDS
values are as we would like them, but I don't like messing with
generated files.

http://en.wikipedia.​org/wiki/Switch_stat​ement
"To optimize a switch statement, the programmer must use a very compact
range of possible values to test."

> 2. Is there plan to support icons there? let say, same like in main
> menu? not worth much but nice :)

Good idea.

> 3. hope you are fine with virtual functions

Sure, as you might have seen, we use those in some places already :)

Stefan

--
        ___
   oo // \\ "De Chelonian Mobile"
  (_,\/ \_/ \ TortoiseSVN
    \ \_/_\_/> The coolest Interface to (Sub)Version Control
    /_/ \_\ http://tortoisesvn.net

[T-Merge patch] syncing code for views

Author otik
Full name Oto BREZINA
Date 2011-04-04 13:57:21 PDT
Message Theme of patch: syncing code of BottomView.cpp, LeftView.cpp,
RightView.cpp for later refactor common part to (BaseView.cpp)

popup.AppendMenu(
     UINT nFlags,
     UINT_PTR nIDNewItem = 0,
     LPCTSTR lpszNewItem = NULL )

1. Is there any real gain to do not use nIDNewItem same value as IDS ?
2. Is there plan to support icons there? let say, same like in main
menu? not worth much but nice :)
3. hope you are fine with virtual functions

--
Oto BREZINA, Printflow s.r.o., EU
Attachments
Page: of 2 « Previous | Next »
Messages per page: