themes, customization and :depends



Hi,

I'm developing a theme for sawfish (called GEX), which I would like to
extend with some custom-variables. The variables aren't the problem, but
the dependency between some of this variables. I would like to express
something like this:

if (the option-box gex:theme has the value 'custom) then
   (activate the color-selection widget gex:active-from-color)
else
   (deactivate the color-selection widget gex:active-from-color)

Does anyone understand this strange description and is able to help me?

(defgroup gex "GEX Theme"
  :group appearance)

(defcustom gex:active-from-color (get-color "#31a046295745")
  "`From' color of active frames."
  :type color
  :group (appearance gex)
  :user-level novice
  :depends ????                         <-- Can I do something with
                                            this option?
  :after-set after-setting-frame-option)

(defcustom gex:theme 'bluish
  "Predefined theme for gradients"
  :type symbol
  :options (bluish fire custom)
  :group (appearance gex)
  :user-level novice
  :after-set (lambda ()
		 (cond ((eq gex:theme 'bluish)
			(custom-set-variable gex:active-from-color
					     (get-color "#31a046295745"))
			(custom-set-variable gex:active-to-color
					     (get-color "#92cabc03d934"))
			(custom-set-variable gex:normal-from-color
					     (get-color "#b8feb500a8f4"))
			(custom-set-variable gex:normal-to-color
					     (get-color "#d998d9fed9fe")))
		       ((eq gex:theme 'fire)
			(custom-set-variable gex:active-from-color
					     (get-color "#ee8a07040704"))
			(custom-set-variable gex:active-to-color
					     (get-color "#ffffe4120000"))
			(custom-set-variable gex:normal-from-color
					     (get-color "#b8feb500a8f4"))
			(custom-set-variable gex:normal-to-color
					     (get-color "#d993d9f9d997")))
		       )
		 (after-setting-frame-option)))

crunchy
 

-- 
I just forgot my whole philosophy of life!!!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]