Fandom

Sawfish

A11y changes (Sawfish/Rep)

773pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Browse all patches

Author Edit

Shobbit Mathur

(Uploaded by Christopher Bratusek)

Synopsis Edit

Sawfish-ui is not "accessible" currently.

Provide "atk" relation between widgets and corresponding labels.

There are two patches one for sawfish and one for rep-gtk.

Patch testing Edit

  1. Copy/paste the patch listed below into some file, eg. TEST.diff.
  2. If you don't have sawfish sources yet, have one, as described get it from GIT repo.
  3. Go into the directory where sawfish sources reside, eg. cd sawfish
  4. Test if the patch applies cleanly with this command:
    patch -p1 --ignore-whitespace --dry-run < TEST.diff
    in case of problems try also: -p0 or -p2
  5. If it applies cleanly, then remove the --dry-run from above command and run it again, otherwise ask on the mailing list.
  6. Compile sawfish: ./autogen.sh && make
  7. Install it for testing, but it depends on your linux distribution.
    1. It is always better to install sawfish as your distribution package, but it is different for each distribution.
    2. So you may try make install, which will install sawifish in /usr/local/share/sawfish/ (if you have write access). But then make sure that you run the correct version and delete it from that directory afterwards, to avoid any conflicts.
  8. Se also

PS: edit this template if you feel that those instructions can be improved.

Patch Edit

Patch for Sawfish

--- sawfish/lisp/sawfish/ui/layouts/keymaps.jl	Mon Apr  1 14:03:00 2002
+++ sawfish-new/lisp/sawfish/ui/layouts/keymaps.jl	Wed May 15 13:50:33 2002
@@ -31,6 +31,8 @@
 	  sawfish.ui.layout
 	  sawfish.gtk.widget)
 
+  (defvar label-ptr nil)
+
   (define (keymap-slot-p slot)
     ;; XXX so fucking evil!
     (string-match "-keymap$" (symbol-name (slot-name slot))))
@@ -48,8 +50,10 @@
 	   (active (car keymap-slots)))
 
       (when keymap-slots
-	(gtk-box-pack-start hbox (gtk-label-new (_ "Context:")))
+	(setq label-ptr (gtk-label-new (_ "Context:")))	
+	(gtk-box-pack-start hbox label-ptr)
 	(gtk-box-pack-start hbox omenu)
+	(gtk-widget-relate-label omenu label-ptr)
 	(gtk-box-pack-start vbox hbox)
 
 	(let loop ((rest keymap-slots)
--- sawfish/lisp/sawfish/ui/layout.jl	Wed Feb 13 13:23:07 2002
+++ sawfish-new/lisp/sawfish/ui/layout.jl	Wed May 15 15:57:30 2002
@@ -36,6 +36,10 @@
 	   sawfish.gtk.widget)
      (access rep.structures))
 
+  (defvar widget-ptr nil)
+  (defvar label-ptr nil)
+  (defvar tempstring nil)
+
   (define (define-layout-type name fun) (put name 'nokogiri-layout fun))
 
   (define (layout-type name)
@@ -124,14 +128,21 @@
 		  (break (if (string-match "\\\\w" doc)
 			     (match-start)
 			   -2)))
+	      (setq widget-ptr (slot-gtk-widget slot))
 	      (when (> break 0)
-		(gtk-box-pack-start hbox (make-label (substring doc 0 break))))
+		(setq label-ptr (make-label (substring doc 0 break)))
+		(gtk-box-pack-start hbox label-ptr)
+		(gtk-widget-relate-label widget-ptr label-ptr))
 	      (if (memq 'expand-horizontally (slot-flags slot))
-		  (gtk-box-pack-start hbox (slot-gtk-widget slot) t t)
-		(gtk-box-pack-start hbox (slot-gtk-widget slot) nil nil))
+		  (gtk-box-pack-start hbox widget-ptr t t)
+		(gtk-box-pack-start hbox widget-ptr nil nil))
 	      (when (< break (length doc))
-		(gtk-box-pack-start
-		 hbox (make-label (substring doc (+ break 2)))))
+		(setq tempstring (substring doc (+ break 2)))	
+		(if (> (length tempstring) 0)
+		(progn
+		(setq label-ptr (make-label tempstring))
+		(gtk-box-pack-start hbox label-ptr)
+		(gtk-widget-relate-label widget-ptr label-ptr))))
 	      (setq hbox (add-tooltip hbox))
 	      (gtk-widget-show-all hbox)
 	      hbox))))))
--- sawfish/lisp/sawfish/ui/widgets/frame-style.jl	Mon Apr  1 14:03:01 2002
+++ sawfish-new/lisp/sawfish/ui/widgets/frame-style.jl	Wed May 15 13:11:29 2002
@@ -41,6 +41,7 @@
 	  (value (car options))
 	  (last-value nil))
 
+      (gtk-widget-relate-label combo doc-label)
       (gtk-box-set-spacing hbox box-spacing)
       (gtk-box-set-spacing vbox box-spacing)
       (gtk-container-add readme-scroller readme-text-view)

Patch for rep-gtk

    • already in SVN **

Community's reasons for inclusion or rejection Edit

Patch submitters, please vote also! Yes, obviosuly your vote will be positive, but it's the place to give your explanation why this patch is good for all Sawfish users, and why it is correct - good reasons for inclusion.

When voting anonymously please write your name, so that it can be associated with your posts on the mailing list. If you are logged in you can sign yourself by typing four tilda characters: ~~~~.

  • Yes vote: yes., No vote: no. or Wtf vote: pondering. - no votes yet...
Ok I just had some time to test the patch. It does not cause any side-effects as far as I can see.Flashrider [Christopher Bratusek] 06:16, 23 July 2008 (UTC)
  • Wtf vote: pondering. how could I test this patch? And what is 'atk'? :) Janek Kozicki 15:47, 21 November 2008 (UTC)
  • atk is the "GTK+ Accessibility ToolKit" it's needed by GNOME/GTK+ to provide advanced a11y functions. ... Perhaps trying out GNOMEs a11y-apps with and without that patch helps you Flashrider [Christopher Bratusek] 15:55, 21 November 2008 (UTC)
  • well, I trust you with this patch. But I'm unable to test this currently - I'll have some time on Febrauary - not sooner :/ Janek Kozicki 21:18, 26 November 2008 (UTC)
  • Wtf vote: pondering. Could you wait for days? First, I'm seeking the way to trigger patched part of the code. Simple invocation of the configurator GUI doesn't, at least of .../ui/layouts/keymap.jl. (If someone knows it, please tell us.) Second, it seems that 'defvar' should be replaced by 'let', but I'm not sure yet. I've obtained related tutorials, so I will judge this point, too. (Or Timo's word would make it definite...) - Teika kazura 11:30, 27 November 2008 (UTC)
- Sorry, I mistook. The patched code is certainly executed. (I didn't know that UI's stdout/stderr is >/dev/null.) So the stability must be OK if Chris doesn't find it. - Teika kazura 06:04, 29 November 2008 (UTC)
  • Yes vote: yes. commited rev4310 ... about the defvar -> let thing: If really nessacary, we can still change it. Flashrider [Christopher Bratusek] 22:30, 29 November 2008 (UTC)

Also on Fandom

Random Wiki