[sawfish] moved display-workspace-name to workspace.jl
- From: Christopher Bratusek <chrisb src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [sawfish] moved display-workspace-name to workspace.jl
- Date: Sat, 19 Sep 2009 10:55:05 +0000 (UTC)
commit 855597b0c0f9de8c7d358892c99c5438077753b8
Author: chrisb <zanghar freenet de>
Date: Sat Sep 19 12:53:55 2009 +0200
moved display-workspace-name to workspace.jl
ChangeLog | 6 +++++-
lisp/sawfish/wm/commands/user.jl | 31 ++-----------------------------
lisp/sawfish/wm/workspace.jl | 35 +++++++++++++++++++++++++++++++++--
3 files changed, 40 insertions(+), 32 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 72e4374..38288e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
+2009-09-19 Christopher Bratusek <zanghar freenet de>
+ * lisp/sawfish/wm/commands/user.jl
+ * lisp/sawfish/wm/workspace.jl: move display-workspace-name & helpers to workspace.jl
+
2009-09-15 Christopher Bratusek <zanghar freenet de>
- * lisp/sawfish/wm/util/prompt-extras: fixed a newly introduced bug [Matthew Love]
+ * lisp/sawfish/wm/util/prompt-extras.jl: fixed a newly introduced bug [Matthew Love]
* man/sawfish.texi: added section to info file [Luis Rodrigo Gallardo Cruz]
diff --git a/lisp/sawfish/wm/commands/user.jl b/lisp/sawfish/wm/commands/user.jl
index 4062d9c..0c6911a 100644
--- a/lisp/sawfish/wm/commands/user.jl
+++ b/lisp/sawfish/wm/commands/user.jl
@@ -28,8 +28,7 @@
some
display-message-with-timeout
program-available
- view-clipboard
- display-workspace-name)
+ view-clipboard)
(open rep
rep.system
@@ -112,33 +111,7 @@
(display-message-with-timeout (format nil "%s ..."
(substring c 0 clipboard-preview-clip-length)) clipboard-preview-timeout)))))
- (defcustom display-ws-name-on-switch nil
- "Wether to display workspace name upon switch"
- :type boolean
- :group workspace
- :after-set (lambda () (display-ws-name-setter)))
-
- (defcustom display-ws-name-timeout 3
- "How long to display workspace name"
- :type number
- :group workspace)
-
- ;; display-workspace-name
- ;; display WS name on switch
- (define (display-workspace-name)
- (display-message-with-timeout
- (format nil "Now on Workspace: %s"
- (or (nth current-workspace workspace-names)
- (format nil (_ "Workspace %d") (1+ current-workspace))))
- display-ws-name-timeout))
-
- (define (display-ws-name-setter)
- (if (eq display-ws-name-on-switch 't)
- (add-hook 'enter-workspace-hook display-workspace-name)
- (remove-hook 'enter-workspace-hook display-workspace-name)))
-
;;###autoload
(define-command 'xterm xterm #:class 'default)
(define-command 'browser browser #:class 'default)
- (define-command 'view-clipboard view-clipboard #:class 'default)
- (define-command 'display-workspace-name display-workspace-name #:class 'default))
+ (define-command 'view-clipboard view-clipboard #:class 'default))
diff --git a/lisp/sawfish/wm/workspace.jl b/lisp/sawfish/wm/workspace.jl
index 9749451..97e1fde 100644
--- a/lisp/sawfish/wm/workspace.jl
+++ b/lisp/sawfish/wm/workspace.jl
@@ -102,6 +102,7 @@
show-desktop
hide-desktop
showing-desktop-p
+ display-workspace-name
;; XXX rename these..?
ws-remove-window
@@ -115,7 +116,8 @@
sawfish.wm.events
sawfish.wm.commands
sawfish.wm.custom
- sawfish.wm.session.init)
+ sawfish.wm.session.init
+ sawfish.wm.commands.user)
;;; Options and variables
@@ -185,7 +187,7 @@
;; property. `swapped-in' is a workspace id defining which of the
;; window's configurations is stored in the window itself (as if there
;; was no swapping). The `swapped' property is an alist associating
- ;; workspace ids with an alist of swapped attributes
+ ;; workspace ids with an alist of swapped attributes
;; this doesn't need to be called explicitly for every switch, just to
;; fork the data
@@ -951,6 +953,35 @@ last instance remaining, then delete the actual window."
(setq last-interesting-workspace nil)
(call-hook 'workspace-state-change-hook))
+;;; Extras
+
+ (defcustom display-ws-name-on-switch nil
+ "Wether to display workspace name upon switch"
+ :type boolean
+ :group workspace
+ :after-set (lambda () (display-ws-name-setter)))
+
+ (defcustom display-ws-name-timeout 3
+ "How long to display workspace name"
+ :type number
+ :group workspace)
+
+ ;; display-workspace-name
+ ;; display WS name on switch
+ (define (display-workspace-name)
+ (display-message-with-timeout
+ (format nil "Now on Workspace: %s"
+ (or (nth current-workspace workspace-names)
+ (format nil (_ "Workspace %d") (1+ current-workspace))))
+ display-ws-name-timeout))
+
+ (define (display-ws-name-setter)
+ (if (eq display-ws-name-on-switch 't)
+ (add-hook 'enter-workspace-hook display-workspace-name)
+ (remove-hook 'enter-workspace-hook display-workspace-name)))
+
+ (define-command 'display-workspace-name display-workspace-name #:class 'default)
+
;;; Initialisation
(sm-add-saved-properties 'sticky 'iconified 'fixed-position)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]