Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/entrance
Dir : e17/apps/entrance/src/client
Modified Files:
entrance_edit.c main.c
Log Message:
work with esmart_text fixes.
als alignemtn change
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_edit.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- entrance_edit.c 11 Jun 2004 03:23:47 -0000 1.7
+++ entrance_edit.c 11 Nov 2004 00:24:55 -0000 1.8
@@ -164,13 +164,10 @@
char *old = NULL;
char *new_str = NULL;
Evas_Object *o = NULL;
- Esmart_Text_Entry *e = NULL;
int size = 0;
o = (Evas_Object *) data;
- if ((e = evas_object_smart_data_get(o)))
- {
size = strlen(str);
#if DEBUG
if (!str)
@@ -178,19 +175,19 @@
else
fprintf(stderr, "Entry Sent %s(%d)\n", str, size);
#endif
- if (e->edje.part)
+ if (esmart_text_entry_edje_part_get(o))
{
#if DEBUG
- fprintf(stderr, "%s set its text\n", e->edje.part);
+ fprintf(stderr, "%s set its text\n",
esmart_text_entry_edje_part_get(o));
#endif
- if ((old = evas_hash_find(ecco.hashes, e->edje.part)))
+ if ((old = evas_hash_find(ecco.hashes,
esmart_text_entry_edje_part_get(o))))
{
- evas_hash_del(ecco.hashes, e->edje.part, old);
+ evas_hash_del(ecco.hashes, esmart_text_entry_edje_part_get(o),
old);
}
else
{
fprintf(stderr, "Unable to find old entry for %s\n",
- e->edje.part);
+ esmart_text_entry_edje_part_get(o));
}
if (size > 0)
{
@@ -200,7 +197,7 @@
{
new_str = strdup("");
}
- if ((old = evas_hash_find(ecco.entries, e->edje.part)))
+ if ((old = evas_hash_find(ecco.entries,
esmart_text_entry_edje_part_get(o))))
{
if (!strcmp(old, "ecco,entry,focus,in,greeting,before"))
{
@@ -208,7 +205,7 @@
free(ecco.config->before.string);
ecco.config->before.string = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else if (!strcmp(old, "ecco,entry,focus,in,greeting,after"))
{
@@ -216,7 +213,7 @@
free(ecco.config->after.string);
ecco.config->after.string = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else if (!strcmp(old, "ecco,entry,focus,in,date"))
{
@@ -224,7 +221,7 @@
free(ecco.config->date.string);
ecco.config->date.string = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else if (!strcmp(old, "ecco,entry,focus,in,time"))
{
@@ -232,7 +229,7 @@
free(ecco.config->time.string);
ecco.config->time.string = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else
if (!strcmp
@@ -244,7 +241,7 @@
free(ecco.current_session->session);
ecco.current_session->session = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
}
else if (!strcmp(old, "ecco,entry,focus,in,session,current,name"))
@@ -278,7 +275,7 @@
edje_object_signal_emit(ecco.edje, "ecco,show,sessions",
"");
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else
{
@@ -327,7 +324,7 @@
edje_object_signal_emit(ecco.edje, "ecco,show,users",
"");
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else
{
@@ -347,7 +344,7 @@
free(ecco.current_user->session);
ecco.current_user->session = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
}
else if (!strcmp(old, "ecco,entry,focus,in,remember,n"))
@@ -355,7 +352,7 @@
snprintf(buf, PATH_MAX, "%s", str);
ecco.config->users.remember_n = atoi(buf);
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else if (!strcmp(old, "ecco,entry,focus,in,theme"))
{
@@ -368,7 +365,7 @@
free(ecco.config->theme);
ecco.config->theme = new_str;
ecco.hashes =
- evas_hash_add(ecco.hashes, e->edje.part, new_str);
+ evas_hash_add(ecco.hashes,
esmart_text_entry_edje_part_get(o), new_str);
}
else
{
@@ -384,10 +381,9 @@
}
else
{
- fprintf(stderr, "Unknown signal for %s\n", e->edje.part);
+ fprintf(stderr, "Unknown signal for %s\n",
esmart_text_entry_edje_part_get(o));
}
}
- }
}
/*=========================================================================
@@ -418,7 +414,7 @@
#endif
if (ecco.entry)
{
- esmart_text_entry_focus_set(ecco.entry, 1);
+ evas_object_focus_set(ecco.entry, 1);
if ((edje_object_part_exists(ecco.edje, str)))
{
if ((bstr = edje_object_part_text_get(ecco.edje, str)))
@@ -1997,7 +1993,7 @@
evas_object_layer_set(o, -1);
esmart_text_entry_max_chars_set(o, PATH_MAX);
esmart_text_entry_is_password_set(o, 0);
- esmart_text_entry_focus_set(o, 1);
+ evas_object_focus_set(o, 1);
esmart_text_entry_return_key_callback_set(o, interp_return_key, o);
ecco.entry = o;
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/main.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -3 -r1.56 -r1.57
--- main.c 2 Nov 2004 05:54:37 -0000 1.56
+++ main.c 11 Nov 2004 00:24:55 -0000 1.57
@@ -106,37 +106,30 @@
focus_swap(Evas_Object * o, int selecto)
{
Evas_Object *oo = NULL;
- Esmart_Text_Entry *e = NULL;
- if ((e = evas_object_smart_data_get(o)))
- {
- if (!strcmp(e->edje.part, "EntrancePassEntry"))
- {
- if ((oo =
- evas_object_name_find(evas_object_evas_get(o),
- "EntranceUserEntry")))
- {
- esmart_text_entry_text_set(oo, "");
- }
- esmart_text_entry_text_set(o, "");
- }
- else if (!strcmp(e->edje.part, "EntranceUserEntry"))
- {
- oo =
- evas_object_name_find(evas_object_evas_get(o),
- "EntrancePassEntry");
- }
- }
+ if (!strcmp(esmart_text_entry_edje_part_get(o), "EntrancePassEntry"))
+ {
+ if ((oo =
+ evas_object_name_find(evas_object_evas_get(o),
+ "EntranceUserEntry")))
+ {
+ esmart_text_entry_text_set(oo, "");
+ }
+ esmart_text_entry_text_set(o, "");
+ }
+ else if (!strcmp(esmart_text_entry_edje_part_get(o), "EntranceUserEntry"))
+ {
+ oo =
+ evas_object_name_find(evas_object_evas_get(o),
+ "EntrancePassEntry");
+ }
if (oo)
- {
- selecto ? esmart_text_entry_focus_set(oo,
- 0) :
- esmart_text_entry_focus_set(o, 0);
-
- selecto ? esmart_text_entry_focus_set(o,
- 1) :
- esmart_text_entry_focus_set(oo, 1);
- }
+ {
+ selecto ? evas_object_focus_set(oo, 0) :
+ evas_object_focus_set(o, 0);
+ selecto ? evas_object_focus_set(o, 1) :
+ evas_object_focus_set(oo, 1);
+ }
}
/**
@@ -149,50 +142,45 @@
{
Evas_Object *o = NULL;
Entrance_User *eu = NULL;
- Esmart_Text_Entry *e = NULL;
o = (Evas_Object *) data;
- if ((e = evas_object_smart_data_get(o)))
- {
- if (!strcmp(e->edje.part, "EntranceUserEntry"))
- {
- if (!entrance_auth_set_user(session->auth, str))
- {
- edje_object_signal_emit(e->edje.o, "EntranceUserAuth", "");
- if ((eu = evas_hash_find(session->config->users.hash, str)))
+ if (!strcmp(esmart_text_entry_edje_part_get(o), "EntranceUserEntry"))
+ {
+ if (!entrance_auth_set_user(session->auth, str))
+ {
+ edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
"EntranceUserAuth", "");
+ if ((eu = evas_hash_find(session->config->users.hash, str)))
entrance_session_user_set(session, eu);
-
- focus_swap(o, 0);
- }
- else
- {
- esmart_text_entry_text_set(o, "");
- entrance_session_user_reset(session);
- edje_object_signal_emit(e->edje.o, "EntranceUserFail", "");
- focus_swap(o, 1);
- }
- }
- if (!strcmp(e->edje.part, "EntrancePassEntry"))
- {
- if (session->auth->user && strlen(session->auth->user) > 0)
- {
- entrance_auth_set_pass(session->auth, str);
- if (!entrance_session_auth_user(session))
- {
- session->authed = 1;
- edje_object_signal_emit(e->edje.o, "EntranceUserAuthSuccess",
- "");
- }
- else
- {
- entrance_session_user_reset(session);
- edje_object_signal_emit(e->edje.o, "EntranceUserAuthFail", "");
- focus_swap(o, 0);
- }
- }
- }
- }
+ focus_swap(o, 0);
+ }
+ else
+ {
+ esmart_text_entry_text_set(o, "");
+ entrance_session_user_reset(session);
+ edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
"EntranceUserFail", "");
+ focus_swap(o, 1);
+ }
+ }
+ if (!strcmp(esmart_text_entry_edje_part_get(o), "EntrancePassEntry"))
+ {
+ if (session->auth->user && strlen(session->auth->user) > 0)
+ {
+ entrance_auth_set_pass(session->auth, str);
+ if (!entrance_session_auth_user(session))
+ {
+ session->authed = 1;
+ edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
"EntranceUserAuthSuccess",
+ "");
+ }
+ else
+ {
+ entrance_session_user_reset(session);
+ edje_object_signal_emit(esmart_text_entry_edje_object_get(o),
"EntranceUserAuthFail", "");
+ focus_swap(o, 0);
+ }
+ }
+ }
}
/**
@@ -211,17 +199,17 @@
{
if (!strcmp(emission, "In"))
{
- if (!esmart_text_entry_is_focused(oo))
+ if (!evas_object_focus_get(oo))
{
- esmart_text_entry_focus_set(oo, 1);
+ evas_object_focus_set(oo, 1);
}
}
else if (!strcmp(emission, "Out"))
{
- if (esmart_text_entry_is_focused(oo))
+ if (evas_object_focus_get(oo))
{
- esmart_text_entry_focus_set(oo, 1);
- esmart_text_entry_focus_set(oo, 0);
+ evas_object_focus_set(oo, 1);
+ evas_object_focus_set(oo, 0);
}
}
else
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs