[sawfish] Command 'resize-window-prompt' is implemented.



commit 6a82d43b11f03ad18c44633c368b3cf16b352a48
Author: Teika kazura <teika lavabit com>
Date:   Tue Mar 1 13:07:18 2011 +0900

    Command 'resize-window-prompt' is implemented.

 lisp/sawfish/wm/commands/move-resize.jl |    9 +++++----
 man/news.texi                           |    8 +++++++-
 man/sawfish.texi                        |    5 +++++
 3 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/lisp/sawfish/wm/commands/move-resize.jl b/lisp/sawfish/wm/commands/move-resize.jl
index 28a112e..3dbfc0d 100644
--- a/lisp/sawfish/wm/commands/move-resize.jl
+++ b/lisp/sawfish/wm/commands/move-resize.jl
@@ -576,7 +576,6 @@ that window."
 	(resize-window-interactively w))))
 
   ;; Move Window To Center
-
   (define (move-window-center w)
     (move-window-to w
                     (quotient (- (screen-width)
@@ -584,6 +583,11 @@ that window."
                     (quotient (- (screen-height)
                                  (cdr (window-frame-dimensions w))) 2)))
 
+  ;; resize-prompt
+  (define-command 'resize-window-prompt resize-window-with-hints*
+    #:doc "Resize window. Prompted to enter new size."
+    #:spec "%W\nNNew width:\nNNew height:")
+     
   ;; resize-to-preset-size family
   (define (resize-window-to-preset-size x y)
     ;; The size is set beforehand in the configurator.
@@ -594,7 +598,6 @@ that window."
 
   (define-command 'resize-window-to-preset-size
     resize-window-to-preset-size
-    #:spec "NNew width:\nNNew height:"
     #:doc "Resize a window to the size you specify here."
     #:type '(and (labelled "New width:" (number 10))
 		 (labelled "New height:" (number 10)))
@@ -610,7 +613,6 @@ that window."
   (define-command 'resize-window-to-preset-width
     resize-window-to-preset-width
     #:doc "Resize a window to the width you specify here."
-    #:spec "NNew width:"
     #:type `(and (labelled "New width:" (number 10)))
     )
 
@@ -624,7 +626,6 @@ that window."
   (define-command 'resize-window-to-preset-height
     resize-window-to-preset-height
     #:doc "Resive a window to the height you specify here."
-    #:spec "NNew height:"
     #:type '(and (labelled "New height:" (number 10)))
     )
 
diff --git a/man/news.texi b/man/news.texi
index afbb145..0172ff3 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -235,12 +235,18 @@ For the details, see @xref{Window Attributes}, and @xref{Getting Windows}.
 @item Deleted @code{get-window-by-name-re} and @code{get-window-by-class-re}. Use instead @code{get-window-by-name} or @code{get-window-by-class} with the new boolean option @code{#:regex}. (The old name is still supported.)
 @item added @code{#:icon} switch to @code{get-window-by-name} to get a window via NET_WM_ICON_NAME (can be used with #:regex switch, too)
 
- item Commands to resize a window to preset dimensions [Christopher Bratusek]
+ item Commands to resize a window [Christopher Bratusek, Teika kazura]
+
+Four new commands to resize a window where you can specify
+the size by pixels are there. You're either prompted to type in
+the new size, or you can preset it in the configurator.
 
 For the new command @code{resize-window-to-preset-size}, first you
 specify a size in the configurator. The focused window will be resized
 to that preset size on invocation. There're also commands to change
 only one of the height and width.
+
+ code{resize-window-prompt} prompts you to enter the new size.
 @end itemize
 
 @item Window-operation menu improvements [Christopher Bratusek]
diff --git a/man/sawfish.texi b/man/sawfish.texi
index ce35619..6f5e6d5 100644
--- a/man/sawfish.texi
+++ b/man/sawfish.texi
@@ -1984,6 +1984,11 @@ configurator. The focused window will be resized to that preset size
 on invocation.
 @end deffn
 
+ deffn Command resize-window-prompt window
+You're prompted to enter the new window size, and the window
+will be resized.
+ end deffn
+
 @deffn Function move-selected-window
 @deffnx Command move-selected-window
 Wait for the user to select a window using the mouse, then



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