Re: toggle-or-exec added to 1.7.0



> > (...)
> 
> I know. Window-Rules UI is not perfect, we should use plain checkbuttons rather than
> checkbutton + button with ugly label. I'll check this.
> 

attached is a "half" patch. There are still two widgets, but the yes-no confusion is gone.
diff --git a/lisp/sawfish/gtk/widgets/scheme-boolean.jl b/lisp/sawfish/gtk/widgets/scheme-boolean.jl
index 47da6bc..ca6ae18 100644
--- a/lisp/sawfish/gtk/widgets/scheme-boolean.jl
+++ b/lisp/sawfish/gtk/widgets/scheme-boolean.jl
@@ -28,17 +28,12 @@
           sawfish.gtk.widget-dialog)
 
   (define (make-item changed-callback)
-    (let ((widget (gtk-toggle-button-new-with-label (_ "Yes"))))
-      (define (update-label)
-	(gtk-label-set-text (car (gtk-container-get-children widget))
-			    (if (gtk-toggle-button-get-active widget)
-				(_ "Yes") (_ "No"))))
+    (let ((widget (gtk-toggle-button-new-with-label (_ "Enable"))))
       (gtk-label-set-justify (car (gtk-container-get-children widget)) 'left)
       (gtk-toggle-button-set-active widget t)
       (g-signal-connect
        widget "toggled"
        (lambda ()
-	 (update-label)
 	 (when changed-callback
 	   (call-callback changed-callback))))
       (gtk-widget-show widget)


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