[sawfish] Renamed window-rename functions.



commit 2916491e5b130d8b186589f7644e53ce3ecfd85d
Author: Teika kazura <teika lavabit com>
Date:   Sat Jan 8 13:47:04 2011 +0900

    Renamed window-rename functions.
    
    * 'rename-window-func' is renamed to 'rename-window'. Old name is supported.
    * 'rename-window-interactive' is deleted. Update instruction is written in news.texi.

 lisp/sawfish/wm/ext/match-window.jl |    2 +-
 lisp/sawfish/wm/util/compat.jl      |    5 ++++-
 lisp/sawfish/wm/windows.jl          |   13 ++++---------
 man/news.texi                       |   10 ++++++----
 4 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/lisp/sawfish/wm/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index 24051ee..22ae6a9 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -518,7 +518,7 @@
     (lambda (w prop value)
       (declare (unused prop))
       (when value
-        (rename-window-func w value))))
+        (rename-window w value))))
 
   (define-match-window-setter 'maximized
     (lambda (w prop value)
diff --git a/lisp/sawfish/wm/util/compat.jl b/lisp/sawfish/wm/util/compat.jl
index 21092a3..48581ca 100644
--- a/lisp/sawfish/wm/util/compat.jl
+++ b/lisp/sawfish/wm/util/compat.jl
@@ -32,6 +32,7 @@
 	    maybe-lower-window)
 
     (open rep
+	  sawfish.wm.windows
 	  sawfish.wm.menus
 	  sawfish.wm.misc
 	  sawfish.wm.custom
@@ -53,7 +54,7 @@
 	(setq attrs (cons (cons 'position position) attrs)))
       (display-message text attrs)))
 
-  ;; Define alias for Renamed functions. 
+  ;; Define alias for renamed functions.
   (define ws-copy-window copy-window-to-workspace)
   (define ws-move-window move-window-to-workspace)
   (define ws-insert-workspace insert-workspace)
@@ -63,6 +64,8 @@
   (define maybe-lower-window lower-window*)
 
   (define popup-window-menu popup-window-ops-menu)
+  (define rename-window-func rename-window)
+
 ;;; obsolete commands
 
   (define (define-commands index)
diff --git a/lisp/sawfish/wm/windows.jl b/lisp/sawfish/wm/windows.jl
index b1b6438..d5220a3 100644
--- a/lisp/sawfish/wm/windows.jl
+++ b/lisp/sawfish/wm/windows.jl
@@ -59,8 +59,7 @@
 	     avoided-windows
 	     call-after-property-changed
 	     call-after-state-changed
-	     rename-window-func
-	     rename-window-interactive
+	     rename-window
 	     
 	     ;; dummy
 	     get-window-by-class-re
@@ -569,20 +568,16 @@ STATES has been changed. STATES may also be a single symbol."
 		 ((cdr cell) w relevant))))
            state-changes)))
 
-  (define (rename-window-func window new-name)
+  (define (rename-window window new-name)
     "Renames WINDOW to NEW-NAME."
     (set-x-text-property window 'WM_NAME (vector new-name))
     (set-x-text-property window '_NET_WM_NAME (vector new-name))
     (set-x-text-property window 'WM_ICON_NAME (vector new-name))
     (set-x-text-property window '_NET_WM_ICON_NAME (vector new-name)))
 
-  (define (rename-window-interactive w)
-    (require 'sawfish.wm.util.prompt)
-    (let ((new-name (prompt-for-string "Enter new window title:"
-				       (window-name w))))
-      (rename-window-func w new-name)))
+  (define-command 'rename-window rename-window
+    #:spec "%W\nsEnter new window name:")
 
-  (define-command 'rename-window rename-window-interactive #:spec "%W")
   ;;; gaollable functions
 
   (gaol-add window-really-wants-input-p window-class window-avoided-p
diff --git a/man/news.texi b/man/news.texi
index cbe273c..df4afde 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -43,11 +43,13 @@ access git repository.)
 
 @item Notes
 @itemize @minus
- item Renamed function @code{popup-window-menu} to @code{popup-window-ops-menu} [Teika kazura]
+ item Function renames [Teika kazura]
+ itemize
+ item Popup of operations on a window, from @code{popup-window-menu} to @code{popup-window-ops-menu} (both the function and command). Old names are still available.
+ item Window rename, from @code{rename-window-func} to @code{rename-window}. (Old name is still avialable.) The function @code{rename-window-interactive} is deleted. Use @code{(call-command 'rename-window)} instead.
+ end itemize
 
-It popups operations on a window. Both the function and the command
-are renamed. The old name is still supported, but it's recommended to
-update your configuration.
+Even if the old names still remain, it is recommended to update.
 
 @item User option @code{focus-ignore-pointer-events} is deleted. [Teika kazura] *
 In fact, it's for internal use, and should not have been a user option. Use your favorite focus mode instead.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]