Re: how to use simple-dialog in widget-dialog.jl



On Wed, 3 Feb 2010 16:46:24 +0100, Daniel Fetchinson wrote:
> There is a file called widget-dialog.jl which includes a function
> called simple-dialog which I guess is capable of creating a simple
> dialog window, accept user input (yes or no) and return the result to
> sawfish.

Hi, Daniel. It'll be a bit of challenge. From lisp/sawfish/gtk/README
which I'll create soon:
------------------------------------------------------------------------
This directory contains components, or "widgets" for sawfish-config,
*not* raw gtk widgets.

For example, 'boolean' is defined in widget.jl, among other widgets.
This is used to define boolean option, and it shows checkbox, for
example in:

 (defcustom warp-to-window-enabled nil
   "Whether to enable warping the cursor to windows."
   :type boolean
   :group (misc warp))
------------------------------------------------------------------------
So, you can learn from widget-dialog.jl, but it's not an out-of-box
use.

If you know the basics of gtk, then it's not so difficult to creat a
dialog box. Have a look at examples/ in rep-gtk. (Bah, gtk-dialog.jl
breaks your Sawfish session. Yet I know some codes there indeed work.)

Any gtk instance has to be run in a seperate process. (Even the menus
of Sawfish are so.) So, the simplest one will look like this:
------------------------------------------------------------------------
#!/bin/sh
exec rep
!#

;; lisp code is here
------------------------------------------------------------------------

Now, it has to communicate with Sawfish. It can be done by running
sawfish-client from the above lisp code.

Please try it, and let us hear a good news. Have fun!
Teika (Teika kazura)



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