Enlightenment CVS committal Author : fletch3k Project : misc Module : enotes
Dir : misc/enotes/src Modified Files: note.c note.h Log Message: Consistency in EDJE text objects + container. Enotes title is now in the edje and set by enotes. More code for this soon - setting it on text change. =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/note.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- note.c 10 Sep 2004 16:20:49 -0000 1.24 +++ note.c 10 Sep 2004 16:35:31 -0000 1.25 @@ -197,10 +197,11 @@ evas_object_show(p->edje); - /* Setup the date and user */ - edje_object_part_text_set(p->edje, "EnotesUser", getenv("USER")); + /* Setup the date, user and initial title */ + edje_object_part_text_set(p->edje, EDJE_TEXT_USER, getenv("USER")); datestr = get_date_string(); - edje_object_part_text_set(p->edje, "EnotesDate", datestr); + edje_object_part_text_set(p->edje, EDJE_TEXT_DATE, datestr); + update_enote_title (p->edje,content); /* Ewl */ p->emb = ewl_embed_new(); @@ -210,7 +211,7 @@ ecore_evas_get(p->win), (void *) ecore_evas_software_x11_window_get(p->win)); evas_object_layer_set(p->eo, 2); - edje_object_part_swallow(p->edje, EDJE_EWL_CONTAINER, p->eo); + edje_object_part_swallow(p->edje, EDJE_CONTAINER, p->eo); evas_object_show(p->eo); evas_object_focus_set(p->eo, TRUE); @@ -254,6 +255,7 @@ get_title_by_note(*note), *note); dml("Added new note to saveload list", 2); } + return; } @@ -460,7 +462,6 @@ return (NULL); } - /** * @param note: The note to grab the title from. * @return: Returns the title of the supplied note. @@ -580,3 +581,14 @@ ewl_object_geometry_request(EWL_OBJECT(user_data), CURRENT_X(w), CURRENT_Y(w), CURRENT_W(w), CURRENT_H(w)); } + +/** + * @param content: The content to use for title setting. + * @brief: Sets the title in the edje. + */ +void +update_enote_title(Evas_Object *edje,char *content) +{ + edje_object_part_text_set(edje, EDJE_TEXT_TITLE,get_title_by_content(content)); + return; +} =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/note.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- note.h 9 Sep 2004 11:57:30 -0000 1.8 +++ note.h 10 Sep 2004 16:35:31 -0000 1.9 @@ -31,7 +31,11 @@ #define EDJE_SIGNAL_NOTE_CLOSE "ENOTES_QUIT" #define EDJE_SIGNAL_NOTE_MINIMISE "ENOTES_MINIMIZE" -#define EDJE_EWL_CONTAINER "EnotesContainer" + +#define EDJE_CONTAINER "EnoteContainer" +#define EDJE_TEXT_USER "EnoteUser" +#define EDJE_TEXT_DATE "EnoteDate" +#define EDJE_TEXT_TITLE "EnoteTitle" #define COMPARE_INTERVAL 0.01 #define TITLE_LENGTH 20 @@ -103,4 +107,6 @@ Evas_List *get_cycle_next_note(Evas_List * note); Evas_List *get_cycle_previous_note(Evas_List * note); +void update_enote_title(Evas_Object *edje,char *content); + #endif ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs