[sawfish] remove stock-button function from stock.jl use gtk-button-new-from-stock directly instead
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] remove stock-button function from stock.jl use gtk-button-new-from-stock directly instead
- Date: Sat, 18 Sep 2010 20:41:09 +0000 (UTC)
commit 00b76509e6534ba668f22d950e2e39e044a6aa95
Author: Christopher Roy Bratusek <zanghar freenet de>
Date: Sat Sep 18 22:34:48 2010 +0200
remove stock-button function from stock.jl
use gtk-button-new-from-stock directly instead
lisp/sawfish/cfg/shell.jl | 7 +++----
lisp/sawfish/gtk/stock.jl | 22 ++++------------------
2 files changed, 7 insertions(+), 22 deletions(-)
---
diff --git a/lisp/sawfish/cfg/shell.jl b/lisp/sawfish/cfg/shell.jl
index 7617871..ae1714d 100644
--- a/lisp/sawfish/cfg/shell.jl
+++ b/lisp/sawfish/cfg/shell.jl
@@ -29,7 +29,6 @@
rep.io.files
rep.io.streams
rep.io.timers
- sawfish.gtk.stock
sawfish.gtk.widget
sawfish.cfg.i18n
sawfish.cfg.group
@@ -97,8 +96,8 @@
(gtk-container-add vbox (or s-scroller slot-box-widget))))
(unless socket-id
- (setq ok-widget (stock-button 'close))
- (setq revert-widget (stock-button 'revert))
+ (setq ok-widget (gtk-button-new-from-stock "gtk-close"))
+ (setq revert-widget (gtk-button-new-from-stock "gtk-undo"))
(gtk-window-set-title main-window (_ "Sawfish Configurator"))
(gtk-widget-set-name main-window (_ "Sawfish Configurator"))
(gtk-window-set-wmclass main-window "sawfish-configurator"
@@ -268,7 +267,7 @@
(let ((window (gtk-window-new 'toplevel))
(vbox (gtk-vbox-new nil box-spacing))
(label (gtk-label-new "Sawfish's configurator needs a running Sawfish. Aborting."))
- (button (stock-button 'ok))
+ (button (gtk-button-new-from-stock "gtk-ok"))
(func (lambda () (throw 'quit 1))))
(gtk-window-set-title window "SawfishConfig error")
(gtk-window-set-icon-name window "gtk-info")
diff --git a/lisp/sawfish/gtk/stock.jl b/lisp/sawfish/gtk/stock.jl
index 0f480c0..ff8fc9f 100644
--- a/lisp/sawfish/gtk/stock.jl
+++ b/lisp/sawfish/gtk/stock.jl
@@ -22,35 +22,21 @@
;; it had been called "lisp/sawfish/gtk/stock.jl.gtk".
;; Re-added in the commit ce7e6c.
-(define-structure sawfish.gtk.stock
+(define-structure sawfish.gtk.simple-dialog
- (export stock-button
- simple-dialog)
+ (export simple-dialog)
(open rep
gui.gtk-2.gtk
sawfish.gtk.widget)
- ;; same as in gnome now
- (define (stock-button type)
- (gtk-button-new-from-stock
- (case type
- ((ok) "gtk-ok")
- ((cancel) "gtk-cancel")
- ((revert) "gtk-revert-to-saved")
- ((apply) "gtk-apply")
- ((yes) "gtk-yes")
- ((no) "gtk-no")
- ((close) "gtk-close")
- ((help) "gtk-help"))))
-
(define (simple-dialog title widget #!optional ok-callback main-window)
(let ((window (gtk-window-new 'toplevel))
(vbox (gtk-vbox-new nil box-spacing))
(hbbox (gtk-hbutton-box-new))
- (ok (stock-button 'ok))
- (cancel (and ok-callback (stock-button 'cancel))))
+ (ok (gtk-button-new-from-stock "gtk-ok"))
+ (cancel (and ok-callback (gtk-button-new-from-stock "gtk-cancel"))))
(define (on-cancel)
(gtk-widget-destroy window))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]