Enlightenment CVS committal
Author : fletch3k
Project : misc
Module : enotes
Dir : misc/enotes/src
Modified Files:
main.c main.h notecmds.c notenum.c
Log Message:
Multitasking problem fixed.
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- main.c 9 Feb 2003 11:29:31 -0000 1.7
+++ main.c 10 Feb 2003 17:37:41 -0000 1.8
@@ -204,6 +204,10 @@
} else if (!strcmp(argv[a], "-l")||!strcmp(argv[a], "--last")) {
dislast();
actionbool=1;
+ } else if (!strcmp(argv[a], "--nu")) {
+ notengui();
+ a++;
+ actionbool=1;
} else if (!strcmp(argv[a], "-n")||!strcmp(argv[a], "--num")) {
fnotenum(atoi(argv[a+1]));
a++;
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- main.h 6 Feb 2003 21:33:01 -0000 1.6
+++ main.h 10 Feb 2003 17:37:41 -0000 1.7
@@ -21,6 +21,8 @@
POSIX GNU Description\n\
-o --first Display First Note.\n\
-n <n> --num <n> Display the n'th Note.\n\
+ --nu Display the GUI for the\n\
+ above feature.\n\
-l --last Display the Last Note.\n\n\
-c --clear Clear all notes.\n\
-N --new Create a new note\n\
@@ -142,7 +144,7 @@
void count (void);
void notengui (void);
-void getncmd (char *number);
+void getncmd (Ewl_Widget *ewlentry);
void setconfig (void);
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/notecmds.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- notecmds.c 9 Feb 2003 11:29:31 -0000 1.3
+++ notecmds.c 10 Feb 2003 17:37:41 -0000 1.4
@@ -79,7 +79,7 @@
ewl_container_append_child(EWL_CONTAINER(ewlbox), ewlentry);
ewl_container_append_child(EWL_CONTAINER(ewlbox), ewlbtn);
- ewl_callback_append(ewlbtn, EWL_CALLBACK_CLICKED, getncmd, ewl_entry_get_text
(ewlentry));
+ ewl_callback_append(ewlbtn, EWL_CALLBACK_CLICKED, getncmd,
+(Ewl_Widget*)ewlentry);
ewl_widget_show(ewlentry);
ewl_widget_show(ewlbtn);
@@ -88,13 +88,21 @@
}
void
-getncmd (char *number)
+getncmd (Ewl_Widget *ewlentry)
{
char *gnctmp=malloc(20);
- printf("This Section is kinda broke.\n");
- return;
- number[strlen(number)]='\0';
- sprintf(gnctmp, "enotes -n %s&", number);
- printf("%s\n", gnctmp);
- system(gnctmp);
+ char *cmdstr=malloc(60);
+ char *number=malloc(20);
+ number=ewl_entry_get_text(ewlentry);
+ if(number==NULL) {
+ printf("Why is <number> NULL ?\n");
+ return;
+ }
+ printf("<%s>\n\n", number);
+ strncpy(gnctmp, number, strlen(number)-1);
+ sprintf(cmdstr, "enotes -n %s&", gnctmp);
+ system(cmdstr);
+ free(cmdstr);
+ free(gnctmp);
+ free(number);
}
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/notenum.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- notenum.c 6 Feb 2003 21:33:01 -0000 1.6
+++ notenum.c 10 Feb 2003 17:37:41 -0000 1.7
@@ -162,7 +162,7 @@
evas_object_event_callback_add(lastbtnob, EVAS_CALLBACK_MOUSE_DOWN, system,
"enotes -l&");
evas_object_event_callback_add(firstbtnob, EVAS_CALLBACK_MOUSE_DOWN, system,
"enotes -o&");
- evas_object_event_callback_add(nubtnob, EVAS_CALLBACK_MOUSE_DOWN, notengui,
NULL);
+ evas_object_event_callback_add(nubtnob, EVAS_CALLBACK_MOUSE_DOWN, system,
+"enotes --nu&");
evas_object_event_callback_add(newbtnob, EVAS_CALLBACK_MOUSE_DOWN, system,
"enotes -N&");
}
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs