Laid groundwork for displaying avatar images
This commit is contained in:
@ -227,7 +227,7 @@ gobject.signal_new("verified-set", TweetPane,
|
||||
|
||||
|
||||
|
||||
class TweetBox(gtk.VBox):
|
||||
class TweetBox(gtk.HBox):
|
||||
|
||||
'''
|
||||
GUI for displaying one tweet and associated buttons
|
||||
@ -236,7 +236,7 @@ class TweetBox(gtk.VBox):
|
||||
'''
|
||||
|
||||
def __init__(self):
|
||||
gtk.VBox.__init__(self)
|
||||
gtk.HBox.__init__(self)
|
||||
|
||||
self.screen_name = None
|
||||
self.id = None
|
||||
@ -247,11 +247,20 @@ class TweetBox(gtk.VBox):
|
||||
|
||||
|
||||
def init_widgets(self):
|
||||
# Build the image
|
||||
self.avatar = gtk.Image()
|
||||
|
||||
self.pack_start(self.avatar, expand=False, fill=False)
|
||||
|
||||
# Everything else goes in a VBox beside the image
|
||||
text_box = gtk.VBox()
|
||||
self.pack_start(text_box)
|
||||
|
||||
## Build the header
|
||||
self.header = gtk.Button()
|
||||
label_eb = gtk.EventBox()
|
||||
label_eb.add(self.header)
|
||||
self.pack_start(label_eb)
|
||||
text_box.pack_start(label_eb)
|
||||
|
||||
# Set the header's properties
|
||||
label_eb.modify_text(gtk.STATE_NORMAL,gtk.gdk.color_parse("#ffffff"))
|
||||
@ -268,7 +277,7 @@ class TweetBox(gtk.VBox):
|
||||
text_align.add(self.text)
|
||||
self.text_eb = gtk.EventBox()
|
||||
self.text_eb.add(text_align)
|
||||
self.pack_start(self.text_eb)
|
||||
text_box.pack_start(self.text_eb)
|
||||
|
||||
# Set the text's properties
|
||||
text_align.set_padding(2, 5, 10, 5)
|
||||
@ -283,7 +292,7 @@ class TweetBox(gtk.VBox):
|
||||
button_box_align = gtk.Alignment()
|
||||
button_box_align.set_padding(0, 15, 0, 0)
|
||||
button_box = gtk.HBox()
|
||||
self.pack_start(button_box)
|
||||
text_box.pack_start(button_box)
|
||||
|
||||
self.reply_to_button = gtk.Button("")
|
||||
self.reply_to_button.set_relief(gtk.RELIEF_NONE)
|
||||
|
Reference in New Issue
Block a user