Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Buttons got their name tag back.

  • Loading branch information...
commit e6a72f06befbbe7a824e2bebce2e4cb3a4442808 1 parent 1a1c9b9
Heinz N. Gies authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 src/clj_swing/button.clj
6 src/clj_swing/button.clj
@@ -6,11 +6,11 @@
6 6 (def *button-icon-keys*
7 7 [:icon :disabled-icon :selected-icon :pressed-icon :disabled-selected-icon :rollover-icon :rollover-selected-icon ])
8 8 (def *button-known-keys*
9   - (concat [:action :caption] *button-icon-keys*))
  9 + (concat [:action :caption :name] *button-icon-keys*))
10 10
11 11
12   -(defmacro general-button [cl {caption :caption action :action :as opts}]
13   - (let [b (gensym "btn")]
  12 +(defmacro general-button [cl {caption :caption action :action name :name :as opts}]
  13 + (let [b (or name (gensym "btn"))]
14 14 `(let [~b (new ~cl)]
15 15 (doto ~b
16 16 ~@(if caption

0 comments on commit e6a72f0

Please sign in to comment.
Something went wrong with that request. Please try again.