CarterA / Tribo

Extremely fast static site generator written in Objective-C
http://cartera.me/2011/10/16/made-on-a-mac/
Other
42 stars 6 forks source link

Remove contextual menu when right clicking on non-post rows in the posts view. #38

Open Tanner opened 11 years ago

Tanner commented 11 years ago

The actual cause of the crash is when "Edit Post" is clicked. However, none of the menu items apply to an empty row, thus don't bother showing the menu.

No further code added other than making TBPostsViewController a NSMenuDelegate and handling menuNeedsUpdate.

I'm unsure if hiding all the items is the "correct" solution, but it works.

CarterA commented 11 years ago

This looks good, but I'd appreciate it if you would remove the extra whitespace in the method you added. See my note on your other recent PR for details.

Tanner commented 11 years ago

No problemo! I removed some whitespace. I am unsure if the coding style for single line conditionals/loops in relation for braces (same line, separate line, none if only one line, etc…). Let me know what style you would like and I can make the appropriate changes (if any).

GeorgeWS commented 11 years ago

Sounds like it's time for @CarterA to write a coding style guide! Too bad he's not the kind of person who would enjoy writing a coding style guide.

...Wait.