Here's a code sample that doesn't require messing with the expose event:
import gtk
from gwibber.lib.gtk import widgets
class MicroblogDialog(gtk.Window):
def __init__(self, contents, parent=None): gtk.Window.__init__(self) self.set_default_size(420,140) poster = widgets.GwibberPosterVBox(content=contents) poster.input.connect("submit",self.submitted) poster.button_send.connect("clicked", self.submitted) self.add(poster) self.show_all()
def submitted(self, *args): self.destroy()
MicroblogDialog("This is a test") gtk.main()
Here's a code sample that doesn't require messing with the expose event:
import gtk
from gwibber.lib.gtk import widgets
class MicroblogDialog (gtk.Window) :
def __init__(self, contents, parent=None):
gtk.Window. __init_ _(self)
self.set_ default_ size(420, 140) GwibberPosterVB ox(content= contents)
poster. input.connect( "submit" ,self.submitted )
poster. button_ send.connect( "clicked" , self.submitted)
self.add( poster)
self.show_ all()
poster = widgets.
def submitted(self, *args):
self.destroy( )
MicroblogDialog ("This is a test")
gtk.main()