xwem-devel
[Top] [All Lists]

Summary for xwem--main--2.1--patch-5

From: Zajcev Evgeny <lg@xxxxxxxx>
Subject: Summary for xwem--main--2.1--patch-5
Date: Tue, 25 Jan 2005 02:45:33 +0300 (MSK)
Location: lg@xxxxxxxxxxxxxx http://arch.xwem.org/2005/

Revision: xwem--main--2.1--patch-5
Archive: lg@xxxxxxxxxxxxxx
Creator: Zajcev Evgeny <lg@xxxxxxxx>
Date: Tue Jan 25 02:45:28 MSK 2005
Standard-date: 2005-01-24 23:45:28 GMT
New-files: icons/.arch-ids/mini-djvu.xpm.id
    icons/mini-djvu.xpm
Modified-files: lisp/xwem-clgen.el lisp/xwem-clients.el
    lisp/xwem-icons.el lisp/xwem-keymacro.el
    lisp/xwem-manage.el lisp/xwem-minibuffer.el
New-patches: lg@xxxxxxxxxxxxxx/xwem--main--2.1--patch-5
    steve@xxxxxxxxxxxxxx/xwem--steve--2.1--patch-2
    steve@xxxxxxxxxxxxxx/xwem--steve--2.1--patch-3
Summary: merges, fixes, addons
Keywords: djvu, mozilla, generic

* lisp/xwem-clgen.el (xwem-manage-generic): [fix] proper handling of
  `xwem-clgen-activate-new' and `xwem-clgen-select-new'.

* lisp/xwem-clients.el (xwem-cl-get-uptime-1): [MERGE] New helper
  function for calculating client uptimes.  (xwem-cl-get-uptime): Use it.
  Also use a nicer output format.

  Don't autoload `subtract-time' from time-date.el, it is not needed
  anymore.  And don't define our own version of it.

* lisp/xwem-icons.el (xwem-icons-list): [addon] mini-djvu.xpm added.

* lisp/xwem-manage.el (xwem-applications-alist): [addon] djview
  added.  [fix] mozilla fixed.

* lisp/xwem-minibuffer.el (xwem-minibuffer-init): [MERGE] Typo
  fix. default-frame-plist -> default-x-frame-plist.

* icons/mini-djvu.xpm (new): [ii]

* added directories

    {arch}/xwem/xwem--steve/xwem--steve--2.1
    {arch}/xwem/xwem--steve/xwem--steve--2.1/steve@xxxxxxxxxxxxxx
    {arch}/xwem/xwem--steve/xwem--steve--2.1/steve@xxxxxxxxxxxxxx/patch-log

* added files

    icons/.arch-ids/mini-djvu.xpm.id
    icons/mini-djvu.xpm
    {arch}/xwem/xwem--main/xwem--main--2.1/lg@xxxxxxxxxxxxxx/patch-log/patch-5
    
{arch}/xwem/xwem--steve/xwem--steve--2.1/steve@xxxxxxxxxxxxxx/patch-log/patch-2
    
{arch}/xwem/xwem--steve/xwem--steve--2.1/steve@xxxxxxxxxxxxxx/patch-log/patch-3

* modified files

--- orig/lisp/xwem-clgen.el
+++ mod/lisp/xwem-clgen.el
@@ -265,13 +265,19 @@
     (if (eql (xwem-cl-get-init-state cl) X-IconicState)
         (xwem-iconify cl)
 
+      ;; Activate client in window or put it in `inactive' state.
       (when xwem-clgen-activate-new
-        (xwem-win-set-cl (xwem-cl-win cl) cl))
-      (when (and xwem-clgen-select-new
-                 (xwem-win-selected-p dwin))
+        (if (and (xwem-win-selected-p dwin)
+                 (xwem-win-cl dwin))
+            (xwem-client-change-state cl 'inactive)
+        (xwem-win-set-cl (xwem-cl-win cl) cl)))
+
+      ;; Select client
+      (when (and (xwem-win-selected-p dwin)
+                 (or xwem-clgen-select-new
+                     (eq (xwem-win-cl dwin) cl)))
         (xwem-win-set-cl (xwem-cl-win cl) cl)
-        (xwem-select-client cl)))
-    ))
+        (xwem-select-client cl)))))
 
 (defun xwem-clgen-refit (cl)
   "Refit generic client CL."


--- orig/lisp/xwem-clients.el
+++ mod/lisp/xwem-clients.el
@@ -73,7 +73,6 @@
 
 (eval-when-compile
   ;; Shutup compiler
-  (autoload 'subtract-time "time-date")
   (defvar xwem-frame-ev-mask)
   )
 
@@ -1053,8 +1052,7 @@
          (xwem-hints-wm-transient-for (xwem-cl-hints cl)))
 
     ;; Install keyboard grabs, (ARGUSED)
-    (xwem-kbd-install-grab xwem-global-map xwin)
-    ))
+    (xwem-kbd-install-grab xwem-global-map xwin)))
 
 ;;;###xwem-autoload
 (defun xwem-make-client (xwin &optional props)
@@ -1461,12 +1459,12 @@
   (let ((gmt (xwem-cl-xgeom cl)))
     (cons (X-Geom-width gmt) (X-Geom-height gmt))))
 
-(unless (fboundp 'subtract-time)
-  (defun subtract-time (t1 t2)
-    "Subtract two internal times."
-    (let ((borrow (< (cadr t1) (cadr t2))))
-      (list (- (car t1) (car t2) (if borrow 1 0))
-           (- (+ (if borrow 65536 0) (cadr t1)) (cadr t2))))))
+(defun xwem-cl-get-uptime-1 (cl)
+  (let ((ctime (current-time))
+        (stime (xwem-cl-start-time cl)))
+    (list (- (nth 0 ctime) (nth 0 stime))
+          (- (nth 1 ctime) (nth 1 stime))
+          (- (nth 2 ctime) (nth 2 stime)))))
 
 ;;;###xwem-autoload
 (defun xwem-cl-get-uptime (cl &optional format)
@@ -1477,25 +1475,15 @@
 %m is replaced by the minutes
 %s is replaced by the seconds
 %A is replaced by autogenerated format."
-  (let ((upt (nth 1 (subtract-time (current-time) (xwem-cl-start-time cl))))
-       (fmt (or format "%A"))
-       (days 0)
-       (hours 0)
-       (minutes 0)
-       (seconds 0)
-       (rup ""))
+  (let* ((upt (xwem-cl-get-uptime-1 cl))
+        (upt (+ (* (nth 0 upt) 65536) (mod (nth 1 upt) 65536)))
+        (days (/ upt 86400))
+        (hours (/ (mod upt 86400) 3600))
+        (minutes (/ (mod upt 3600) 60))
+        (seconds (mod upt 60))
+        (fmt (or format "%A"))
+        (rup ""))
     
-    (when (> upt (* 60 60 24))
-      (setq days (/ upt (* 60 60 24))))
-
-    (when (> upt (* 60 60))
-      (setq hours (% (/ upt (* 60 60)) 24)))
-
-    (when (> upt 60)
-      (setq minutes (% (/ upt 60) 60)))
-
-    (setq seconds (% upt 60))
-
     (let ((flst (string-to-list fmt))
          chr)
       (while flst
@@ -1513,12 +1501,12 @@
                      (setq rup (concat rup (format "%d" seconds))))
                     ((= chr ?A)
                      (setq rup (concat
-                                (cond ((> days 0) (format "%dd %dh" days 
hours))
-                                      ((> hours 0) (format "%dh %dm" hours 
minutes))
+                                (cond ((> days 0) (format "%dd %dh %dm %ds" 
days hours minutes seconds))
+                                      ((> hours 0) (format "%dh %dm %ds" hours 
minutes seconds))
                                       ((> minutes 0) (format "%dm %ds" minutes 
seconds))
                                       ((> seconds 0) (format "%d seconds" 
seconds))
                                       (t "")))))
-                    (t (error 'xwem-error "Invalid format"))))
+                    (t (error "Invalid format"))))
                  
              (t (setq rup (concat rup (char-to-string chr)))))
        (setq flst (cdr flst))))


--- orig/lisp/xwem-icons.el
+++ mod/lisp/xwem-icons.el
@@ -50,7 +50,8 @@
 
 ;;;###autoload
 (defcustom xwem-icons-list
-  '(("mini-display.xpm" (class-inst "^Terminal$") (class-name "^Terminal$"))
+  '(("mini-display.xpm"
+     (class-inst "^Terminal$") (class-name "^Terminal$"))
     ("mini-clock.xpm" (application "xclock"))
     ("mini-measure.xpm" (application "xload"))
     ("mini-calc.xpm"
@@ -65,6 +66,7 @@
     ("mini-acroread.xpm" (class-name "^AcroRead\\|Xpdf$"))
     ("mini-info.xpm" (class-name "Xman"))
     ("mini-gimp.xpm" (class-name "^Gimp$"))
+    ("mini-djvu.xpm" (class-inst "^djview$") (class-name "^Djview$"))
 
     ;; EMACS
     ("mini-xemacstex.xpm" 


--- orig/lisp/xwem-keymacro.el
+++ mod/lisp/xwem-keymacro.el
@@ -229,8 +229,7 @@
                         (xwem-minib-frame xwem-minibuffer)))
 
     (setq xwem-keymacro-prefix-arg arg)
-    (setq xwem-keymacro-saving t)
-    ))
+    (setq xwem-keymacro-saving t)))
 
 ;;;###autoload(autoload 'xwem-keymacro-end "xwem-keymacro" nil t)
 (define-xwem-command xwem-keymacro-end (arg)


--- orig/lisp/xwem-manage.el
+++ mod/lisp/xwem-manage.el
@@ -115,7 +115,9 @@
     ("xterm" (and (class-inst "^xterm$")
                   (class-name "^XTerm$")))
     ("acroread" (class-name "^AcroRead$"))
-    ("mozilla" (class-inst "^Mozilla"))
+    ("djview" (and (class-inst "^djview$")
+                   (class-name "^Djview$")))
+    ("mozilla" (class-inst "^[mM]ozilla"))
     ("firefox" (class-name "^Firefox"))
     ("rdesktop" (and (class-inst "^rdesktop$")
                      (class-name "^rdesktop$")))


--- orig/lisp/xwem-minibuffer.el
+++ mod/lisp/xwem-minibuffer.el
@@ -521,9 +521,9 @@
   ;; Adjust default frame params
   (unless xwem-minibuffer-emacs-frames-has-minibuffer
     (setq default-x-frame-plist
-          (plist-put default-frame-plist 'minibuffer nil)))
+          (plist-put default-x-frame-plist 'minibuffer nil)))
   (setq default-x-frame-plist
-       (plist-put default-frame-plist 'wait-for-wm nil))
+       (plist-put default-x-frame-plist 'wait-for-wm nil))
 
   (setq xwem-minibuffer (make-xwem-minib))
   (xwem-message 'init "Initializing minibuffer ... done"))




<Prev in Thread] Current Thread [Next in Thread>
  • Summary for xwem--main--2.1--patch-5, Zajcev Evgeny <=