A little bit more work on Desktop Locking:
- an look and feel of the desklock window is desined. However, it requires a little bit work on alligments. SVN revision: 20655
This commit is contained in:
parent
7a044a1d5c
commit
7df1d76c4b
|
@ -52,6 +52,7 @@ default_ilist.edc \
|
|||
default_tlist.edc \
|
||||
default_slider.edc \
|
||||
default_exebuf.edc \
|
||||
default_desklock.edc \
|
||||
default_textblock.edc \
|
||||
default_shelf.edc
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@ collections {
|
|||
#include "default_tlist.edc"
|
||||
#include "default_slider.edc"
|
||||
#include "default_exebuf.edc"
|
||||
#include "default_desklock.edc"
|
||||
#include "default_textblock.edc"
|
||||
#include "default_shelf.edc"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,213 @@
|
|||
images {
|
||||
image, "e17_entry_cursor.png" COMP;
|
||||
image, "e17_brushed.png" COMP;
|
||||
image, "e17_logo.png" COMP;
|
||||
image, "e17_gadman_overlay.png" COMP;
|
||||
}
|
||||
|
||||
group
|
||||
{
|
||||
name, "widgets/desklock/main";
|
||||
min, 640 480;
|
||||
|
||||
parts
|
||||
{
|
||||
part
|
||||
{
|
||||
name, "background";
|
||||
type, IMAGE;
|
||||
mouse_events, 0;
|
||||
|
||||
description
|
||||
{
|
||||
state, "default" 0.0;
|
||||
|
||||
rel1
|
||||
{
|
||||
relative, 0.0 0.0;
|
||||
offset, 0 0;
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 1.0 1.0;
|
||||
offset, -1 -1;
|
||||
}
|
||||
image
|
||||
{
|
||||
normal, "e17_brushed.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name: "logo";
|
||||
mouse_events, 0;
|
||||
description
|
||||
{
|
||||
state, "default" 0.0;
|
||||
min, 64 64;
|
||||
max, 64 64;
|
||||
//align, 0.5 0.0;
|
||||
rel1
|
||||
{
|
||||
relative, 0.3 0.5;
|
||||
offset, 0 0;
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 0.3 0.5;
|
||||
offset, 0 0;
|
||||
}
|
||||
image
|
||||
{
|
||||
normal, "e17_logo.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name: "text_label1";
|
||||
type: TEXT;
|
||||
effect: SHADOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
fixed: 0 1;
|
||||
align: 0.0 0.5;
|
||||
rel1
|
||||
{
|
||||
relative, 1.0 0.0;
|
||||
offset, 20 0;
|
||||
to, "logo";
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 1.0 0.3;
|
||||
offset, 0 0;
|
||||
to, "logo";
|
||||
}
|
||||
|
||||
color: 0 0 0 255;
|
||||
color3: 255 255 255 128;
|
||||
text {
|
||||
text: "Please enter your password to unlock:";
|
||||
font: "Edje-Vera-Bold";
|
||||
size: 10;
|
||||
align: 0.0 0.5;
|
||||
min: 1 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name, "passwd_border";
|
||||
mouse_events, 0;
|
||||
description
|
||||
{
|
||||
state, "default" 0.0;
|
||||
rel1
|
||||
{
|
||||
relative, 1.0 0.3;
|
||||
offset, 0 0;
|
||||
to, "logo";
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 5.0 0.9;
|
||||
offset, 0 0;
|
||||
to, "logo";
|
||||
}
|
||||
image
|
||||
{
|
||||
normal, "e17_gadman_overlay.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name, "passwd_entry_clip";
|
||||
type, RECT;
|
||||
mouse_events, 0;
|
||||
description
|
||||
{
|
||||
state, "default" 0.0;
|
||||
visible, 1;
|
||||
rel1
|
||||
{
|
||||
relative, 0.0 0.0;
|
||||
offset, 10 10;
|
||||
to, "passwd_border";
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 1.0 1.0;
|
||||
offset, -17 -10;
|
||||
to, "passwd_border";
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name, "passwd";
|
||||
type, TEXT;
|
||||
effect, SOFT_SHADOW;
|
||||
clip_to, "passwd_entry_clip";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 0 0 0 255;
|
||||
fixed: 0 1;
|
||||
align: 0.0 0.5;
|
||||
|
||||
rel1
|
||||
{
|
||||
relative, 0.0 0.0;
|
||||
offset, 0 0;
|
||||
to, "passwd_entry_clip";
|
||||
}
|
||||
rel2
|
||||
{
|
||||
relative, 0.0 1.0;
|
||||
offset, 0 0;
|
||||
to, "passwd_entry_clip";
|
||||
}
|
||||
|
||||
color: 0 0 0 255;
|
||||
color3: 255 255 255 128;
|
||||
text {
|
||||
text: "****";
|
||||
font: "Edje-Vera-Bold";
|
||||
size: 16;
|
||||
align: 0.0 0.5;
|
||||
min: 1 1;
|
||||
text_class: "desklock_passwd";
|
||||
}
|
||||
}
|
||||
}
|
||||
part
|
||||
{
|
||||
name, "cursor";
|
||||
mouse_events, 0;
|
||||
clip_to, "passwd_entry_clip";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
min: 16 16;
|
||||
max: 16 16;
|
||||
align: 0.0 0.5;
|
||||
fixed: 1 1;
|
||||
rel1 {
|
||||
relative: 1.0 0.0;
|
||||
offset: 0 -2;
|
||||
to: "passwd";
|
||||
}
|
||||
rel2 {
|
||||
relative: 1.0 0.9;
|
||||
offset: 0 0;
|
||||
to: "passwd";
|
||||
}
|
||||
image {
|
||||
normal: "e17_entry_cursor.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,10 +34,10 @@ e_desklock_show(void)
|
|||
|
||||
E_Zone *zone = NULL;
|
||||
|
||||
e_error_dialog_show(_("Enlightenment Desktop Lock!"),
|
||||
/*e_error_dialog_show(_("Enlightenment Desktop Lock!"),
|
||||
_("The Desktop Lock mechanism is not complitely working yet.\n"
|
||||
"It is just a simple development version of Desktop Locking.\n"
|
||||
"To return to E, just hit Enter"));
|
||||
"To return to E, just hit Enter"));*/
|
||||
|
||||
zone = e_zone_current_get(e_container_current_get(e_manager_current_get()));
|
||||
{
|
||||
|
@ -45,10 +45,10 @@ e_desklock_show(void)
|
|||
ecore_x_window_show(elock_wnd);
|
||||
e_grabinput_get(elock_wnd, 0, elock_wnd);
|
||||
|
||||
x = zone->x + 100;
|
||||
y = zone->y + 100;
|
||||
w = zone->w - 200;
|
||||
h = zone->h - 200;
|
||||
x = zone->x;
|
||||
y = zone->y;
|
||||
w = zone->w;
|
||||
h = zone->h;
|
||||
|
||||
elock_wnd_popup = e_popup_new(zone, x, y, w, h);
|
||||
evas_event_feed_mouse_move(elock_wnd_popup->evas, -1000000, -1000000,
|
||||
|
@ -60,15 +60,16 @@ e_desklock_show(void)
|
|||
bg_object = edje_object_add(elock_wnd_popup->evas);
|
||||
|
||||
// this option should be made as a user option.
|
||||
e_theme_edje_object_set(bg_object, "base/theme/background", "desktop/background");
|
||||
/*e_theme_edje_object_set(bg_object, "base/theme/background", "desktop/background");
|
||||
|
||||
passwd_entry = edje_object_add(elock_wnd_popup->evas);
|
||||
e_theme_edje_object_set(passwd_entry, "base/theme/exebuf", "widgets/exebuf/main");
|
||||
edje_object_part_text_set(passwd_entry, "label", passwd);
|
||||
e_theme_edje_object_set(passwd_entry, "base/theme/desklock", "widgets/desklock/main");
|
||||
edje_object_part_text_set(passwd_entry, "passwd", passwd);
|
||||
|
||||
edje_object_part_swallow(bg_object, "passwd_entry", passwd_entry);
|
||||
evas_object_move(passwd_entry, x + 200, y + 200);
|
||||
evas_object_show(passwd_entry);
|
||||
evas_object_show(passwd_entry);*/
|
||||
e_theme_edje_object_set(bg_object, "base/theme/desklock", "widgets/desklock/main");
|
||||
|
||||
|
||||
e_popup_move_resize(elock_wnd_popup, x, y, w, h);
|
||||
|
@ -177,6 +178,7 @@ e_desklock_show(void)
|
|||
"Double check to see if Enlightenment is not already on this display,\n"
|
||||
"but if that fails try deleting all files in ~/.ecore/enlightenment-*\n"
|
||||
"and try running again."));*/
|
||||
_e_desklock_passwd_update();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -204,6 +206,8 @@ e_desklock_hide(void)
|
|||
ecore_x_window_del(elock_wnd);
|
||||
e_grabinput_release(elock_wnd, elock_wnd);
|
||||
elock_wnd = 0;
|
||||
|
||||
memset(passwd, 0, sizeof(char) * PASSWD_LEN);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -219,13 +223,22 @@ _e_desklock_cb_key_down(void *data, int type, void *event)
|
|||
else if (!strcmp(ev->keysymbol, "KP_Enter"))
|
||||
{
|
||||
// here we have to go to auth
|
||||
e_desklock_hide(); // Actually, escape MUST be ignored.
|
||||
;
|
||||
if (1 || strcmp(passwd, "password") == 0)
|
||||
e_desklock_hide(); // Actually, escape MUST be ignored.
|
||||
else
|
||||
; // report about invalid password
|
||||
memset(passwd, 0, sizeof(char) * PASSWD_LEN);
|
||||
_e_desklock_passwd_update();
|
||||
}
|
||||
else if (!strcmp(ev->keysymbol, "Return"))
|
||||
{
|
||||
// here we have to go to auth
|
||||
e_desklock_hide(); // Actually, escape MUST be ignored.
|
||||
if (1 || strcmp(passwd, "password") == 0)
|
||||
e_desklock_hide(); // Actually, escape MUST be ignored.
|
||||
else
|
||||
; // report about invalid password
|
||||
memset(passwd, 0, sizeof(char) * PASSWD_LEN);
|
||||
_e_desklock_passwd_update();
|
||||
}
|
||||
else if (!strcmp(ev->keysymbol, "BackSpace"))
|
||||
_e_desklock_backspace();
|
||||
|
@ -301,8 +314,8 @@ _e_desklock_passwd_update()
|
|||
{
|
||||
strcat(passwd_hidden, "*");
|
||||
}
|
||||
edje_object_part_text_set(passwd_entry, "label", passwd_hidden);
|
||||
//edje_object_part_text_set(passwd_entry, "label", passwd);
|
||||
edje_object_part_text_set(bg_object, "passwd", passwd_hidden);
|
||||
/*edje_object_part_text_set(bg_object, "passwd", passwd);*/
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue