Enlightenment CVS committal
Author : fletch3k
Project : misc
Module : enotes
Dir : misc/enotes/src
Modified Files:
main.c main.h newentry.c
Log Message:
More Work on and to be done on the new-note feature (It works now, but I can't seem to
change whats in the ewl_entry widget). Please somebody tell me if its me or it is a
common problem. However, the buttons do things and it is recorded to the note storage
file.
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- main.c 19 Feb 2003 09:47:15 -0000 1.11
+++ main.c 22 Feb 2003 18:15:01 -0000 1.12
@@ -63,18 +63,7 @@
Ewl_Widget *main_win;
Ewl_Widget *main_box;
Ewl_Widget *ewltitle;
-Ewl_Widget *note1;
-Ewl_Widget *note2;
-Ewl_Widget *note3;
-Ewl_Widget *note4;
-Ewl_Widget *note5;
-Ewl_Widget *note6;
-Ewl_Widget *note7;
-Ewl_Widget *note8;
-Ewl_Widget *note9;
-Ewl_Widget *note10;
-Ewl_Widget *note11;
-Ewl_Widget *note12;
+Ewl_Widget *note[11];
Ewl_Widget *okbtn;
Ewl_Widget *cancelbtn;
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- main.h 19 Feb 2003 09:47:15 -0000 1.14
+++ main.h 22 Feb 2003 18:15:01 -0000 1.15
@@ -138,18 +138,7 @@
extern Ewl_Widget *main_win;
extern Ewl_Widget *main_box;
extern Ewl_Widget *ewltitle;
-extern Ewl_Widget *note1;
-extern Ewl_Widget *note2;
-extern Ewl_Widget *note3;
-extern Ewl_Widget *note4;
-extern Ewl_Widget *note5;
-extern Ewl_Widget *note6;
-extern Ewl_Widget *note7;
-extern Ewl_Widget *note8;
-extern Ewl_Widget *note9;
-extern Ewl_Widget *note10;
-extern Ewl_Widget *note11;
-extern Ewl_Widget *note12;
+extern Ewl_Widget *note[11];
extern Ewl_Widget *okbtn;
extern Ewl_Widget *cancelbtn;
@@ -220,3 +209,5 @@
void slidein (int slideloop);
void mousemoveevent (Ecore_Event *event);
+
+void okbtnclicked ();
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/newentry.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- newentry.c 11 Feb 2003 16:39:41 -0000 1.4
+++ newentry.c 22 Feb 2003 18:15:01 -0000 1.5
@@ -29,6 +29,9 @@
void
newnote (int argc, char *argv[])
{
+ int wloop=-1;
+ char *wtmp=malloc(str_size);
+
ewl_init(argc, argv);
@@ -48,33 +51,22 @@
cancelbtn=ewl_button_new("Cancel");
ewltitle=ewl_entry_new("Title");
- note1=ewl_entry_new("Line 1");
- note2=ewl_entry_new("Line 2");
- note3=ewl_entry_new("Line 3");
- note4=ewl_entry_new("Line 4");
- note5=ewl_entry_new("Line 5");
- note6=ewl_entry_new("Line 6");
- note7=ewl_entry_new("Line 7");
- note8=ewl_entry_new("Line 8");
- note9=ewl_entry_new("Line 9");
- note10=ewl_entry_new("Line 10");
- note11=ewl_entry_new("Line 11");
- note12=ewl_entry_new("Line 12");
+ printf("Loop One to Begin.\n");
+ while((wloop++)<12) {
+ sprintf(wtmp, "Line %d", wloop);
+ printf(":: %s\n", wtmp);
+ note[wloop-1]=ewl_entry_new(wtmp);
+// printf("Loop: %d", wloop);
+ }
ewl_container_append_child(EWL_CONTAINER(main_box), ewltitle);
- ewl_container_append_child(EWL_CONTAINER(main_box), note1);
- ewl_container_append_child(EWL_CONTAINER(main_box), note2);
- ewl_container_append_child(EWL_CONTAINER(main_box), note3);
- ewl_container_append_child(EWL_CONTAINER(main_box), note4);
- ewl_container_append_child(EWL_CONTAINER(main_box), note5);
- ewl_container_append_child(EWL_CONTAINER(main_box), note6);
- ewl_container_append_child(EWL_CONTAINER(main_box), note7);
- ewl_container_append_child(EWL_CONTAINER(main_box), note8);
- ewl_container_append_child(EWL_CONTAINER(main_box), note9);
- ewl_container_append_child(EWL_CONTAINER(main_box), note10);
- ewl_container_append_child(EWL_CONTAINER(main_box), note11);
- ewl_container_append_child(EWL_CONTAINER(main_box), note12);
+ wloop=-1;
+
+ printf("Loop Two to Begin.\n");
+ while((wloop++)<12) {
+ ewl_container_append_child(EWL_CONTAINER(main_box), note[wloop-1]);
+ } wloop=0;
ewl_container_append_child(EWL_CONTAINER(main_box), cancelbtn);
ewl_container_append_child(EWL_CONTAINER(main_box), okbtn);
@@ -83,22 +75,46 @@
ewl_widget_show(ewltitle);
- ewl_widget_show(note1);
- ewl_widget_show(note2);
- ewl_widget_show(note3);
- ewl_widget_show(note4);
- ewl_widget_show(note5);
- ewl_widget_show(note6);
- ewl_widget_show(note7);
- ewl_widget_show(note8);
- ewl_widget_show(note9);
- ewl_widget_show(note10);
- ewl_widget_show(note11);
- ewl_widget_show(note12);
+ printf("Loop Three to Begin.\n");
+ wloop=-1;
+ while((wloop++)<12) {
+ ewl_widget_show(note[wloop-1]);
+ } wloop=0;
ewl_widget_show(cancelbtn);
ewl_widget_show(okbtn);
+ ewl_callback_append (okbtn, EWL_CALLBACK_CLICKED,
+ okbtnclicked, NULL);
+ ewl_callback_append (cancelbtn, EWL_CALLBACK_CLICKED,
+ exit, "-1");
+
ewl_main();
+}
+
+void
+okbtnclicked ()
+{
+ int d=-1;
+ char *dtmp=malloc(str_size);
+
+ fileopen("a");
+
+ dtmp=ewl_entry_get_text (ewltitle);
+ strcat (dtmp, "\n");
+ fputs (dtmp, file);
+
+ while((d++)<12) {
+ if(d==12) {
+ break;
+ }
+ dtmp=ewl_entry_get_text (note[d]);
+ strcat (dtmp, "\n");
+ fputs (dtmp, file);
+ }
+
+ fclose (file);
+
+ exit(-1);
}
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs