Re: [sawfish] Re: `position' in rep...?



Am 07.06.2011 23:37, schrieb Eli Barzilay:
Three hours ago, Christopher Roy Bratusek wrote:
Again learned something :)

Still, your new version of `position' breaks SawfishConfig (in
misc-1.9).
If by "your version" you mean the one I wrote, then please tell me how
it breaks.  It's been a while since I wrote sawfish code so it's
likely that I made some stupid mistake.  (The method itself is valid,
and well used, that shouldn't be a problem.)

Well, assume this:

sawfish-client

(setq mylist '("Crux" "StyleTab" "MXFlat"))
(position "Crux" mylist)
0

works. Now in SawfishConfig this code is used (with different variable-names):

(gtk-combo-box-text-set-active widget (position value list))

widget is a GtkComboBoxText widget, value the usergiven (or fallback) value of the setting represented by the widget (eg. frame-style), list is the list given as options (see any 'choice or 'symbol defcustom in Sawfish).

A GtkComboBoxText expects the index-number not the text, so position is used to return it, with your version of position we get:

*** Bad argument: #<subr gtk-combo-box-set-active>, (), 2

so either position returns nothing or not an integer. As I now got the time to test, I'll continue now:
New line of code before setting position:

write standard-output (format nil "*** value is: %d" x)

*** value is: #<non-number>

Againg with %s instead:

value is: flip-viewport

? from SawfishConfig it returns the value instead of the index-number.

corresponding code resides in sawfish.gtk.widget (choice and symbol widgets), in misc-1.9 branch.

Regards,
Chris


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