entrance: improve login appearance in conf panel

devs/bu5hm4n/develop
Michael Bouchaud 9 years ago
parent 6183f3d7ab
commit c2f54553b6
  1. 20
      data/themes/default/default.edc
  2. 1
      src/bin/entrance_conf.c
  3. 23
      src/bin/entrance_login.c

@ -308,7 +308,7 @@ collections {
type: EXTERNAL;
source: "elm/button";
repeat_events: 0;
description {
description { state: "default" 0.0;
max: 9999 0;
rel1.to: "entrance.password";
rel1.relative: 0.5 1.0;
@ -319,22 +319,26 @@ collections {
string: "label" "Login";
}
}
description { state: "xsessions_disabled" 0.0;
inherit: "default" 0.0;
rel1.relative: 0.0 1.0;
}
}
part { name: "entrance.xsessions";
type: SWALLOW;
description { state: "default" 0.0;
max: 9999 0;
fixed: 1 1;
rel1.to: "entrance.password";
rel1.relative: 0.0 1.0;
rel2.to_x: "entrance.password";
rel2.relative: 0.5 1.0;
align: 0.5 0.0;
//visible: 0;
visible: 1;
}
description { state: "enabled" 0.0;
description { state: "xsessions_disabled" 0.0;
inherit: "default" 0.0;
visible: 1;
visible: 0;
}
}
part { name: "entrance.error";
@ -376,15 +380,17 @@ collections {
name: "xsession_enabled";
signal: "entrance,xsession,enabled";
source: "";
action: STATE_SET "enabled" 0.0;
action: STATE_SET "default" 0.0;
target: "entrance.xsessions";
target: "login_button";
}
program {
name: "xsession_disabled";
signal: "entrance,xsession,disabled";
source: "";
action: STATE_SET "default" 0.0;
action: STATE_SET "xsessions_disabled" 0.0;
target: "entrance.xsessions";
target: "login_button";
}
program {
name: "login_error";

@ -552,6 +552,7 @@ _entrance_conf_user_build(Evas_Object *obj)
evas_object_show(ly);
o = entrance_login_add(ly, _entrance_conf_user_auth, ly);
entrance_login_open_session_set(o, EINA_FALSE);
elm_object_part_content_set(ly, "entrance.login", o);
evas_object_show(o);
t = elm_table_add(obj);

@ -507,8 +507,6 @@ entrance_login_xsessions_populate(Evas_Object *widget, Eina_List *xsessions)
_login_xsession_clicked_cb, widget);
login->session = eina_list_data_get(xsessions);
_login_xsession_update(widget);
edje_object_signal_emit(widget,
"entrance,xsession,enabled", "");
}
void
@ -522,7 +520,7 @@ entrance_login_login_set(Evas_Object *widget, const char *user)
o = elm_object_part_content_get(widget, "entrance.password");
elm_object_focus_set(o, EINA_TRUE);
_login_xsession_guess(widget, user);
_login_xsession_guess(widget, user);
}
void
@ -531,14 +529,19 @@ entrance_login_open_session_set(Evas_Object *widget, Eina_Bool open_session)
Evas_Object *o;
LOGIN_GET(widget);
open_session = !!open_session;
if (login->open_session != open_session)
login->open_session = open_session;
o = elm_object_part_content_get(widget, "entrance.xsessions");
if (login->open_session)
{
login->open_session = open_session;
o = elm_object_part_content_get(widget, "entrance.xsessions");
if (login->open_session)
evas_object_show(o);
else
evas_object_hide(o);
elm_object_signal_emit(widget,
"entrance,xsession,enabled", "");
evas_object_show(o);
}
else
{
elm_object_signal_emit(widget,
"entrance,xsession,disabled", "");
evas_object_hide(o);
}
}

Loading…
Cancel
Save