Skip to content

Commit

Permalink
efl: cl wip
Browse files Browse the repository at this point in the history
  • Loading branch information
borisfaure committed Oct 31, 2009
1 parent c70b91c commit 3d91fb6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions amsn2/gui/front_ends/efl/contact_list.py
Expand Up @@ -232,6 +232,7 @@ def cb_(obj,event):
if c.data['on_click'] is not None:
c.on_mouse_down_del(c.data['on_click'])
c.data['on_click'] = None
c.size_hint_min_set(26, 26)
c.show()
print c.size_hint_min_get()

Expand Down Expand Up @@ -260,8 +261,10 @@ def add_contact(self, uid):
self.contacts_list.append(new_contact)
self.contacts_dict[uid] = new_contact
self.pack_end(new_contact)
new_contact.size_hint_min_set(26, 26)
new_contact.size_hint_weight_set(1.0, 1.0)
new_contact.size_hint_align_set(-1.0, -1.0)
print new_contact.size_hint_min_get()


def remove_contact(self, uid):
Expand Down Expand Up @@ -297,7 +300,7 @@ def __init__(self, parent, uid):
self.edj.signal_callback_add("expanded", "*", self.__expanded_cb)

self.size_hint_weight_set(1.0, 0.0)
self.size_hint_align_set(-1.0, -1.0)
self.size_hint_align_set(-1.0, 0.0)

def num_contacts(self):
if self.expanded == False:
Expand All @@ -315,13 +318,17 @@ def __expanded_cb(self, edje_obj, signal, source):
print "expand"
print self.size_hint_min_get()
print self.contact_holder.size_hint_min_get()
for c in self.contact_holder.contacts_list:
print c.size_hint_min_get()
self.contact_holder.hide()

def __collapsed_cb(self, edje_obj, signal, source):
self.expanded = False
print "collapse"
print self.size_hint_min_get()
print self.contact_holder.size_hint_min_get()
for c in self.contact_holder.contacts_list:
print c.size_hint_min_get()
self.contact_holder.show()

class GroupHolder(elementary.Box):
Expand All @@ -331,8 +338,8 @@ def __init__(self, ecanvas, parent, skin):
self.group_items_dict = {}
self._parent = parent
self._skin = skin
self.size_hint_weight_set(1.0, 1.0)
self.size_hint_align_set(-1.0, -1.0)
self.size_hint_weight_set(1.0, 0.0)
self.size_hint_align_set(-1.0, 0.0)

def add_group(self, uid):
new_group = GroupItem(self, uid)
Expand Down

0 comments on commit 3d91fb6

Please sign in to comment.