Re: fdo-menu partial re-write



Christopher Roy Bratusek <zanghar freenet de> writes:

> Works for me (sets language correctly now, out-of-the-box (de_DE.UTF8 ->
> de)).
>
> Just one thing: could you make update-saw-menu callable from
> sawfish.wm.menus? (only if that wouldn't ignore settings from
> resourcefiles, but I guess not)
>
> When I could get rid of sawfish.wm.extras (since gnome-int does now only
> add some menu-entries and changes xterm and browser if not customized by
> the user, it would be o.k. to let sawfish load sawfish.wm.defaults on
> every system, as it won't hurt (anymore), try-require would then be
> moved from sawfish.wm.extras to sawfish.wm.default and the former (which
> at this point is empty) is beeing removed)
>
> ... Tooltips and Icons would be also nice, but this is not necessary and
> a long-term task.
>
> Thanks a lot for your efforts,
> Chris

It seems to work that way if you put (update-saw-menu) in user.jl, updating the menu
after loading the rc file(s).  This allows the user to either set their
own menu (dont need to set the 'use-fdo-menu variable, as fdo-menu will
not generate if apps-menu has a value), or set fdo-menu variables in
their .sawfish[/]rc file.

It will generate a default menu if the --no-rc switch is used, using the
language set from the system. (using the updated fdo-menu.jl)

here are the patches for user.jl and exrtras.jl if you want to try it out.

Cheers

-- 
Matthew Love

diff --git a/lisp/sawfish/wm/user.jl b/lisp/sawfish/wm/user.jl
index 7cd94c2..8febff7 100644
--- a/lisp/sawfish/wm/user.jl
+++ b/lisp/sawfish/wm/user.jl
@@ -45,7 +45,8 @@
 	   sawfish.wm
 	   sawfish.wm.util.groups
 	   sawfish.wm.util.display-window
-	   sawfish.wm.util.compat)
+	   sawfish.wm.util.compat
+	   sawfish.wm.ext.fdo-menu)
      (set-binds))
 
   (setq *user-structure* 'user)
@@ -114,11 +115,15 @@
 		  (if (rc-file-exists-p (car rest))
 		      (safe-load (car rest) t t t)
 		    (loop (cdr rest)))))
-		    
+
 	      (load "sawfish/wm/extras" t))))
       (error
        (format (stderr-file) "error in local config--> %S\n" error-data))))
 
+  ;; use a default menu if none is given
+  (unless (or batch-mode apps-menu)
+    (update-saw-menu))
+
   ;; use a default theme if none given
   (unless (or batch-mode default-frame-style)
     (setq default-frame-style fallback-frame-style))
diff --git a/lisp/sawfish/wm/extras.jl b/lisp/sawfish/wm/extras.jl
index f766bb0..a3eb13d 100644
--- a/lisp/sawfish/wm/extras.jl
+++ b/lisp/sawfish/wm/extras.jl
@@ -25,7 +25,4 @@
 (define (try-require sym)
   (condition-case nil
       (require sym)
-    (error nil)))
-
-(require 'sawfish.wm.ext.fdo-menu)
-(update-saw-menu)
+    (error nil)))
\ No newline at end of file


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