Re: yes/no dialog



On Sun, 22 Oct 2006 19:15:55 +0530, Sridhar Ratna wrote:

> On 10/22/06, Manfred Lotz <manfred lotz arcor de> wrote:
>> > You can override the menu definitions. Read about it here,
>> > http://home.blarg.net/~sand/sawfish/v0.11/sawfish/Popup-Menus.html
>> >
>> >
>> However, I didn't find how to override the root-menu or to replace the
>> root menu with my own root menu.
>>
>>
> You will have to set the new menu definition to the "root-menu" variable.
> I hope you are comfortable with lisp (and rep, the dialect used in
> sawfish).
> 

I'm not a Lisp expert but that I can do.



...


> 
> 
>> > For the dialog logic, you can use Xdialog or even better zenity,
>> > http://directory.fsf.org/zenity.html
>>
>> The problem with zenity is that I don't know how to hand over the zenity
>> return code to sawfish.
>>
>>
>> E.g. when calling (system "zenity --warning&") I want to quit Sawfish if
>> I clicked Ok and I want to cancel quit if I clicked Cancel. How can I
>> get returncodes 0 or 1 into Sawfish?
>>
>>
> Look at the program (zenity) exit code. For eg., I clicked on 'Cancel' in
> this case.
> 
> srid homeless:~$ zenity --warning
> srid homeless:~$ echo $?
> 1
> srid homeless:~$


The problem I see is that (system "zenity --warning&") returns 0 after
successfully executing zenity regardless if I clicked Cancel which makes
zenity return 1 or if I clicked Ok which makes zenity return 0.


There is a function simple-dialog defined in widget-dialog.jl which should
make it possible to create a yes-no dialog within sawfish. However, I have
to admit I couldn't yet figure out how to make it work. I have absolutely
no experience in gtk programming...

-- 
Manfred





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