APPROVE COMMIT
NOTE: This patch has been committed.
xwem patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: utils/xwem-osd.el
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xwem/ChangeLog,v
retrieving revision 1.53
diff -u -U0 -r1.53 ChangeLog
--- ChangeLog 2 Dec 2004 23:09:29 -0000 1.53
+++ ChangeLog 3 Dec 2004 05:31:43 -0000
@@ -0,0 +1,4 @@
+2004-12-03 Steve Youngs <steve(a)youngs.au.com>
+
+ * utils/xwem-osd.el: Update my commented example OSD.
+
Index: utils/xwem-osd.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xwem/utils/xwem-osd.el,v
retrieving revision 1.1
diff -u -u -r1.1 xwem-osd.el
--- utils/xwem-osd.el 29 Nov 2004 20:42:26 -0000 1.1
+++ utils/xwem-osd.el 3 Dec 2004 05:31:30 -0000
@@ -732,42 +732,77 @@
;; (xwem-osd-destroy mosd)
-;; Here is example from Steve Youngs <sryoungs(a)bigpond.net.au> to
+;; Here is example from Steve Youngs <steve(a)xwem.org> to
;; display date using OSD:
-;; (defvar sy-osd-date ni)
-;; (copy-face 'default 'sy-osd-date-face)
-;; (set-face-foreground 'sy-osd-date-face "cyan")
-;;
-;; (defun sy-update-osd-date-maybe (&optional force-update)
-;; (let* ((now (decode-time))
-;; (cur-hour (nth 2 now))
-;; (cur-min (nth 1 now))
-;; (cur-comp-time (+ (* cur-hour 60) cur-min)))
-;; (when (or force-update (= 0 cur-comp-time))
-;; (xwem-osd-text sy-osd (format-time-string "%a, %b%e")))))
-;;
-;; (defun sy-show-date-osd ()
-;; (let* ((fromleft 830)
-;; (fromtop 740)
-;; (face `sy-osd-face)
-;; (xwem-osd-always-ontop t)) ; Force date to be always ontop
-;; (setq sy-osd (xwem-osd-create (xwem-dpy) fromleft fromtop 400 200))
-;; (xwem-osd-set-color sy-osd (face-foreground-name face))
-;; (xwem-osd-set-font sy-osd (face-font-name face))
-;; (sy-update-osd-date-maybe t)
-;; (xwem-osd-show sy-osd)
-;;
-;; (start-itimer "sy-osd-date-itimer"
-;; 'sy-update-osd-date-maybe
-;; 60 60)))
-;;
-;; (defun sy-destroy-date-osd ()
-;; (delete-itimer "sy-osd-date-itimer")
-;; (when (xwem-osd-p sy-osd)
-;; (xwem-osd-destroy sy-osd)))
-;;
-;; (add-hook 'xwem-after-init-hook 'sy-show-date-osd)
+;; (require 'xwem-osd)
+;; (defvar sy-osd-date nil)
+;; (copy-face 'default 'sy-osd-date-face)
+;; (set-face-foreground 'sy-osd-date-face "blanchedalmond")
+
+;; (defvar sy-osd-date-keymap
+;; (let ((map (make-sparse-keymap 'sy-osd-date-keymap)))
+;; (define-key map [button3] '(lambda () (interactive) (calendar)))
+;; map)
+;; "Keymap for date OSD.")
+
+;; (defun sy-show-date-osd ()
+;; "*Display the current date using OSD."
+;; (interactive)
+;; (let* ((face `sy-osd-date-face)
+;; (text (format-time-string "%a, %b %e"))
+;; (width (+ 3 (X-Text-width
+;; (xwem-dpy)
+;; (X-Font-get (xwem-dpy)
+;; (face-font-name face))
+;; text)))
+;; (height (+ 3 (X-Text-height
+;; (xwem-dpy)
+;; (X-Font-get (xwem-dpy)
+;; (face-font-name face))
+;; text))))
+;; (setq sy-osd-date (xwem-osd-create-dock
+;; (xwem-dpy)
+;; width
+;; height
+;; (list 'keymap sy-osd-date-keymap)))
+;; (xwem-osd-set-color sy-osd-date (face-foreground-name face))
+;; (xwem-osd-set-font sy-osd-date (face-font-name face))
+;; (xwem-osd-text sy-osd-date text)
+;; (xwem-osd-show sy-osd-date)))
+
+;; (defun sy-update-osd-date-maybe (&optional force)
+;; "Update the OSD date at midnight.
+
+;; Optional Argument FORCE means to update the date now."
+;; (let* ((now (decode-time))
+;; (cur-hour (nth 2 now))
+;; (cur-min (nth 1 now))
+;; (cur-comp-time (+ (* cur-hour 60) cur-min)))
+;; (when (or force (= 0 cur-comp-time))
+;; (when (xwem-osd-p sy-osd-date)
+;; (xwem-osd-text sy-osd-date (format-time-string "%a, %b %e"))))))
+
+;; (defun sy-update-osd-date ()
+;; "*Force update of the OSD date."
+;; (interactive)
+;; (when (xwem-osd-p sy-osd-date)
+;; (sy-update-osd-date-maybe t)))
+
+;; (defun sy-delete-osd-date ()
+;; "*Delete the OSD date."
+;; (interactive)
+;; (when (xwem-osd-p sy-osd-date)
+;; (when (itimerp "sy-osd-date-itimer")
+;; (delete-itimer "sy-osd-date-itimer"))
+;; (xwem-osd-destroy sy-osd-date)))
+
+;; (add-hook 'xwem-after-init-hook (lambda ()
+;; (progn
+;; (sy-show-date-osd)
+;; (start-itimer "sy-osd-date-itimer"
+;; 'sy-update-osd-date-maybe
+;; 60 60))))
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| XEmacs - The only _______ you'll ever need. |
| Fill in the blank, yes, it's THAT good! |
|----------------------------------<steve(a)youngs.au.com>---|
Show replies by date