Re: [Sawfish] Re: High IO while config is open. |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
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 <nano@xxxxxxxxxxxxx> 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
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)