# Attach menu to the window
win.set_app_menu(menu)
+ #pannable_area = hildon.PannableArea()
+
model = treeview.get_model()
miter = model.get_iter(path)
# column 0 is the portrait, column 1 is name
char_name = model.get_value(miter, 1)
+ char_id = self.controller.char_name2id(char_name)
win.set_title(char_name)
- label = gtk.Label("This is a subview with information about %s" % char_name)
+ skillLabel = gtk.Label("Skills")
+
+ # TODO: replace these with api calls
+ corp_name = ""
+ skill_points = 0
+
+ name = gtk.Label("Name: %s" % char_name)
+ name.set_alignment(0, 0.5)
+
+ corp = gtk.Label("Corp: %s" % corp_name)
+ corp.set_alignment(0, 0.5)
+
+ balance = gtk.Label("Balance: %s ISK" %
+ self.controller.get_account_balance(char_id))
+ balance.set_alignment(0, 0.5)
+
+ sp = gtk.Label("Skill points: %s" % skill_points)
+ sp.set_alignment(0, 0.5)
+
portrait = gtk.Image()
portrait.set_from_file(self.controller.get_portrait(char_name, 256))
portrait.show()
+
+ hbox = gtk.HBox(False, 0)
+ info_vbox = gtk.VBox(False, 0)
+ info_vbox.pack_start(name, False, False, 1)
+ info_vbox.pack_start(corp, False, False, 1)
+ info_vbox.pack_start(balance, False, False, 1)
+ info_vbox.pack_start(sp, False, False, 1)
+ hbox.pack_start(portrait, False, False, 10)
+ hbox.pack_start(info_vbox, False, False, 5)
+ #hbox.pack_start(stats_vbox, False, False, 5)
+
vbox = gtk.VBox(False, 0)
- vbox.pack_start(portrait, True, True, 0)
- vbox.pack_start(label, True, True, 0)
+ #pannable_area.add(vbox)
+
+ vbox.pack_start(hbox, False, False, 0)
+ vbox.pack_start(skillLabel, False, False, 5)
win.add(vbox)
win.show_all()
-
+
def create_char_model(self):
lstore = gtk.ListStore(gtk.gdk.Pixbuf, gobject.TYPE_STRING)