[pygtk] Several issues with GTK

Neil Munro neilmunro at gmail.com
Mon Feb 23 21:12:17 WST 2009

Thanks all, it's helping I have already solved problem 2, I moved away from
a dialog window and moved to using a regular window with the show/hide
method and it's working fine for me so far, which is fantastic, am still
struggling with the text view. This time I have attached the full project as
a tar.bz2 file, this is for the individual who mentioned my glade file would
help diagnose the issue. The thign with the text view is this:

(Code excerpt from the Preferecnes.py file line 149)
    def Set_Source_Text_View( self ):
        #Preferences_Window = gtk.glade.XML( "warp-gui.glade", "Preferences"
        print "Entering prefs text view function."
        #for Feed in self.Feeds:
        #    print Feed
        FeedView = self.Preferences_Window.get_widget( "TXTV_Feeds" )
        FeedView_Buffer = gtk.TextBuffer( None )

        data = ""

        for Feed in self.Feeds:
            data += Feed + "\n"

        print data


        FeedView.set_buffer( FeedView_Buffer )

        #print FeedView.get_buffer( )

        #FeedView_Buffer.insert_at_cursor( "Testing.", len( "Testing." ) )
        print "Exiting prefs text view function."

Once I actually get my head around text views what is going to be displayed
is the data in self.Feeds my random for loop there was just something else I
was trying with treeview. This goes for a lot of my code at the moment I'm
aware it requires a lot of refactoring, but as it stands my project needs
core functionality to pass and I just get extra marks for cleaner code,and
while clean code is always good refactoring will have to wait until core
functionality has been implemented.

I have been on #pygtk on freenode but I very rarely get a reply and often
get told to just read the documentation, which I do anyways since there is
really a wealth of usful bits and pieces in the documentation, it's how I
have gotten as far as I have.

Originally my aim that was done with the treeview was to have a check box, a
progress bar and a button in each row, the check box would mark/unmark the
update, the progress bar would show the name of the update and it's progress
and the button the user could click would display update information (looks
a bit like the itunes music store, except for software updates), but I was
told that it's really really hard to get buttons inside a tree view as a
cell renderer, although I personally don't know, it was just something
someone told me once.

I am more than happy to focus on one part of the code at the moment just to
keep things easier, I am quite eager to finish my preferences code first but
really any progress is good.

Many thanks
Neil Munro

PS: If you wish to attempt to run the code you have to be running as root,
not as sudo, so you must enter root via sudo -i, and atm it only runs on
UNIX systems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20090223/8985d655/attachment-0001.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pywarp.tar.bz2
Type: application/x-bzip2
Size: 8475247 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20090223/8985d655/attachment-0001.bin 

More information about the pygtk mailing list