Re: Removing Tab options



Am Sat, 6 Mar 2010 07:52:07 +0100
schrieb Christopher Roy Bratusek <zanghar freenet de>:

> Hi all,
> 
> I began to remove the tab options (they are pointless as defcustoms, as each theme
> needs different values). The only thing I'm not aware of, is how to set them inside
> the theme.jl, but perhaps someone knows?
> 
> Als raise-tabs-on-hover is now raise-frames-on-hover, as the tab-system does not
> yet allow to only raise when tabs are hovered by the pointer.
> 
> Patch is attached.
> 
> Also I'll check the patches from fuchur, Fabrice Delente (choosing icons for
> window-switcher) and DMGs reschange hook patch. Perhaps they'll go into 1.6.3
> 
> Have Fun,
> Chris
> 

Forgot to attach the patch :rolleyes:

-- 

Re: die erstmals in der Geschichte In...
Gesendet von besserer link am Mi, 1. Jul um 10:10

http://doc.qtsoftware.com/4.5/porting4.html

Es ist einfach unsäglich, wenn einem das Fundament so einfach unter dem Arsch
weggezogen wird.

Warum hat es wohl so lange mit KDE4 gedauert?
Und jetzt fängt Python auch schon wieder an :-(

  Re[2]: die erstmals in der Geschichte...
  Gesendet von Christian am Mi, 1. Jul um 10:31

  > Es ist einfach unsäglich, wenn einem das Fundament so einfach unter dem Arsch
  weggezogen wird. Wird es doch nicht!!! Python 2.6 existiert. Wo fehlt es denn
  Deinem Arsch? Nebenbei geht es bei dem Artikel um 3.1 - 3.0 ist schon letztes Jahr
  erschienen ...

  > Und jetzt fängt Python auch schon wieder an
  "Auch schon wieder" ... aha, das letzte Mal hast Du auch schon erlebt und
  bedauert? Dann muss ja Python 2.x etwas grauenvolles für Dich sein!

diff --git a/OPTIONS b/OPTIONS
index 1c58e7f..dd08775 100644
--- a/OPTIONS
+++ b/OPTIONS
@@ -625,27 +625,6 @@
 ;;  (define-special-variable prompt-color (cons (get-color "black") (get-color "white"))
 ;;    "Prompt message's colors.")
 
-;; tab options
-
-;; (require 'sawfish.wm.tabs.tab)
-
-;; (define-special-variable tab-left-dec-width 11
-;;   "Width of tab's left-edge decoration")
-
-;; (define-special-variable tab-right-dec-width 11
-;;   "Width of tab's right-edge decoration")
-
-;; (define-special-variable tab-left-margin 16 
-;;   "Width of tab area's left-edge decoration")
-
-;; (define-special-variable tab-right-margin 16
-;;   "Width of tab area's right-edge decoration")
-
-;; (define-special-variable tab-raise-on-hover nil
-;;   "Raise Tabs on Hover")    
-;; ;; need to call this function to make tab-raise-on-hover work
-;; (raise-tabs-on-hover-setter)
-
 ;; shrink-yank options (in grow-pack.jl)
 
 ;; (define-special-variable shrink-window-minimum-size 10
diff --git a/lisp/sawfish/wm/focus.jl b/lisp/sawfish/wm/focus.jl
index 55449fd..f87be5a 100644
--- a/lisp/sawfish/wm/focus.jl
+++ b/lisp/sawfish/wm/focus.jl
@@ -28,7 +28,8 @@
 	    focus-pop-map
 	    warp-pointer-if-necessary
             focus-revert
-	    focus-within-click-event)
+	    focus-within-click-event
+	    raise-frames-on-hover-setter)
 
     (open rep
 	  rep.system
@@ -39,7 +40,8 @@
 	  sawfish.wm.util.window-order
 	  sawfish.wm.custom
 	  sawfish.wm.commands
-	  sawfish.wm.session.init)
+	  sawfish.wm.session.init
+	  sawfish.wm.stacking)
 
   (defvar focus-modes nil
     "List containing all symbols naming focus modes.")
@@ -66,6 +68,12 @@
     :type boolean
     :group focus)
 
+    (defcustom frame-raise-on-hover nil
+    "Raise Tabs on Hover"
+    :group focus
+    :type boolean
+    :after-set (lambda () (raise-frames-on-hover-setter)))
+
   (define focus-within-click-event (make-fluid nil)
           "When true, the current command is being called from within
 a click-to-focus button press event.")
@@ -140,6 +148,14 @@ EVENT-NAME)', where EVENT-NAME may be one of the following symbols:
     (let ((fun (focus-mode-ref focus-mode)))
       (when fun (fun nil 'focus-revert))))
 
+  (define (raise-frames-on-hover-action)
+    (raise-window current-event-window))
+
+  (define (raise-frames-on-hover-setter)
+    (if (eq frame-raise-on-hover 't)
+        (add-hook 'enter-frame-part-hook raise-frames-on-hover-action)
+      (remove-hook 'enter-frame-part-hook raise-frames-on-hover-action)))
+
 ;;; modes
 
   #|
diff --git a/lisp/sawfish/wm/tabs/tab.jl b/lisp/sawfish/wm/tabs/tab.jl
index 5188c6d..f8ed17a 100644
--- a/lisp/sawfish/wm/tabs/tab.jl
+++ b/lisp/sawfish/wm/tabs/tab.jl
@@ -20,7 +20,7 @@
 
 (define-structure sawfish.wm.tabs.tab
 
-    (export raise-tabs-on-hover-setter)
+    (export )
 
     (open rep
           rep.system
@@ -41,31 +41,13 @@
   ;; - hide some frame parts on leftmost and rightmost tabs
   ;; - add a drag-n-drop way to group windows by tabs
 
-  ;;###autoload (defgroup tabs "Tabs")
+  (defvar tab-left-dec-width 11 "Width of tab's left-edge decoration")
 
-  (defgroup tabs "Tabs")
+  (defvar tab-right-dec-width 11 "Width of tab's right-edge decoration")
 
-  (defcustom tab-left-dec-width 11 "Width of tab's left-edge decoration"
-    :group tabs
-    :type number)
+  (defvar tab-left-margin 16 "Width of tab area's left-edge decoration")
 
-  (defcustom tab-right-dec-width 11 "Width of tab's right-edge decoration"
-    :group tabs
-    :type number)
-
-  (defcustom tab-left-margin 16 "Width of tab area's left-edge decoration"
-    :group tabs
-    :type number)
-
-  (defcustom tab-right-margin 16 "Width of tab area's right-edge decoration"
-    :group tabs
-    :type number)
-
-  (defcustom tab-raise-on-hover nil
-    "Raise Tabs on Hover"
-    :group tabs
-    :type boolean
-    :after-set (lambda () (raise-tabs-on-hover-setter)))
+  (defvar tab-right-margin 16 "Width of tab area's right-edge decoration")
 
   (define (get-tab-pos win)
     (let* ((group (tab-find-window win))
@@ -134,28 +116,4 @@
           (unmark-all-windows))
       (mark-window win)))
 
-  (define-command 'tab-add-to-group mygroup #:spec "%W")
-
-  (define (raise-tabs-on-hover-action win)
-    (raise-window win))
-
-  (define (raise-tabs-on-hover-setter)
-    (if (eq tab-raise-on-hover 't)
-        (add-hook 'enter-frame-part-hook raise-tabs-on-hover-action)
-      (remove-hook 'enter-frame-part-hook raise-tabs-on-hover-action))))
-
-;;(require 'x-cycle)
-;;(define-cycle-command-pair
-;;  'cycle-tabgroup 'cycle-tabgroup-backwards
-;;  (lambda (w)
-;;    (delete-if-not window-in-cycle-p
-;;                   (delete-if (lambda (win)
-;;                                (and (not (eq win w))
-;;                                     (tab-same-group-p win w)))
-;;                              (workspace-windows current-workspace))
-;;                   )
-;;    )
-;;  #:spec "%W")
-
-;;(require 'sawfish.wm.util.window-order)
-
+  (define-command 'tab-add-to-group mygroup #:spec "%W"))
diff --git a/themes/get-S-tabbed/theme.jl b/themes/get-S-tabbed/theme.jl
index 5d4f8db..7b43bb8 100644
--- a/themes/get-S-tabbed/theme.jl
+++ b/themes/get-S-tabbed/theme.jl
@@ -2,7 +2,6 @@
 
 ;; Based off of my arctic Enlightenment theme....
 
-
 (let*
     (
      ;;(font (get-font "-*-lucida-medium-r-normal-*-*-100-*-*-p-*-iso8859-1"))
@@ -309,12 +308,4 @@
                        ((default) frame)
                        ((transient) transient-frame)
                        ((shaped) shaped-frame)
-                       ((shaped-transient) shaped-transient-frame))))
-
-  ;; TODO: figure out how to store this info in this file correctly
-  ;;(custom-set-typed-variable'tab-left-dec-width '5 'number)
-  ;;(custom-set-typed-variable'tab-right-dec-width '5 'number)
-  ;;(custom-set-typed-variable'tab-left-margin '14 'number)
-  ;;(custom-set-typed-variable'tab-right-margin '38 'number)
-
-  )
+                       ((shaped-transient) shaped-transient-frame))))))


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