sawfish r4358 - in trunk: . lisp/sawfish/gtk lisp/sawfish/ui lisp/sawfish/ui/widgets lisp/sawfish/wm/gnome lisp/sawfish/wm/util man
- From: chrisb svn gnome org
- To: svn-commits-list gnome org
- Subject: sawfish r4358 - in trunk: . lisp/sawfish/gtk lisp/sawfish/ui lisp/sawfish/ui/widgets lisp/sawfish/wm/gnome lisp/sawfish/wm/util man
- Date: Thu, 1 Jan 2009 20:15:21 +0000 (UTC)
Author: chrisb
Date: Thu Jan 1 20:15:21 2009
New Revision: 4358
URL: http://svn.gnome.org/viewvc/sawfish?rev=4358&view=rev
Log:
drop libgnome|gnomeui|canvas widgets, use pure gtk instead
Removed:
trunk/lisp/sawfish/gtk/stock.jl.gnome
trunk/lisp/sawfish/gtk/stock.jl.gtk
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/lisp/sawfish/gtk/Makefile.in
trunk/lisp/sawfish/ui/Makefile.in
trunk/lisp/sawfish/ui/widgets/icon.jl
trunk/lisp/sawfish/ui/widgets/workspace-geometry.jl
trunk/lisp/sawfish/wm/gnome/menus.jl
trunk/lisp/sawfish/wm/util/display-wininfo.jl
trunk/man/news.texi
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Thu Jan 1 20:15:21 2009
@@ -210,28 +210,6 @@
,AC_MSG_ERROR([can't locate esound]))
fi
-dnl XXX Deprecated
-dnl Check for libgnome|gnomeui|gnomecanvas
-
-AC_ARG_ENABLE(gnome-widgets,
- [ --enable-gnome-widgets Use GNOME widgets in places [default]
- --disable-gnome-widgets Don't use GNOME widgets], [], [enable_gnome_widgets=no])
-
-if test "$enable_gnome_widgets" != "no"; then
- AC_MSG_CHECKING([for rep-gtk GNOME wrappers])
- if REP_GTK_DONT_INITIALIZE=1 rep --batch -l gui.gtk-2.gnome-ui 2>&5; then
- AC_MSG_RESULT([yes])
- REP_GTK_GNOME=yes
- else
- AC_MSG_RESULT([no])
- REP_GTK_GNOME=no
- AC_MSG_WARN([Can't load rep's gnome wrappers])
- fi
-else
- REP_GTK_GNOME=no
-fi
-AC_SUBST(REP_GTK_GNOME)
-
dnl Check for Doug Lea's malloc in libc
doug_lea_malloc=yes
AC_CHECK_FUNC(malloc_get_state, , doug_lea_malloc=no)
Modified: trunk/lisp/sawfish/gtk/Makefile.in
==============================================================================
--- trunk/lisp/sawfish/gtk/Makefile.in (original)
+++ trunk/lisp/sawfish/gtk/Makefile.in Thu Jan 1 20:15:21 2009
@@ -27,7 +27,6 @@
srcdir= srcdir@
VPATH= srcdir@:@top_srcdir@
-REP_GTK_GNOME= REP_GTK_GNOME@
REP_ENVIRON:=$(REP_ENVIRON) REP_LOAD_PATH=$(top_srcdir)/lisp
SRCS := color-preview.jl \
@@ -51,20 +50,11 @@
ALL_SRCS := $(SRCS) $(W_SRCS)
ALL_OBJS := $(OBJS) $(W_OBJS)
-ifeq ($(REP_GTK_GNOME),yes)
-STOCK_SRC := stock.jl.gnome
-else
-STOCK_SRC := stock.jl.gtk
-endif
-
%.jlc : %.jl
$(REP_ENVIRON) rep compiler -f compile-batch $<
all : $(ALL_SRCS) $(ALL_OBJS)
-stock.jl : $(STOCK_SRC) ./Makefile
- cp $< $@
-
install : all installdirs
set -e; for p in $(SRCS) $(OBJS); do \
$(INSTALL_DATA) $$p $(DESTDIR)${lispdir}/sawfish/gtk; \
@@ -90,6 +80,6 @@
rm -f widgets/*~ widgets/*.jlc
realclean distclean : clean
- rm -f Makefile stock.jl
+ rm -f Makefile
.PHONY: all install uninstall clean realclean distclean
Modified: trunk/lisp/sawfish/ui/Makefile.in
==============================================================================
--- trunk/lisp/sawfish/ui/Makefile.in (original)
+++ trunk/lisp/sawfish/ui/Makefile.in Thu Jan 1 20:15:21 2009
@@ -27,15 +27,8 @@
srcdir= srcdir@
VPATH= srcdir@:@top_srcdir@
-REP_GTK_GNOME= REP_GTK_GNOME@
REP_ENVIRON:=$(REP_ENVIRON) REP_LOAD_PATH=$(top_srcdir)/lisp
-ifeq ($(REP_GTK_GNOME),yes)
- GNOME:=
-else
- GNOME:=gtk/
-endif
-
SRCS := apply.jl \
config.jl \
group.jl \
@@ -52,8 +45,8 @@
widgets/keymap.jl \
widgets/match-window.jl \
widgets/modifier-list.jl \
- widgets/$(GNOME)workspace-geometry.jl \
- widgets/$(GNOME)icon.jl
+ widgets/workspace-geometry.jl \
+ widgets/icon.jl
L_SRCS := layouts/keymaps.jl
Modified: trunk/lisp/sawfish/ui/widgets/icon.jl
==============================================================================
--- trunk/lisp/sawfish/ui/widgets/icon.jl (original)
+++ trunk/lisp/sawfish/ui/widgets/icon.jl Thu Jan 1 20:15:21 2009
@@ -1,6 +1,6 @@
#| nokogiri-widgets/icon.jl -- GNOME icon entry widget
- $Id: icon.jl,v 1.6 2003/01/12 20:30:49 jsh Exp $
+ $Id: icon.jl,v 1.1 2000/09/01 20:03:29 john Exp $
Originally written by Bruce Miller <docmad md prestige net>
@@ -21,38 +21,11 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|#
-;; GNOME version of this widget
+;; GNOME-less version of this widget
(define-structure sawfish.ui.widgets.icon ()
(open rep
- gui.gtk-2.gtk
- gui.gtk-2.gnome-ui
- rep.io.files
sawfish.gtk.widget)
- (define (make-icon-item changed-callback)
- (let* ((widget (gnome-icon-entry-new "IconEntry" (_ "Select Icon"))))
- (when changed-callback
- (g-signal-connect (gnome-icon-entry-gtk-entry widget) "changed"
- (make-signal-callback changed-callback)))
- (gtk-widget-show widget)
- (lambda (op)
- (case op
- ((set) (lambda (x)
- (if x
- (gnome-icon-entry-set-icon widget x)
- (gtk-entry-set-text
- (gnome-icon-entry-gtk-entry widget) ""))))
- ((clear) (lambda ()
- (gtk-entry-set-text
- (gnome-icon-entry-gtk-entry widget) "")))
- ((ref) (lambda ()
- (let ((file (gtk-entry-get-text
- (gnome-icon-entry-gtk-entry widget))))
- (and (file-regular-p file) file))))
- ((gtk-widget) widget)
- ((validp) (lambda (x) (and (stringp x)
- (file-exists-p x))))))))
-
- (define-widget-type 'icon make-icon-item))
+ (define-widget-type 'icon (lambda (changed) (make-widget 'file changed))))
Modified: trunk/lisp/sawfish/ui/widgets/workspace-geometry.jl
==============================================================================
--- trunk/lisp/sawfish/ui/widgets/workspace-geometry.jl (original)
+++ trunk/lisp/sawfish/ui/widgets/workspace-geometry.jl Thu Jan 1 20:15:21 2009
@@ -1,6 +1,6 @@
#| nokogiri-widgets/workspace-geometry.jl
- $Id: workspace-geometry.jl,v 1.9 2003/01/12 20:30:49 jsh Exp $
+ $Id: workspace-geometry.jl,v 1.1 2000/09/01 20:03:29 john Exp $
Copyright (C) 2000 John Harper <john dcs warwick ac uk>
@@ -21,131 +21,16 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|#
-;; GNOME version of this widget
+;; GNOME-less version of this widget
(define-structure sawfish.ui.widgets.workspace-geometry ()
(open rep
- gui.gtk-2.gtk
- gui.gtk-2.gnome-canvas
- rep.io.files
- sawfish.gtk.widget
- sawfish.ui.layout)
-
- (defconst canvas-width 100)
- (defconst canvas-height 100)
-
- (define (locate-file filename dirs)
- (let loop ((rest dirs))
- (cond ((null rest) nil)
- ((file-exists-p (expand-file-name filename (car rest)))
- (expand-file-name filename (car rest)))
- (t (loop (cdr rest))))))
-
- (define monitor-pixbuf-file
- (local-file-name (locate-file "../monitor.png" load-path)))
-
- (define monitor-pixbuf (gdk-pixbuf-new-from-file monitor-pixbuf-file))
-
- (define (make-workspace-geometry-item changed-callback #!optional doc)
- (let* ((canvas (gnome-canvas-new))
- (vbox (gtk-vbox-new nil box-spacing))
- (hbox (gtk-hbox-new nil box-spacing))
- canvas-items widget)
-
- (define (erase-canvas)
- (mapc gtk-object-destroy canvas-items)
- (setq canvas-items '()))
-
- (define (draw-line x1 y1 x2 y2)
- (let ((item (gnome-canvas-item-new (gnome-canvas-root canvas)
- 'GnomeCanvasLine
- `(points ,(list x1 y1 x2 y2)
- fill_color "black"
- line_style on-off-dash))))
- (setq canvas-items (cons item canvas-items))
- item))
-
- (define (draw-rect x1 y1 x2 y2)
- (let ((item (gnome-canvas-item-new (gnome-canvas-root canvas)
- 'GnomeCanvasRect
- (list 'x1 x1 'y1 y1
- 'x2 x2 'y2 y2
- 'fill_color "grey90"
- 'outline_color "black"))))
- (setq canvas-items (cons item canvas-items))
- item))
-
- (define (draw-image pixbuf x y)
- (let ((item (gnome-canvas-item-new (gnome-canvas-root canvas)
- 'GnomeCanvasPixbuf
- (list 'pixbuf pixbuf
- 'x x 'y y))))
- (setq canvas-items (cons item canvas-items))
- item))
-
- (define (draw-canvas)
- (let* ((dims (widget-ref widget))
- (spaces (car dims))
- (port-dims (cdr dims)))
- (let* ((space-step 10)
- (space-size (- canvas-width (* (1- spaces) space-step)))
- (x-step (floor (/ space-size (car port-dims))))
- (y-step (floor (/ space-size (cdr port-dims)))))
- (do ((i (1- spaces) (1- i)))
- ((< i 0))
- (draw-rect (* i space-step)
- (* i space-step)
- (+ (* i space-step) space-size)
- (+ (* i space-step) space-size)))
- (do ((i 1 (1+ i)))
- ((= i (car port-dims)))
- (draw-line (* i x-step) 0
- (* i x-step) space-size))
- (do ((i 1 (1+ i)))
- ((= i (cdr port-dims)))
- (draw-line 0 (* i y-step)
- space-size (* i y-step)))
- (draw-image (gdk-pixbuf-scale-simple monitor-pixbuf
- (- x-step 4) (- y-step 4)
- 'bilinear) 2 2))))
-
- (define (update-canvas)
- (erase-canvas)
- (draw-canvas))
-
- (define (changed)
- (call-callback changed-callback)
- (update-canvas))
-
- (setq widget (make-widget
- `(pair (labelled ,(_ "Workspaces:")
- (number 1))
- (pair (labelled ,(_ "Columns:") (number 1))
- (labelled ,(_ "Rows:") (number 1))) t)
- changed))
-
- (gtk-widget-set-usize canvas (+ canvas-width 10) (+ canvas-height 10))
- (gnome-canvas-set-scroll-region canvas 0 0 canvas-width canvas-height)
-
- (when doc
- (gtk-container-add vbox (make-label (remove-newlines doc))))
- (gtk-container-add vbox (widget-gtk-widget widget))
- (gtk-container-add hbox vbox)
- (gtk-container-add hbox canvas)
- (gtk-widget-show-all hbox)
- (draw-canvas)
-
- (lambda (op)
- (case op
- ((gtk-widget) hbox)
- ((set) (lambda (x)
- (widget-set widget x)
- (update-canvas)))
- ((clear) (lambda (x)
- (widget-clear widget)
- (update-canvas)))
- (t (widget op))))))
+ sawfish.gtk.widget)
- (define-widget-type 'workspace-geometry make-workspace-geometry-item)
- (widget-accepts-doc-string 'workspace-geometry))
+ (define-widget-type 'workspace-geometry
+ (lambda (changed)
+ (make-widget `(pair (labelled ,(_ "Workspaces:") (number 1))
+ (pair (labelled ,(_ "Columns:") (number 1))
+ (labelled ,(_ "Rows:") (number 1))) t)
+ changed))))
Modified: trunk/lisp/sawfish/wm/gnome/menus.jl
==============================================================================
--- trunk/lisp/sawfish/wm/gnome/menus.jl (original)
+++ trunk/lisp/sawfish/wm/gnome/menus.jl Thu Jan 1 20:15:21 2009
@@ -36,29 +36,13 @@
;;; variables
- (defvar gnome-share-directory
- ;; search $PATH for a known GNOME binary..
- (catch 'out
- (let ((path (getenv "PATH"))
- (point 0)
- end tem)
- (while (< point (length path))
- (setq end (if (string-match ":" path point)
- (match-start)
- (length path)))
- (setq tem (substring path point end))
- (when (file-exists-p (expand-file-name "gnome-session" tem))
- (throw 'out (expand-file-name "../share/gnome" tem)))
- (setq point (1+ end))))
- ;; default to /usr/share/gnome, better than nothing at all
- "/usr/share/gnome"))
-
- (defvar gnome-menu-lang (let ((lang (or (getenv "LANGUAGE")
- (getenv "LC_ALL")
+ (defvar gnome-menu-lang (let ((lang (or (getenv "LC_ALL")
(getenv "LC_MESSAGES")
(getenv "LANG")))
(all '()))
- (when (and lang (not (string= lang "en")))
+ (when (and lang (not (or (string= lang "C")
+ (string= lang "POSIX")
+ (string= lang "en"))))
(setq all (cons lang all))
(when (string-match "[ ]" lang)
(setq lang (substring lang 0 (match-start)))
@@ -69,12 +53,9 @@
all)
"List of language codes used when constructing GNOME menus.")
- (defvar gnome-menu-roots (list (expand-file-name
- "apps" gnome-share-directory)
- "/etc/X11/applnk" ;on RedHat systems
- "/usr/share/applications"
- "/var/lib/menu-xdg/applications/menu-xdg"
- "~/.gnome/apps")
+ (defvar gnome-menu-roots (list "/etc/X11/applnk" ;on RedHat systems
+ "/usr/share/applications"
+ "~/.local/share/applications")
"List of directories to read GNOME menu entries from.")
;; previously read menus
Modified: trunk/lisp/sawfish/wm/util/display-wininfo.jl
==============================================================================
--- trunk/lisp/sawfish/wm/util/display-wininfo.jl (original)
+++ trunk/lisp/sawfish/wm/util/display-wininfo.jl Thu Jan 1 20:15:21 2009
@@ -32,7 +32,9 @@
sawfish.wm.images
sawfish.wm.misc
sawfish.wm.util.x
- sawfish.wm.windows)
+ sawfish.wm.windows
+ sawfish.wm.workspace
+ )
;;; variables
@@ -42,6 +44,8 @@
(defconst icon-size (32 . 32))
+ (defvar display-wininfo-show-workspace nil)
+
;; window currently displayed, or nil
(define info-window nil)
@@ -79,8 +83,18 @@
;; Returns a list of strings describing window W in some way
(define (window-info w)
(list (concat (and (window-get w 'iconified) ?[)
- (window-name w)
- (and (window-get w 'iconified) ?]))))
+ (window-name w)
+ (and (window-get w 'iconified) ?])
+ ; potentially include the workspace where the window is
+ (if (and
+ display-wininfo-show-workspace
+ (not (window-in-workspace-p w current-workspace)))
+ (concat " <" (number->string (car (window-workspaces w))) ">")
+ ""
+ )
+ )
+ )
+ )
;;; entry point
Modified: trunk/man/news.texi
==============================================================================
--- trunk/man/news.texi (original)
+++ trunk/man/news.texi Thu Jan 1 20:15:21 2009
@@ -30,6 +30,8 @@
@item Create src/build.h, since it has been missing before [Christopher Bratusek]
@item Fixed an "unknown remote error" that might appear [Alexey I. Froloff]
+
+ item Make "make uninstall" work again [Christopher Bratusek]
@end itemize
@item New features:
@@ -69,6 +71,8 @@
@item ~/.sawmillrc has been dropped from the list of configuration files [Christopher Bratusek]
@item Reworked Sawfish-UI [Christopher Bratusek]
+
+ item Dropped libgnome|gnomeui|gnomecanvas widgets, use pure gtk instead [Christopher Bratusek]
@end itemize
@end itemize
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]