Re: [pygtk] New Gtk/PyGtk Book

2006-04-28 Thread David M. Cook
On Tue, Apr 25, 2006 at 11:47:26AM -0700, [EMAIL PROTECTED] wrote:
 I'd definitely love to see a Python/Glade book.  Is there a better way of 
 quickly developing linux apps?

Add in Kiwi and let Gazpacho mature some more, and I'd say no, but I've
never really given PyQt or wxPython much of a chance.  I also really like
the Netbeans/Jython combination for non-native apps.

Dave Cook
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Advanced Treeview Filtering Trouble

2006-04-28 Thread JUAN ERNESTO FLORES BELTRAN

John wrote:

If I understand your question I don't think you need to use the 
set_modify_func() method. The set_visible_func() method should be 
sufficient but you have to pass in an object that has mutable contents 
corresponding to the columns that you want to use for filtering. For 
example you could create a Python object that has one attribute that 
contains a list of car models and another attribute that has a maximum 
price. Pass this object as the data arg to the set_visible_func() method 
and change the attributes as needed. Your visible_cb() function could then 
do something like:


def visible_cb(self, treestore, iter, x):
 return treestore[iter][0] in x.models and treestore[iter][4] = 
x.maxprice


John


It did work!!
thanks a lot jhon!!...

However a new trouble has shown up!!, now i do need to get the row data from 
the treeview which respond to the set_visible_func() method.  It is easy to 
get the data from an ordinary treeview, it can be done by catching the 
cursor_changed signal and handling it with a function as follows:


-
 #the treeview is connected to the signal and this event is connected to a 
signal handler

 self.connection= self.treeview.connect(cursor_changed, self.getreedata)

 #then the signal handler (a callback) is in charge of getting the data of 
the row

def self.getreedata(self, iter):
  treeselection = self.treeview.get_selection()
  select= treeselection.get_selected()
  row_value= self.treestore.get_value(select[1], 0)
-

where select is a list with two values [model, iter], then select[1] is an 
iter pointing to the position of the cursor in the treeview and 
consecuently, row_value is the value of the row where the cursor is 
positioned in the column 0 of the treeview.


This works perfectly in odinary treeviews, however when filtering (i mean 
when using the set_visible_func() method)  i do receive the following error 
message:


---
File carstreeview.py, line 11, in getreedata
   row_value= self.treestore.get_value(select[1], 0)
TypeError = unknown type (null)
---

why this does not work when filtering the treeview???, do i need to set any 
property to the treeview?? the code above works properly for no filtered or 
commom treeviews, but not when filtering...is the case that 
set_visible_func()  avoids retrieving row values??? if so,  can the data be 
retrieved from the treemodel??, how??, i have seen there is not 
cursor_changed signals for treemodels


any suggestion??.
thanks for your help in advance
juan.-


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Advanced Treeview Filtering Trouble

2006-04-28 Thread JUAN ERNESTO FLORES BELTRAN

John wrote:

If I understand your question I don't think you need to use the 
set_modify_func() method. The set_visible_func() method should be 
sufficient but you have to pass in an object that has mutable contents 
corresponding to the columns that you want to use for filtering. For 
example you could create a Python object that has one attribute that 
contains a list of car models and another attribute that has a maximum 
price. Pass this object as the data arg to the set_visible_func() method 
and change the attributes as needed. Your visible_cb() function could then 
do something like:


def visible_cb(self, treestore, iter, x):
 return treestore[iter][0] in x.models and treestore[iter][4] = 
x.maxprice


John


It did work!!
thanks a lot jhon!!...

However a new trouble has shown up!!, now i do need to get the row data from 
the treeview which respond to the set_visible_func() method.  It is easy to 
get the data from an ordinary treeview, it can be done by catching the 
cursor_changed signal and handling it with a function as follows:


-
 #the treeview is connected to the signal and this event is connected to a 
signal handler

 self.connection= self.treeview.connect(cursor_changed, self.getreedata)

 #then the signal handler (a callback) is in charge of getting the data of 
the row

def self.getreedata(self, iter):
  treeselection = self.treeview.get_selection()
  select= treeselection.get_selected()
  row_value= self.treestore.get_value(select[1], 0)
-

where select is a list with two values [model, iter], then select[1] is an 
iter pointing to the position of the cursor in the treeview and 
consecuently, row_value is the value of the row where the cursor is 
positioned in the column 0 of the treeview.


This works perfectly in odinary treeviews, however when filtering (i mean 
when using the set_visible_func() method)  i do receive the following error 
message:


---
File carstreeview.py, line 11, in getreedata
   row_value= self.treestore.get_value(select[1], 0)
TypeError = unknown type (null)
---

why this does not work when filtering the treeview???, do i need to set any 
property to the treeview?? the code above works properly for no filtered or 
commom treeviews, but not when filtering...is the case that 
set_visible_func()  avoids retrieving row values??? if so,  can the data be 
retrieved from the treemodel??, how??, i have seen there is not 
cursor_changed signals for treemodels


any suggestion??.
thanks for your help in advance
juan.-


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Advanced Treeview Filtering Trouble

2006-04-28 Thread John Finlay

JUAN ERNESTO FLORES BELTRAN wrote:

John wrote:

If I understand your question I don't think you need to use the 
set_modify_func() method. The set_visible_func() method should be 
sufficient but you have to pass in an object that has mutable 
contents corresponding to the columns that you want to use for 
filtering. For example you could create a Python object that has one 
attribute that contains a list of car models and another attribute 
that has a maximum price. Pass this object as the data arg to the 
set_visible_func() method and change the attributes as needed. Your 
visible_cb() function could then do something like:


def visible_cb(self, treestore, iter, x):
 return treestore[iter][0] in x.models and treestore[iter][4] = 
x.maxprice


John


It did work!!
thanks a lot jhon!!...

However a new trouble has shown up!!, now i do need to get the row 
data from the treeview which respond to the set_visible_func() 
method.  It is easy to get the data from an ordinary treeview, it can 
be done by catching the cursor_changed signal and handling it with 
a function as follows:


- 

 #the treeview is connected to the signal and this event is connected 
to a signal handler
 self.connection= self.treeview.connect(cursor_changed, 
self.getreedata)


 #then the signal handler (a callback) is in charge of getting the 
data of the row

def self.getreedata(self, iter):
  treeselection = self.treeview.get_selection()
  select= treeselection.get_selected()
  row_value= self.treestore.get_value(select[1], 0)

row_value= select[0].get_value(select[1], 0)

You need to use the model used by the TreeView which is self.modelfilter 
I'm assuming.


John

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Mozilla browser with devnagari text not working!!!

2006-04-28 Thread Anand Kulkarni
Hi,

I am using Mandrake 10.1 linux.
I have a HTML file having Marathi matter into it. If I
open that HTML into 'Konqueror' browser, it displays
Marathi text correctly. But if I open the same HTML
file in Mozilla 1.7.2 browser it does not display the
text correctly. Here I am using 'Mozilla' browser and
NOT 'Mozilla Firefox'.

I came to know that for rendering devnagari font, we
must enable PANGO support for Mozilla.

Do you know how to do it? Is there any patch to be
installed for the same?

Waiting for the reply.

regards,

Anand


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/