<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.gnome.gtk+.python">
    <title>gmane.comp.gnome.gtk+.python</title>
    <link>http://blog.gmane.org/gmane.comp.gnome.gtk+.python</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16196"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16195"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16192"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16190"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16184"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16181"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16169"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16168"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16167"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16164"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16163"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16162"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16159"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16158"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16157"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16155"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16150"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16148"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16145"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16143"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16196">
    <title>(no subject)</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16196</link>
    <description>&lt;pre&gt;Helly guys,

I am trying to run a simple test program, however, it segfaults:

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;gtk/gtk.h&amp;gt;
#include &amp;lt;pygobject.h&amp;gt;

int main(int argc, char **argv)
{
    gdk_init(&amp;amp;argc, &amp;amp;argv);
    
    GtkWidget *test = gtk_button_new();

    PyObject *p = pygobject_new ((GObject *) test);

    printf("%p\n", p);

    return 0;
}

$ gcc -std=c99 -Wall `pkg-config --cflags --libs gtk+-2.0` -I/usr/include/python2.7 -I/usr/include/pygtk-2.0 -o debug debug.c &amp;amp;&amp;amp; ./debug
zsh: segmentation fault  ./debug

If I remove the line containing pygobject_new it works. What am I doing wrong?

$ uname -a
Linux helix 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux

$ cat /etc/issue
Debian GNU/Linux wheezy/sid

$ dpkg -l python2.7-dev|grep python                 
ii  python2.7-dev                         2.7.3~rc2-2.1                   Header files and a static library for Python (v2.7)

$ dpkg -l python-gobject-2-dev|grep python
ii  python-gobject-2-dev                  2.28.6-10                    development headers for the static GObject Python bindings

Best regards,
Manne Tallmarken
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Manne Tallmarken</dc:creator>
    <dc:date>2012-05-21T09:00:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16195">
    <title>pygobject_new segfault</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16195</link>
    <description>&lt;pre&gt;Helly guys,

I am trying to run a simple test program, however, it segfaults:

#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;gtk/gtk.h&amp;gt;
#include &amp;lt;pygobject.h&amp;gt;

int main(int argc, char **argv)
{
    gdk_init(&amp;amp;argc, &amp;amp;argv);
   
    GtkWidget *test = gtk_button_new();

    PyObject *p = pygobject_new ((GObject *) test);

    printf("%p\n", p);

    return 0;
}

$ gcc -std=c99 -Wall `pkg-config --cflags --libs gtk+-2.0` -I/usr/include/python2.7 -I/usr/include/pygtk-2.0 -o debug debug.c &amp;amp;&amp;amp; ./debug
zsh: segmentation fault  ./debug

If I remove the line containing pygobject_new it works. What am I doing wrong?

$ uname -a
Linux helix 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux

$ cat /etc/issue
Debian GNU/Linux wheezy/sid

$ dpkg -l python2.7-dev|grep python                
ii  python2.7-dev                         2.7.3~rc2-2.1                   Header files and a static library for Python (v2.7)

$ dpkg -l python-gobject-2-dev|grep python
ii  python-gobject-2-dev                  2.28.6-10                    development headers for the static GObject Python bindings

Best regards,
Manne Tallmarken
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Manne Tallmarken</dc:creator>
    <dc:date>2012-05-21T09:06:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16192">
    <title>shrink window to minimum size when some child widgets arehidden</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16192</link>
    <description>&lt;pre&gt;Hi,
It happens to me many times that after hiding some widgets in the window,
the window keeps the original size
leaving part of the window with just window background (gray) visible.
I'm searching for a solution, but had no luck so far.
Does anybody know how to behave to have the window to shrink to minimum
size given the actual displayed widgets?
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Giuseppe Penone</dc:creator>
    <dc:date>2012-05-20T15:49:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16190">
    <title>gtk.SpinButton - weird behaviour</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16190</link>
    <description>&lt;pre&gt;Hello,

we have a GTK2 python app which uses a gtk.SpinButton with a precision 
of 1, i.e. numbers like 1234.5. This widget behaves oddly when trying to 
enter values directly with the keyboard. It is difficult to describe; 
when you click the field and enter some digits, only the first is 
accepted, then the marker jumps to the end of the field (after the 
decimal digit) where you cannot enter anything. You can move the mark 
manually again and enter some more digits. It just isn't possible to 
click the field once and enter "1234.5" like it should.

Is this a known GTK problem/bug? We're using GTK 2.20. The spinButton is 
configured with digits=1, numeric=True, snap-to-ticks=False, 
alignment=1, increments=0.1,10.

Thanks,
Andreas
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Andreas Heinlein</dc:creator>
    <dc:date>2012-05-16T08:08:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16184">
    <title>Porting to gobject and pygi questions?</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16184</link>
    <description>&lt;pre&gt;Hello All,


  Appologies for asking on the pygtk list but -

I'm starting to port my app from pygtk to pygobject and running up against various problems... however I can't work out where to ask questions about pygi - the bugtracker on gnome says it's closed and I can't find a mailinglist for it (!)

 
S++_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Stuart Axon</dc:creator>
    <dc:date>2012-05-09T11:49:32</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16181">
    <title>PyGTK Windows debugging.</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16181</link>
    <description>&lt;pre&gt;I usually debug PyGTK programs in the first instance
by starting them from a terminal and reading any error
messages written to stdout.  This works on Linux, but
apparently not on Windows, and for some reason I can't
find a clear Windows equivalent.

What's the usual way of getting error messages out of
a GUI under Windows?  Do I have to open a second window
and feed the messages across with eg. a pipe?

Thanks for any ideas - Will





_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>cwr&lt; at &gt;netcom.co.uk</dc:creator>
    <dc:date>2012-05-07T15:26:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16169">
    <title>Questions about PyGObject</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16169</link>
    <description>&lt;pre&gt;Hi,

I hope this is the right list for PyGObject?
(If not, please ignore the rest and tell me what the right one is!)

I want to use PyGObject to create some GUI applications using Python 3.1
and Gtk 3.

And I want to test the applications against Python 3.1, 3.2, 3.3, ... on
Linux, Windows, and Mac OS X.

On the plus side, Fedora 16 and Ubuntu 11 both provide packages for
Python 3.2 + PyGObject + Gtk 3, so I can create the applications.

I have locally built and installed versions of Python 3.1, 3.2 (and soon
3.3), but have not been able to install PyGObject with any of them. Has
anyone done this who can point me to or provide (simple!) instructions?

I tried using jhbuild as per http://live.gnome.org/PyGObject It
wouldn't build gnome-doc-utils so I told it to skip that; but it also
failed to build glib so there was no point in continuing. Strangly it
looked like a Python 2 vs. Python 3 problem.

Also, there only seem to be Windows binaries for Python 2 (and they are
all a year old); and none for Python 3. At least not where I looked:
http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.28/

Thanks!

&lt;/pre&gt;</description>
    <dc:creator>Mark Summerfield</dc:creator>
    <dc:date>2012-04-27T09:00:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16168">
    <title>gtk.TreeView displays all right on Windows, but can't see the values on Ubuntu(sry, i don't know why the indentation became a mess last time )</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16168</link>
    <description>&lt;pre&gt;Sorry, every time i finish writing an email which has codes in, the indentation no problem, but when i send it, i found it becomes a mess....

so i have to send it again

Hi, All,
first thanks the people who gave helps to me, 

now i encountered another question...
my first program LionCalculator, works ok on Windows, but there is a
problem on Ubuntu.

LionCalculator has a function that can store the previous calculation
results to the gtk.ListStore.

when pressing F1--F12 or clicking the gtk.CellRendererRadio, the gtk.Entry
will get the corresbonding values stored in ListStore.

when i run the program on Windows, no problem, i can see everything that
should display on the screen. but when i run it on Ubuntu, i can't see
the "F1" -- "F12" in the ListStore, can't see the calculation results
that should also display on ListStore, only the gtk.CellRendererRadio
showed. i don't understand...

and when i add "print ...get_store()[0][0]" and run it again, it print
"F1"! strange... and when i press F1 or F2..., the result will copy to
the entry, although it does not display in the TreeView, strange...

the following are codes:

#in class ResultsView......
def make_view(self):
    # make ListStore for storing results
    self.results_store = gtk.ListStore(gobject.TYPE_STRING,
                                       gobject.TYPE_BOOLEAN,
                                       gobject.TYPE_STRING)

    #to store 12 calculation results, "F1"--"F2" will show
    #in the 1st column
    for i in xrange(12):
        self.results_store.append(["F%d" % (i+1), None, None])

    self.results_view = gtk.TreeView(self.results_store)

    #f_renderer is for "F1" -- "F12"
    f_renderer = gtk.CellRendererText()
    f_renderer.set_property( 'editable', False )
    f_renderer.set_property("size", 5)
    f_renderer.set_property("cell-background", "cyan")

    #when clicked bt_renderer, it will copy the 
    #corresbonding values to gtk.Entry    
    bt_renderer = gtk.CellRendererToggle()
    bt_renderer.set_property('activatable', True)
    bt_renderer.set_property("radio", True)
    bt_renderer.set_property("cell-background", "grey")
    bt_renderer.connect("toggled", self.ready_cp, self.results_store)

    #txt_renderer is for storing calculation results
    txt_renderer = gtk.CellRendererText()
    txt_renderer.set_property( 'editable', False )
    txt_renderer.set_property("size", 5)
    txt_renderer.set_property("cell-background", "green")

    #i guess the problem is in the following, but i don't know where it
    #exactly is, ok in Windows, can't show in Ubuntu...

    bt_column = gtk.TreeViewColumn("F1--F12")
    bt_column.pack_start(f_renderer, True)
    bt_column.pack_start(bt_renderer, False)
    bt_column.set_attributes(f_renderer, text=0)
    bt_column.add_attribute(bt_renderer, "active", 1)

    
    txt_column = gtk.TreeViewColumn("Calculation Results ", 
                                    txt_renderer,
                                    text=2)

    self.results_view.append_column(bt_column)
    self.results_view.append_column(txt_column)

    self.results_view.show()

    return self.results_view

#in class LionCalc....
    def __init__(self):
    ......
    self.results_view = ResultsView()
    right_vbox.pack_start(self.results_view.make_view(), True, True, 0)

    win.show_all()

could anybody give me help? thanks.


&lt;/pre&gt;</description>
    <dc:creator>Lion Chen</dc:creator>
    <dc:date>2012-04-25T07:33:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16167">
    <title>gtk.TreeView displays all right on Windows, but can't see the values on Ubuntu</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16167</link>
    <description>&lt;pre&gt;Hi, All,
first thanks the people who gave helps to me, :)

now i encountered another question...
my first program LionCalculator, works ok on Windows, but there is a
problem on Ubuntu.

LionCalculator has a function that can store the previous calculation
results to the
gtk.ListStore((gobject.TYPE_STRING, gobject.TYPE_BOOLEAN,
gobject.TYPE_STRING))

for i in xrange(12):
self.results_store.append(["F%d" % (i+1), None, None])

when pressed F1--F12 or click the gtk.CellRendererRadio, the gtk.Entry
will get the corresbonding values stored in ListStore.

when i run the program on Windows, no problem, i can see everything that
should display on the screen. but when i run it on Ubuntu, i can't see
the "F1" -- "F12" in the ListStore, can't see the calculation results
that should also display on ListStore, only the gtk.CellRendererRadio
showed.
i don't understand...

and when i add "print ...get_store()[0][0]" and run it again, it print
"F1"! strange... and when i press F1 or F2..., the result will copy to
the entry,
although it does not display in the TreeView, strange...

the following are codes:

#in class ResultsView......
def make_view(self):
# make ListStore for storing results
self.results_store = gtk.ListStore(gobject.TYPE_STRING,
gobject.TYPE_BOOLEAN,
gobject.TYPE_STRING)

#to store 12 calculation results, the results_store[0][0] is "F1--F12"
for i in xrange(12):
self.results_store.append(["F%d" % (i+1), None, None])

self.results_view = gtk.TreeView(self.results_store)

#f_renderer is for "F1" -- "F12"
f_renderer = gtk.CellRendererText()
f_renderer.set_property( 'editable', False )
f_renderer.set_property("size", 5)
f_renderer.set_property("cell-background", "cyan")

#when clicked bt_renderer, it will copy the corresbonding values to
gtk.entry
bt_renderer = gtk.CellRendererToggle()
bt_renderer.set_property('activatable', True)
bt_renderer.set_property("radio", True)
bt_renderer.set_property("cell-background", "grey")
bt_renderer.connect("toggled", self.ready_cp, self.results_store)

#txt_renderer is for storing calculation results
txt_renderer = gtk.CellRendererText()
txt_renderer.set_property( 'editable', False )
txt_renderer.set_property("size", 5)
txt_renderer.set_property("cell-background", "green")

#i guess the problem is in the following, but i don't know where it
exactly is, ok in Windows, can't show in Ubuntu...
bt_column = gtk.TreeViewColumn("F1--F12")
bt_column.pack_start(f_renderer, True)
bt_column.pack_start(bt_renderer, False)
bt_column.set_attributes(f_renderer, text=0)
#set active to be clickable. and the bt_columen is
#corresbonding to results_store columne 1
bt_column.add_attribute(bt_renderer, "active", 1)

#and txt_column is corresbonding to the store column 2
txt_column = gtk.TreeViewColumn("Calculation Results ", txt_renderer,
text=2)
self.results_view.append_column(bt_column)
self.results_view.append_column(txt_column)

self.results_view.show()

return self.results_view

#in class LionCalc....
def __init__(self):
......
self.results_view = ResultsView()
right_vbox.pack_start(self.results_view.make_view(), True, True, 0)

win.show_all()

could anybody give me help? thanks.

&lt;/pre&gt;</description>
    <dc:creator>Lion Chen</dc:creator>
    <dc:date>2012-04-25T04:41:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16164">
    <title>why gtk.Entry does not give me right answers?</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16164</link>
    <description>&lt;pre&gt;Hi, All,

i am trying write a calculator, now normal calculation works ok. but if
i enter long numbers, for example 333333333333333333 + 7, it gives me
"333333333333333312".....

there are 18 "3"s, if the length is more than 17, the calculation will
be wrong on Windows and Ubuntu.

the following is some of my codes:

def pre_calc(self, op):
#if entry is empty, any operators are invalid except "-"
if not self.entry.get_text() and op != "-":
return

if not self.entry.get_text() and op == "-":
self.entry.set_text(op)
self.cleared = 1
self.negative_sign = True#indicates there's already a "-"
return

#retrieve the 1st num and operator
if not self.op and self.entry.get_text():
if op != "=":
self.op = op
#print "text typ:", type(self.entry.get_text())
self.first_num = self.entry.get_text()
self.cleared = 0 # ready to input 2nd num
#print "op:", self.op, "-----", "1st num:", self.first_num
return
else:
self.first_num = None
self.second_num = None
self.op = None
self.cleared = 0
self.negative_sign = False
return

#retrieve the second num and begin calculation
elif self.op and self.first_num and self.entry.get_text() != "-":
if op == "=":
self.second_num = self.entry.get_text()
self.calc()
#reset the following varibles, awaiting next round of inputs
self.first_num = None
self.second_num = None
self.op = None
self.cleared = 0
self.negative_sign = False
return
elif op == "-":
if self.cleared == 1: #if user has input 2nd num already
self.second_num = self.entry.get_text()
self.calc()
self.first_num = self.entry.get_text()
self.op = op
self.cleared = 0
self.negative_sign = False
return
else:
self.entry.set_text(op)
self.cleared = 1
self.negative_sign = True#indicates there's already a "-"
return
else:
self.op = op
if self.cleared == 1:
self.second_num = self.entry.get_text()
self.calc()
self.first_num = self.entry.get_text()
self.cleared = 0
self.negative_sign = False
return
else:
return

def calc(self, unary_op = None):
if not unary_op:
if (not self.first_num) or (not self.second_num) or \
(not self.op):
return

result = None

calc_methods = {"+": self.add,
"-": self.subtract,
"*": self.multiply,
"/": self.divide,
"%": self.mod,
"pwr": self.power,
"|": self.b_or,
"&amp;amp;": self.b_and,
"^": self.b_exc,
"&amp;lt;&amp;lt;": self.b_lshift,
"&amp;gt;&amp;gt;": self.b_rshift
}

unary_methods ={"~": self.b_invert,
"1/x": self.a_fraction,
"sqrt": self.sqrt
}

if not unary_op:
for op, method in calc_methods.items():
if self.op == op:
result = calc_methods[op]()
else:
for op, method in unary_methods.items():
if unary_op == op:
result = unary_methods[op]()

self.entry.set_text(result)

def add(self):
result = None
#if hex system
#print type(self.first_num)
if self.hdob["h"].get_active():
self.first_num = long(self.first_num, 16)
self.second_num = long(self.second_num, 16)
r = self.first_num + self.second_num

r = self.convert.d2h(r)

return r

#if decimal system
elif self.hdob["d"].get_active():
self.first_num = float(self.first_num)
self.second_num = float(self.second_num)
result = self.first_num + self.second_num

if result - long(result) == 0:
#print str(long(result))
return str(long(result))
else:
return str(result)

#if octal system
elif self.hdob["o"].get_active():
self.first_num = long(self.first_num, 8)
self.second_num = long(self.second_num, 8)
result = self.first_num + self.second_num

result = self.convert.d2o(result)

return result

else:
self.first_num = long(self.first_num, 2)
self.second_num = long(self.second_num, 2)
result = bin(self.first_num + self.second_num)

result = self.convert.d2b(result)

return result
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Lion Chen</dc:creator>
    <dc:date>2012-04-23T11:25:14</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16163">
    <title>gobject.connect</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16163</link>
    <description>&lt;pre&gt;Hi everyone,

I am new to this mailing list. I am working on a program to perform data
analysis in python. This program is based on a library already developped,
that uses pygtk to create data-handling objects.
This data object inherits from gobject.GObject, and defines a few signals
"new-data-point".

I would like to connect this signal to a few functions, specifying the
arguments of these functions. I have read the PyGTK webpage (
http://www.pygtk.org/docs/pygobject/class-gobject.html#method-gobject--connect),
which specifies that i just have to concatenate in the "connect" call the
arguments: "object.connect("signal_name",handler,arg1,arg2,arg3)

I therefore have written:

data.connect("new-data-point", handler,'text')


and defined the handler function as suggested: def
handler(object,arg1,arg2,arg3)

def handler(data,argument):
    print data
    print argument

However, when i do execute the "connect" function, i get the error message:
"connect takes exactly 3 arguments (4 given).

Could you tell me how i could then specify arguments for the functions to
be called when the signal is given ?

Bests,

Pierre
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Pierre Barthelemy</dc:creator>
    <dc:date>2012-04-23T10:44:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16162">
    <title>gtk.window hide by closing trash</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16162</link>
    <description>&lt;pre&gt;hi all
i have an pygtk application. i run it full screen  in the gnome start-up. when i open trash and close it, application will be hide! i know it is running yet but didn't show.  this problem only occur with trash not another nautilus windows or other applications.
do you have any suggestion why this problem happen?
tanks
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>zahra rokni</dc:creator>
    <dc:date>2012-04-23T06:14:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16159">
    <title>How to set a wiget, eg a button size?</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16159</link>
    <description>&lt;pre&gt;Hi All,
       when i put some buttons in a hbutton box, the hbutton box becomes
very long....
       i don't know how to set a button size, set_size_request has no
effect....

       could anybody help me how to set the size for widgets?
       thanks

      Lion
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Chen Lion</dc:creator>
    <dc:date>2012-04-20T14:40:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16158">
    <title>A patch fix pango_cairo_create_layout that cause memoryleak.</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16158</link>
    <description>&lt;pre&gt;Hi all,

I just fix a bug of pango_cairo_create_layout that cause memory leak
(very bad), below is patch detail:

---------------------------------- patch start ----------------------------
Index: pygtk-2.24.0/pangocairo.override
===================================================================
--- pygtk-2.24.0.orig/pangocairo.override       2012-04-14
01:40:59.568703232 +0800
+++ pygtk-2.24.0/pangocairo.override    2012-04-14 01:41:05.792703324 +0800
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,10 +119,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 _wrap_pango_cairo_create_layout(PyGObject *self)
 {
    PangoLayout *ret;
+    PyObject *py_ret;

    ret = pango_cairo_create_layout(PycairoContext_GET(self));
    /* pygobject_new handles NULL checking */
-    return pygobject_new((GObject *)ret);
+    py_ret = pygobject_new((GObject *) ret);
+    if (ret) {
+       g_object_unref(ret);
+    }
+    return py_ret;
 }

 static PyObject *
---------------------------------- patch end -----------------------------

Please apply this patch, thanks!



 -- Andy
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Andy Stewart</dc:creator>
    <dc:date>2012-04-13T18:03:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16157">
    <title>segfault</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16157</link>
    <description>&lt;pre&gt;Hi,

We are experiencing a strange bug in our application, which result 
sometimes in a segfault, and sometimes in a freeze of the application.

it's related to accel groups.

In our application (quite big, and I haven't tried to make a small test 
case, but if someone is interested I can point to the code in our 
application), we open a window, and in the constructor, we create an 
accel group and attach it to the window ([0]).
One of the handled keys in Escape, and we close the window when we press 
Esc ([1]).

If I "play" to open the window, press Esc, open the window, press Esc, 
etc... At some point the application will segfault or freeze.

We gathered the output of gdb and strace (strange thing about futex??), 
attached to this mail, but we don't know how to go further in the 
debugging. Any idea about that?

Thanks in advanced.

[0] http://hg.gajim.org/gajim/file/93f6e8ddbc2a/src/message_window.py#l103
[1] http://hg.gajim.org/gajim/file/93f6e8ddbc2a/src/message_window.py#l423
&lt;/pre&gt;</description>
    <dc:creator>Yann Leboulanger</dc:creator>
    <dc:date>2012-04-12T20:45:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16155">
    <title>How to use gtk.stock_add()</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16155</link>
    <description>&lt;pre&gt;Hello all,
i want to add my own stock item, so i try the following:

import pygtk
pygtk.require('2.0')
import gtk

gtk.stock_add(["STOCK_1", "1", 0, 49, "gtk20") # just a test, 49 is the
value of "1", i don't want to use any GDK Modifier Constants
.
.
.
# i want to press "1" to quit , but it doesn't work, when i replace
gtk.STOCK_1 with gtk.STOCK_QUIT , it can work.
action = gtk.Action('Quit', "test test test", None, gtk.STOCK_1)

action.connect('activate', self.quit_cb)

quitbutton = gtk.Button()
.
.
.
action.connect_proxy(quitbutton)
.
.
.


when i run it, i got the message:

Traceback (most recent call last):
File "/home/lionchen/workspace/action/simpleaction.py", line 9, in &amp;lt;module&amp;gt;
gtk.stock_add(("STOCK_1", "_1", gtk.gdk.SHIFT_MASK, 49, "pymserv"))
TypeError: items sequence members must be of form (stock_id, label,
modifiers, keyval, domain)

could anybody explain what the domain exactly is? and how do i write the
correct gtk.stock_add()?

thanks.

Lion
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Lion Chen</dc:creator>
    <dc:date>2012-04-08T09:01:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16150">
    <title>How to use g_timeout_add () function?</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16150</link>
    <description>&lt;pre&gt;Hello all,  i have a question:

when i check gtk_time_out in the gtk+2 reference, it said " gtk_timeout_add has been deprecated since version 2.4 and should not be used in newly-written code. Use g_timeout_add() instead."

but i don't know how to use the g_timout_add() function. if i use the function, i would get an error message:

self.color_cycle_timeout_id = g_timeout_add(500, self.color_cycle_timeout())

Traceback (most recent call last):
  File "/home/lionchen/workspace/testtext/testtext_bak.py", line 296, in set_colors
    self.color_cycle_timeout_id = g_timeout_add(500, self.color_cycle_timeout())
NameError: global name 'g_timeout_add' is not defined
 
or:

self.color_cycle_timeout_id = gtk.g_timeout_add(500, self.color_cycle_timeout())

Traceback (most recent call last):
  File "/home/lionchen/workspace/testtext/testtext_bak.py", line 296, in set_colors
    self.color_cycle_timeout_id = gtk.g_timeout_add(500, self.color_cycle_timeout())
AttributeError: 'module' object has no attribute 'g_timeout_add'

when i use the gtk.timeout_add(), no error message occurse.

can i use g_timeout_add() in pygtk?

_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Lion Chen</dc:creator>
    <dc:date>2012-04-06T15:03:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16148">
    <title>signal for detecting a losing focus in an entry</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16148</link>
    <description>&lt;pre&gt;I'm successfully catching a &amp;lt;return&amp;gt; in an entry field and updating another computed field. I would like to catch and edit then a tab out as well. Is there a signal for this? What I have now is :
 self.foo  = gtk.Entry(15)
 self.foo.connect('activate', self.update)


thanks,
joe

_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Joe Nall</dc:creator>
    <dc:date>2012-04-05T02:53:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16145">
    <title>Custom Entry Widget</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16145</link>
    <description>&lt;pre&gt;Hi everybody,

I'm new to pygtk, and new to this list as well.
I'm trying to find a way to implement a custom Entry Widget (image
attached) with an embed Label inside a Rectangle area, but have no clue
where to start.
Is there a way to draw a label and a entry inside a gtk.DrawingArea ?
Or is it easier to draw the label and the entry widget inside a gtk.Frame ?

thanks in advance.

---
Clayton A. Alves
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Clayton Alves</dc:creator>
    <dc:date>2012-04-04T00:50:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16143">
    <title>How to widget.queue_draw_region(cairo.Region) with Gtk+ 3.0</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16143</link>
    <description>&lt;pre&gt;It seems that cairo.Region replaced gdk.Rectangle in Gtk 3.0. However, 
the cairo.Region was not wrapped anywhere. How do we invalidate parts of 
a widget for redraw? I got:

     self.drawing_area.queue_draw_region(rect)
   File "/usr/lib/python2.7/site-packages/gi/types.py", line 44, in function
     return info.invoke(*args)
TypeError: Couldn't find conversion for foreign struct 'cairo.Region'

_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

&lt;/pre&gt;</description>
    <dc:creator>Just Fill Bugs</dc:creator>
    <dc:date>2012-03-30T08:35:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16140">
    <title>key value file parser with pygtk</title>
    <link>http://comments.gmane.org/gmane.comp.gnome.gtk+.python/16140</link>
    <description>&lt;pre&gt;Hi,
I didn' find documentation on how to use key value file parser (
http://www.gtk.org/api/2.6/glib/glib-Key-value-file-parser.html)
with pygtk, can anybody point me to it?
Best regards,
Giuseppe.
_______________________________________________
pygtk mailing list   pygtk&amp;lt; at &amp;gt;daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/&lt;/pre&gt;</description>
    <dc:creator>Giuseppe Penone</dc:creator>
    <dc:date>2012-03-28T10:26:30</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.gnome.gtk+.python">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gnome.gtk+.python</link>
  </textinput>
</rdf:RDF>

