From: <enl...@li...> - 2005-09-10 21:06:20
|
Enlightenment CVS committal Author : handyande Project : misc Module : enotes Dir : misc/enotes/src Modified Files: controlcentre.c main.c note.c storage.h welcome.c welcome.h Log Message: Fixups for Enotes - it compiles :) not only does it compile, but it works too :) :) :) and ewl has multiline mostly sorted :) =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/controlcentre.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- controlcentre.c 23 Mar 2005 10:41:42 -0000 1.20 +++ controlcentre.c 10 Sep 2005 21:06:13 -0000 1.21 @@ -68,17 +68,11 @@ ecore_evas_title_set(cc->win, "Enotes"); ecore_evas_name_class_set(cc->win, "Enotes", "Enotes"); - if (main_config->ontop == 1) - if (!strcmp(main_config->render_method, "gl")) { - ecore_x_window_prop_layer_set - (ecore_evas_gl_x11_window_get(cc->win), - ECORE_X_WINDOW_LAYER_ABOVE); - } else { - ecore_x_window_prop_layer_set - (ecore_evas_software_x11_window_get(cc->win), - ECORE_X_WINDOW_LAYER_ABOVE); - } - + if (main_config->ontop == 1) + ecore_evas_layer_set(cc->win, 7); + else + ecore_evas_layer_set(cc->win, 2); + if (main_config->sticky == 1) ecore_evas_sticky_set(cc->win, 1); else @@ -94,11 +88,11 @@ /* Moving the damn thing */ if (!strcmp(main_config->render_method, "gl")) - ecore_x_window_prop_xy_set(ecore_evas_gl_x11_window_get - (cc->win), pos->x, pos->y); + ecore_x_window_move(ecore_evas_gl_x11_window_get(cc->win), + pos->x, pos->y); else - ecore_x_window_prop_xy_set(ecore_evas_software_x11_window_get - (cc->win), pos->x, pos->y); + ecore_x_window_move(ecore_evas_software_x11_window_get(cc->win), + pos->x, pos->y); /* Setup the Canvas, Render-Method and Font Path */ cc->evas = ecore_evas_get(cc->win); =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- main.c 6 Apr 2005 11:52:39 -0000 1.21 +++ main.c 10 Sep 2005 21:06:13 -0000 1.22 @@ -29,7 +29,6 @@ { char *spec_conf; int note_count; - DIR *dir; int a; /* IPC Check */ =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/note.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -3 -r1.48 -r1.49 --- note.c 6 Apr 2005 14:03:27 -0000 1.48 +++ note.c 10 Sep 2005 21:06:14 -0000 1.49 @@ -93,7 +93,7 @@ /** * FIXME: When you can get the row and its child text, compare - * it to the ewl_entry_text_get(p->title) value and remove the row + * it to the ewl_text_text_get(p->title) value and remove the row * from the tree at this point. Reporting that you've done so with * dml ("Removed note from save/load list", 2); or something. When ewl * will let you do these things. @@ -164,18 +164,12 @@ ecore_evas_borderless_set(p->win, 1); ecore_evas_shaped_set(p->win, 1); ecore_evas_title_set(p->win, "An E-Note"); - ecore_evas_name_class_set(p->win, "Enotes", "Enotes"); + ecore_evas_name_class_set(p->win, "Enotes", "Enotes"); if (main_config->ontop == 1) - if (!strcmp(main_config->render_method, "gl")) { - ecore_x_window_prop_layer_set - (ecore_evas_gl_x11_window_get(p->win), - ECORE_X_WINDOW_LAYER_ABOVE); - } else { - ecore_x_window_prop_layer_set - (ecore_evas_software_x11_window_get(p->win), - ECORE_X_WINDOW_LAYER_ABOVE); - } + ecore_evas_layer_set(p->win, 7); + else + ecore_evas_layer_set(p->win, 2); if (main_config->sticky == 1) ecore_evas_sticky_set(p->win, 1); @@ -187,11 +181,11 @@ /* Move the damn thing */ if (!strcmp(main_config->render_method, "gl")) - ecore_x_window_prop_xy_set(ecore_evas_gl_x11_window_get(p->win), - x, y); + ecore_x_window_move(ecore_evas_gl_x11_window_get(p->win), + x, y); else - ecore_x_window_prop_xy_set(ecore_evas_software_x11_window_get - (p->win), x, y); + ecore_x_window_move(ecore_evas_software_x11_window_get(p->win), + x, y); /* Setup the Canvas, fonts, etc... */ p->evas = ecore_evas_get(p->win); @@ -274,7 +268,8 @@ ewl_widget_show(p->pane); - p->content = ewl_entry_multiline_new(""); + p->content = ewl_entry_new(""); + ewl_entry_multiline_set(EWL_ENTRY(p->content), 1); ewl_container_child_append((Ewl_Container *) p->pane, p->content); ewl_entry_multiline_set((Ewl_Entry *) p->content, 1); @@ -293,7 +288,7 @@ ewl_theme_data_int_set(p->content, "/entry/text/font_size", atoi(prop)); - ewl_entry_text_set((Ewl_Entry *) p->content, fcontent); + ewl_text_text_set((Ewl_Text *) p->content, fcontent); ewl_widget_show(p->content); ewl_callback_append(p->emb, EWL_CALLBACK_CONFIGURE, note_move_embed, @@ -525,7 +520,7 @@ dml("Saving a Note",2); p=evas_list_data(note); - ewl_saveload_save_by_name(get_title_by_content(ewl_entry_text_get((Ewl_Entry*)p->content))); + ewl_saveload_save_by_name(get_title_by_content(ewl_text_text_get((Ewl_Text*)p->content))); return; } @@ -746,7 +741,7 @@ { Note *p = evas_list_data(note); - return ((char *) ewl_entry_text_get((Ewl_Entry *) p->content)); + return ((char *) ewl_text_text_get((Ewl_Text *) p->content)); } /** @@ -757,7 +752,7 @@ char * get_content_by_note_struct(Note * note) { - return ((char *) ewl_entry_text_get((Ewl_Entry *) note->content)); + return ((char *) ewl_text_text_get((Ewl_Text *) note->content)); } /** =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/storage.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- storage.h 6 Apr 2005 11:52:39 -0000 1.8 +++ storage.h 10 Sep 2005 21:06:14 -0000 1.9 @@ -23,6 +23,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> +#include <dirent.h> #include <Evas.h> // For the list structures. =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/welcome.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- welcome.c 11 Mar 2005 23:28:25 -0000 1.3 +++ welcome.c 10 Sep 2005 21:06:14 -0000 1.4 @@ -13,7 +13,7 @@ welcome->win = ewl_window_new(); ewl_window_title_set((Ewl_Window *) welcome->win, "Welcome to E-Notes"); - ewl_window_class_set((Ewl_Window *) welcome->win, "Enotes"); + ewl_window_class_set((Ewl_Window *) welcome->win, "Enotes"); ewl_widget_show(welcome->win); ewl_callback_append(welcome->win, EWL_CALLBACK_DELETE_WINDOW, (void *) close_welcome_cb, (void *) NULL); @@ -23,25 +23,26 @@ welcome->wvbox); ewl_widget_show(welcome->wvbox); - welcome->title = ewl_text_new(""); - ewl_text_font_set((Ewl_Text *) welcome->title, "vera", 18); + welcome->title = ewl_text_new(NULL); +// ewl_text_font_set((Ewl_Text *) welcome->title, "vera"); //, 18); ewl_text_color_set((Ewl_Text *) welcome->title, 255, 255, 255, 255); - ewl_text_style_set((Ewl_Text *) welcome->title, "outline"); + ewl_text_styles_set((Ewl_Text *) welcome->title, + EWL_TEXT_STYLE_OUTLINE); ewl_text_color_set((Ewl_Text *) welcome->title, 200, 200, 200, 255); - ewl_text_text_set((Ewl_Text *) welcome->title, "Welcome to E-Notes"); + ewl_text_text_insert((Ewl_Text *) welcome->title, "Welcome to E-Notes", 0); ewl_object_padding_set((Ewl_Object *) welcome->title, 5, 5, 5, 5); ewl_container_child_append((Ewl_Container *) welcome->wvbox, welcome->title); ewl_widget_show(welcome->title); welcome->label = ewl_text_new(""); - ewl_text_font_set((Ewl_Text *) welcome->label, "vera", 12); +// ewl_text_font_set((Ewl_Text *) welcome->label, "vera"); //, 12); ewl_text_color_set((Ewl_Text *) welcome->label, 0, 0, 0, 255); - ewl_text_text_set((Ewl_Text *) welcome->label, - "E-Notes is a sticky notes system\nbased on the enlightenment\nfoundation libraries. Please\nview the credits and report\nany bugs to:\n\n"); + ewl_text_text_insert((Ewl_Text *) welcome->label, + "E-Notes is a sticky notes system\nbased on the enlightenment\nfoundation libraries. Please\nview the credits and report\nany bugs to:\n", 0); ewl_text_color_set((Ewl_Text *) welcome->label, 69, 98, 224, 255); ewl_text_text_append((Ewl_Text *) welcome->label, - "tom...@gm..."); + "\nto...@gm..."); ewl_container_child_append((Ewl_Container *) welcome->wvbox, welcome->label); ewl_object_padding_set((Ewl_Object *) welcome->label, 5, 5, 0, 5); @@ -114,10 +115,10 @@ credits->credits = ewl_text_new(""); ewl_object_padding_set((Ewl_Object *) credits->credits, 5, 5, 5, 5); - ewl_text_font_set((Ewl_Text *) credits->credits, "vera", 12); +// ewl_text_font_set((Ewl_Text *) credits->credits, "vera"); //, 12); ewl_text_color_set((Ewl_Text *) credits->credits, 0, 0, 0, 255); - ewl_text_text_set((Ewl_Text *) credits->credits, - "Credits:\n\nDeveloper: Thomas [Fletch]er\nArtwork: Corey Donohoe (Atmos)\nArtwork: Andrew Elcock (HandyAndE)\n"); + ewl_text_text_insert((Ewl_Text *) credits->credits, + "Credits:\n\nDeveloper: Thomas [Fletch]er\nArtwork: Corey Donohoe (Atmos)\nArtwork: Andrew Elcock (HandyAndE)\n", 0); ewl_container_child_append((Ewl_Container *) credits->win, credits->credits); ewl_widget_show(credits->credits); =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/welcome.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- welcome.h 27 Aug 2004 20:40:37 -0000 1.1 +++ welcome.h 10 Sep 2005 21:06:14 -0000 1.2 @@ -1,4 +1,5 @@ #include <Ewl.h> +#include <stdlib.h> typedef struct { Ewl_Widget *win; |