From: <enl...@li...> - 2003-04-30 16:31:08
|
Enlightenment CVS committal Author : fletch3k Project : misc Module : enotes Dir : misc/enotes/src Modified Files: Makefile.am allocmem.c argsparser.c confparse.c evasfuncs.c funcs_evas.h main.c main.h notecmds.c notenum.c setdefconf.c usage.h var_conf.h var_eprog_evas.h variables.c Log Message: E-Style optionable use. :-P =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- Makefile.am 29 Apr 2003 16:16:41 -0000 1.6 +++ Makefile.am 30 Apr 2003 16:30:26 -0000 1.7 @@ -1,46 +1,33 @@ ## Process this file with automake to produce Makefile.in -<<<<<<< Makefile.am INCLUDES = \ - @ecore_cflags@ @evas_cflags@ @ewl_cflags@ -======= -SUBDIRS = src ->>>>>>> 1.5 + @ecore_cflags@ @evas_cflags@ @ewl_cflags@ @estyle_cflags@ -MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ - config.h.in config.sub configure install-sh \ - ltconfig ltmain.sh missing mkinstalldirs \ - stamp-h.in +bin_PROGRAMS = enotes -#### Install DATA -install-data-local: - @$(NORMAL_INSTALL) - if test -d $(srcdir)/data; then \ - $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/data; \ - for d in $(srcdir)/data/*; do \ - cp -fr $$d $(DESTDIR)$(pkgdatadir)/data; \ - done \ - fi +enotes_SOURCES = \ +allocmem.c \ +funcs_cmds.h \ +main.c \ +notecmds.c \ +titlewin.c \ +var_ewl.h \ +argsparser.c \ +funcs_evas.h \ +main.h \ +notengui.c \ +usage.h \ +variables.c \ +confparse.c \ +funcs_usage_conf.h \ +menubar.c \ +notenum.c \ +var_conf.h \ +var_structs.h \ +evasfuncs.c \ +launchbar.c \ +newentry.c \ +setdefconf.c \ +var_eprog_evas.h -<<<<<<< Makefile.am -enotes_LDADD = @ewl_libs@ @ecore_libs@ @evas_libs@ -======= -#### Uninstall DATA - probly not a great idea. -##uninstall-data-local: -## @$(NORMAL_UNINSTALL) -## if test -d $(DESTDIR)$(pkgdatadir)/data; \ -## rm -fr $(DESTDIR)$(pkgdatadir)/data; \ -## fi - -#### Package DATA when creating a distribution -dist-hook: - if test -d data; then \ - mkdir $(distdir)/data; \ - for d in data/*; do \ - cp -r $$d $(distdir)/data; \ - done \ - fi - -#### Add these files to the distribution -EXTRA_DIST = README AUTHORS COPYING autogen.sh ->>>>>>> 1.5 +enotes_LDADD = @ewl_libs@ @ecore_libs@ @evas_libs@ @estyle_libs@ =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/allocmem.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- allocmem.c 29 Apr 2003 16:16:42 -0000 1.3 +++ allocmem.c 30 Apr 2003 16:30:27 -0000 1.4 @@ -41,6 +41,8 @@ nubtnimg = malloc (str_size); newbtnimg = malloc (str_size); exitbtnimg = malloc (str_size); + style = malloc (str_size); + c = malloc (str_size); return; } @@ -48,6 +50,8 @@ void deallocatemem (void) { + if (c) + free (c); if (tmp) free (tmp); if (str) @@ -78,6 +82,8 @@ free (newbtn); if (bgimg) free (bgimg); + if (style) + free (style); if (firstbtnimg) free (firstbtnimg); if (lastbtnimg) =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/argsparser.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- argsparser.c 29 Apr 2003 16:16:42 -0000 1.4 +++ argsparser.c 30 Apr 2003 16:30:28 -0000 1.5 @@ -519,6 +519,16 @@ strcpy (exitbtnimg, mtmp); } + else if (!strcmp (argv[a], "--style")) + { + mtmp = argv[a + 1]; + if (mtmp == NULL || mtmp[0] == '-') + { + printf ("Missing Argument!\n"); + exit (-1); + } + strcpy (style, mtmp); + } else if (!strcmp (argv[a], "-u") || !strcmp (argv[a], "--usage") || !strcmp (argv[a], "-h") @@ -543,7 +553,7 @@ { if (!strcmp (argv[a], "-o") || !strcmp (argv[a], "--first")) { - fnotenum (1); + fnotenum (0); actionbool = 1; } else if (!strcmp (argv[a], "-l") @@ -561,7 +571,8 @@ else if (!strcmp (argv[a], "-n") || !strcmp (argv[a], "--num")) { - fnotenum (atoi (argv[a + 1])); + fnotenum (atoi (argv[a + 1]) - 1); + printf ("%d\n", atoi (argv[a + 1]) - 1); a++; actionbool = 1; } @@ -588,6 +599,7 @@ runbar (); actionbool = 1; } + a++; } a = 0; @@ -606,6 +618,6 @@ } - free (mtmp); /* Free the little string used */ +// free (mtmp); /* Free the little string used */ return; } =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/confparse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- confparse.c 29 Apr 2003 16:16:42 -0000 1.5 +++ confparse.c 30 Apr 2003 16:30:29 -0000 1.6 @@ -30,7 +30,7 @@ { char *tmp2 = malloc (str_size); int sectiontype = 0; - int donebool[43]; + int donebool[44]; if (file != NULL) { fclose (file); @@ -153,6 +153,11 @@ timestampbool = 1; goto lp1; } + else if (!strncmp (tmp2, "[style]", 7)) + { + sectiontype = 50; + goto lp1; + } if (sectiontype == 1) { @@ -604,6 +609,17 @@ strncpy (exitbtnimg, tmp2, strlen (tmp2) - 1); donebool[43] = 1; + } + sectiontype++; + goto lp1; + } + else if (sectiontype == 50) + { + if (donebool[44] != 1) + { + strncpy (style, tmp2, + strlen (tmp2) - 1); + donebool[44] = 1; } sectiontype++; goto lp1; =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/evasfuncs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- evasfuncs.c 29 Apr 2003 16:16:42 -0000 1.4 +++ evasfuncs.c 30 Apr 2003 16:30:30 -0000 1.5 @@ -55,18 +55,17 @@ return (tmp); } -Evas_Object * +Estyle * new_text (Evas * evas, char *font, int size, char *text, int r, int g, int b, int alpha, int x, int y, int layer) { - Evas_Object *tmp; + Estyle *tmp; - tmp = evas_object_text_add (evas); - evas_object_text_font_set (tmp, font, size); - evas_object_text_text_set (tmp, text); - evas_object_color_set (tmp, r, g, b, alpha); - evas_object_layer_set (tmp, layer); - evas_object_move (tmp, x, y); + tmp = estyle_new (evas, text, style); + estyle_set_font (tmp, font, size); + estyle_set_color (tmp, r, g, b, alpha); + estyle_set_layer (tmp, layer); + estyle_move (tmp, x, y); return (tmp); } =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/funcs_evas.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- funcs_evas.h 29 Apr 2003 16:16:42 -0000 1.2 +++ funcs_evas.h 30 Apr 2003 16:30:30 -0000 1.3 @@ -31,8 +31,8 @@ Evas_Object *new_rectangle (Evas * evas, int r, int g, int b, int alpha, int width_x, int width_y, int x, int y, int layer); -Evas_Object *new_text (Evas * evas, char *font, int size, char *text, int r, - int g, int b, int alpha, int x, int y, int layer); +Estyle *new_text (Evas * evas, char *font, int size, char *text, int r, + int g, int b, int alpha, int x, int y, int layer); =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- main.c 29 Apr 2003 16:16:43 -0000 1.17 +++ main.c 30 Apr 2003 16:30:31 -0000 1.18 @@ -36,7 +36,9 @@ parseusage (argc, argv); + printf ("Deallocatemem.\n"); deallocatemem (); + printf ("Done.\n"); ecore_main_loop_begin (); =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- main.h 29 Apr 2003 16:16:43 -0000 1.22 +++ main.h 30 Apr 2003 16:30:31 -0000 1.23 @@ -31,6 +31,7 @@ #include <Ecore_X.h> #include <Ewl.h> #include <Ecore.h> +#include <Estyle.h> #include "usage.h" /* Define Usage */ =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/notecmds.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- notecmds.c 1 Mar 2003 10:34:52 -0000 1.11 +++ notecmds.c 30 Apr 2003 16:30:32 -0000 1.12 @@ -38,7 +38,6 @@ void dislast () { - char *c = malloc (50); int a = 0; fileopen ("r"); while ((c = fgets (c, 50, file)) != NULL) @@ -47,7 +46,6 @@ } fclose (file); fnotenum (a / 13); - free (c); } void =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/notenum.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- notenum.c 29 Apr 2003 16:16:44 -0000 1.18 +++ notenum.c 30 Apr 2003 16:30:32 -0000 1.19 @@ -104,20 +104,23 @@ int fadein (void *data) { + int r, g, b, a; int looper; looper = 0; fadeloop = fadeloop + 10; - change_alpha (title, fadeloop); - evas_object_show (title); + estyle_get_color (title, &r, &g, &b, &a); + estyle_set_color (title, r, g, b, fadeloop); + estyle_show (title); change_alpha (exitbtn, fadeloop); evas_object_show (exitbtn); while (looper < 12) { - change_alpha (txt[looper], fadeloop); - evas_object_show (txt[looper]); + estyle_get_color (txt[looper], &r, &g, &b, &a); + estyle_set_color (txt[looper], r, g, b, fadeloop); + estyle_show (txt[looper]); looper++; } @@ -146,19 +149,22 @@ fadeout () { int looper; + int r, g, b, a; looper = 0; fadeloop2 = fadeloop2 - 10; - change_alpha (title, fadeloop2); - evas_object_show (title); + estyle_get_color (title, &r, &g, &b, &a); + estyle_set_color (title, r, g, b, fadeloop2); + estyle_show (title); change_alpha (exitbtn, fadeloop2); evas_object_show (exitbtn); while (looper < 12) { - change_alpha (txt[looper], fadeloop2); - evas_object_show (txt[looper]); + estyle_get_color (txt[looper], &r, &g, &b, &a); + estyle_set_color (txt[looper], r, g, b, fadeloop2); + estyle_show (txt[looper]); looper++; } =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/setdefconf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- setdefconf.c 1 Mar 2003 10:34:52 -0000 1.2 +++ setdefconf.c 30 Apr 2003 16:30:32 -0000 1.3 @@ -34,6 +34,7 @@ strcpy (nubtn, "/usr/local/share/enotes/data/nubtn.png"); strcpy (newbtn, "/usr/local/share/enotes/data/newbtn.png"); strcpy (barimg, "/usr/local/share/enotes/data/panel.png"); + strcpy (style, "plain"); r = 0; g = 0; b = 0; =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/usage.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- usage.h 4 Mar 2003 16:14:15 -0000 1.2 +++ usage.h 30 Apr 2003 16:30:32 -0000 1.3 @@ -41,6 +41,8 @@ -s <s> --config <s> Use <s> as the configuration\n\ file.\n\ -f <f> --font <f> Use <f> as the font.\n\ + --style <s> Use <s> as the style\n\ + used on the font.\n\ -b <b> --bg <b> Use a different\n\ background for\n\ note file.\n\ =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/var_conf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- var_conf.h 4 Mar 2003 16:14:15 -0000 1.2 +++ var_conf.h 30 Apr 2003 16:30:32 -0000 1.3 @@ -20,6 +20,9 @@ extern char *tmp; extern char *str; +extern char *style; +extern char *c; + extern char *fn; extern char *fontdir; extern char *bgfile; =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/var_eprog_evas.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- var_eprog_evas.h 29 Apr 2003 16:16:44 -0000 1.2 +++ var_eprog_evas.h 30 Apr 2003 16:30:32 -0000 1.3 @@ -29,8 +29,8 @@ extern Ecore_Evas *root; extern Evas *root_evas; extern Evas_Object *bg; -extern Evas_Object *title; -extern Evas_Object *txt[11]; +extern Estyle *title; +extern Estyle *txt[11]; extern Evas_Object *exitbtn; extern Evas_Object *rectbar; =================================================================== RCS file: /cvsroot/enlightenment/misc/enotes/src/variables.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- variables.c 29 Apr 2003 16:16:44 -0000 1.4 +++ variables.c 30 Apr 2003 16:30:33 -0000 1.5 @@ -33,6 +33,9 @@ char *newbtn; char *barimg; +char *style; +char *c; + FILE *file; unsigned int r; @@ -111,8 +114,8 @@ Ecore_Evas *root; Evas *root_evas; Evas_Object *bg; -Evas_Object *title; -Evas_Object *txt[11]; +Estyle *title; +Estyle *txt[11]; Evas_Object *exitbtn; Evas_Object *rectbar; |