Skip to content

Commit

Permalink
[EFL] add checkbox to login window
Browse files Browse the repository at this point in the history
  • Loading branch information
borisfaure committed Oct 22, 2009
1 parent 6c9656b commit bc57359
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
24 changes: 24 additions & 0 deletions amsn2/gui/front_ends/efl/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ def __init__(self, amsn_core, parent):

#TODO: login_screen.status

self.save = elementary.Check(self._edje)
self.save.label_set("Remember Me")
self._edje.part_swallow("login_screen.remember_me", self.save)
self.save.show()

self.save_password = elementary.Check(self._edje)
self.save_password.label_set("Remember Password")
self._edje.part_swallow("login_screen.remember_password",
self.save_password)
self.save_password.show()

self.autologin = elementary.Check(self._edje)
self.autologin.label_set("Auto Login")
self._edje.part_swallow("login_screen.auto_login", self.autologin)
self.autologin.show()

if self._edje.part_exists("login_screen.signin"):
self.signin_b = elementary.Button(self._edje)
self.signin_b.label_set("Sign in")
Expand Down Expand Up @@ -96,6 +112,10 @@ def setAccounts(self, accountviews):
acc = accountviews[0]
self.username.entry_set(acc.email)
self.password.entry_set(acc.password)
#TODO: presence
self.save.state_set(acc.save)
self.save_password.state_set(acc.save_password)
self.autologin.state_set(acc.autologin)


def signin(self):
Expand All @@ -110,6 +130,10 @@ def signin(self):
accv = accv[0]
accv.password = password

accv.save = self.save.state_get()
accv.save_password = self.save_password.state_get()
accv.autologin = self.autologin.state_get()

self._amsn_core.signinToAccount(self, accv)

def onConnecting(self, progress, message):
Expand Down
10 changes: 1 addition & 9 deletions amsn2/themes/default/edc/login_screen/options_frame.edc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CREATE_FRAME("options_frame", "fields_frame", 76)
#define CREATE_OPTION(NAME, OFFSET) \
part { \
name: NAME; \
type: TEXT; \
type: SWALLOW; \
clip_to: "options_frame"; \
description { \
min: 50 20; \
Expand All @@ -19,14 +19,6 @@ CREATE_FRAME("options_frame", "fields_frame", 76)
relative: 0.8 0.0; \
offset: 0 (OFFSET+20); \
} \
text { \
align: 0.0 0.5; \
font: "VeraBd"; \
size: 10; \
text: NAME; \
min: 0 0; \
elipsis: 0.0; \
} \
} \
}

Expand Down

0 comments on commit bc57359

Please sign in to comment.