Re: Re: High IO while config is open.

"Robert 'Bobby' Zenz" <[email protected]>
Newsgroups gmane.comp.window-managers.sawfish
Message-ID <20120920195819.79679000@Dagon>
I did a simple test by removing the file-chooser-button from the UI
(patch attached, not meant to be merged into git, just if someone is
curios/interested) and there was no IO activity anymore.

So this is definitely related to the gtk-file-chooser-button...so far
no further ideas.

Greetings.

On Thu, 13 Sep 2012 22:03:06 +0200
Christopher Roy Bratusek <[email protected]> wrote:

> After messing around with sawfish.wm.ext.wallpaper I suddenly got an
> idea what causes this. I'm almost sure it is GTK+. SawfishConfig in
> recent versions uses a new GTK+ widget for selecting files
> GtkFileChooserButton rather than it's ancient and deprecated
> predecessor.
> 
> GtkFileChooserButton seems to use GIO to poll?
> 
> Regards,
> Chris
cfg.jl_RemovedFileChooser.patch (text/x-patch, 1.8 KB)
diff --git a/lisp/sawfish/cfg/shell.jl b/lisp/sawfish/cfg/shell.jl
index d65f3ae..f611edd 100644
--- a/lisp/sawfish/cfg/shell.jl
+++ b/lisp/sawfish/cfg/shell.jl
@@ -54,7 +54,6 @@
   (define about-button)
   (define edit-button)
   (define install-theme-label)
-  (define install-theme-button)
 
   (define (initialize-shell)
     (let ((vbox (gtk-vbox-new nil box-spacing))
@@ -118,8 +117,6 @@
 	(gtk-button-set-relief doc-button 'none)
 	
 	(setq install-theme-label (gtk-label-new "Install theme:"))
-	(setq install-theme-button (gtk-file-chooser-button-new '() 'open))
-	(gtk-file-chooser-set-filename install-theme-button "~")
 
 	(gtk-window-set-title main-window (_ "Sawfish Configurator"))
 	(gtk-widget-set-name main-window (_ "Sawfish Configurator"))
@@ -153,23 +150,9 @@
 	
 	(g-signal-connect doc-button "clicked"
 	  (lambda () (system "x-terminal-emulator -e \"info sawfish Top\" &")))
-	
-	(g-signal-connect install-theme-button "file-set"
-	  (lambda () (let ((file (gtk-file-chooser-get-filename install-theme-button))
-			   (filex))
-		       (unless (file-exists-p "~/.sawfish/themes/")
-			 (unless (file-exists-p "~/.sawfish/")
-			   (make-directory "~/.sawfish/"))
-			 (make-directory "~/.sawfish/themes/"))
-		       (setq filex (last (string-split "/" file)))
-		       (gtk-file-chooser-set-filename install-theme-button "~")
-		       (if (string-match "\\.tar" filex)
-			   (copy-file file (concat "~/.sawfish/themes/" filex))
-			 (sawfish-config-display-info "Only tar-archives can be installed at the moment." nil)))))
 
 	(gtk-container-add hbox-a wiki-button)
 	(gtk-container-add hbox-b install-theme-label)
-	(gtk-container-add hbox-b install-theme-button)
 	(gtk-container-add hbox-b doc-button)
 	(gtk-container-add hbox-b edit-button)
 	(gtk-container-add hbox-a about-button)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.