Browse files

Buttons got their name tag back.

  • Loading branch information...
1 parent 1a1c9b9 commit e6a72f06befbbe7a824e2bebce2e4cb3a4442808 @Licenser committed May 1, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/clj_swing/button.clj
6 src/clj_swing/button.clj
@@ -6,11 +6,11 @@
(def *button-icon-keys*
[:icon :disabled-icon :selected-icon :pressed-icon :disabled-selected-icon :rollover-icon :rollover-selected-icon ])
(def *button-known-keys*
- (concat [:action :caption] *button-icon-keys*))
+ (concat [:action :caption :name] *button-icon-keys*))
-(defmacro general-button [cl {caption :caption action :action :as opts}]
- (let [b (gensym "btn")]
+(defmacro general-button [cl {caption :caption action :action name :name :as opts}]
+ (let [b (or name (gensym "btn"))]
`(let [~b (new ~cl)]
(doto ~b
~@(if caption

0 comments on commit e6a72f0

Please sign in to comment.