Enlightenment CVS committal
Author : titansoccer15
Project : e17
Module : proto
Dir : e17/proto/ephoto/src
Modified Files:
ephoto.c ephoto_misc.c ephoto.h
Log Message:
Command option work. see ephoto --help.
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ephoto.c 21 Mar 2006 02:44:11 -0000 1.16
+++ ephoto.c 21 Mar 2006 23:44:15 -0000 1.17
@@ -22,10 +22,11 @@
int argfit = 0;
int argfullscreen = 0;
char *audios;
+char buf[PATH_MAX];
char argimage[PATH_MAX];
char argaudio[PATH_MAX];
-char *argheight;
-char *argwidth;
+char argheight[PATH_MAX] = "600";
+char argwidth[PATH_MAX] = "480";
char tempdb[PATH_MAX];
char db[PATH_MAX];
/*****************/
@@ -92,6 +93,16 @@
imageint++;
arglength = atoi(argv[imageint]);
}
+ else if ( argint < argc && !strcmp(argv[argint], "--win-size")
) {
+ int imageint;
+ imageint = argint;
+ imageint++;
+ snprintf(argwidth, PATH_MAX, "%s", argv[imageint]);
+ printf("%s\n", argwidth);
+ imageint++;
+ snprintf(argheight, PATH_MAX, "%s", argv[imageint]);
+ printf("%s\n", argheight);
+ }
else if ( argint < argc && !strcmp(argv[argint], "--loop") ) {
argloop = 1;
}
@@ -387,13 +398,8 @@
ewl_widget_show(m->text);
m->wsize = ewl_entry_new();
+ ewl_text_text_set(EWL_TEXT(m->wsize), argwidth);
ewl_entry_editable_set(EWL_ENTRY(m->wsize), 0);
- if ( argwidth == NULL ) {
- ewl_text_text_set(EWL_TEXT(m->wsize), "640");
- }
- if ( argwidth != NULL ) {
- ewl_text_text_set(EWL_TEXT(m->wsize), argwidth);
- }
ewl_object_maximum_size_set(EWL_OBJECT(m->wsize), 50, 10);
ewl_object_alignment_set(EWL_OBJECT(m->wsize),
EWL_FLAG_ALIGN_CENTER);
ewl_container_child_append(EWL_CONTAINER(m->hboxv), m->wsize);
@@ -408,13 +414,8 @@
ewl_widget_show(m->text);
m->hsize = ewl_entry_new();
+ ewl_text_text_set(EWL_TEXT(m->hsize), argheight);
ewl_entry_editable_set(EWL_ENTRY(m->hsize), 0);
- if ( argheight == NULL ) {
- ewl_text_text_set(EWL_TEXT(m->hsize), "480");
- }
- if ( argheight != NULL ) {
- ewl_text_text_set(EWL_TEXT(m->hsize), argheight);
- }
ewl_object_maximum_size_set(EWL_OBJECT(m->hsize), 50, 10);
ewl_object_alignment_set(EWL_OBJECT(m->hsize),
EWL_FLAG_ALIGN_CENTER);
ewl_container_child_append(EWL_CONTAINER(m->hboxv), m->hsize);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto_misc.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ephoto_misc.c 17 Mar 2006 22:05:16 -0000 1.2
+++ ephoto_misc.c 21 Mar 2006 23:44:15 -0000 1.3
@@ -53,8 +53,8 @@
ewl_entry_editable_set(EWL_ENTRY(m->hsize), 0);
}
if ( w == m->rad4 ) {
- ewl_text_text_set(EWL_TEXT(m->wsize), "640");
- ewl_text_text_set(EWL_TEXT(m->hsize), "480");
+ ewl_text_text_set(EWL_TEXT(m->wsize), argwidth);
+ ewl_text_text_set(EWL_TEXT(m->hsize), argheight);
ewl_entry_editable_set(EWL_ENTRY(m->wsize), 1);
ewl_entry_editable_set(EWL_ENTRY(m->hsize), 1);
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/ephoto/src/ephoto.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ephoto.h 21 Mar 2006 02:36:53 -0000 1.8
+++ ephoto.h 21 Mar 2006 23:44:15 -0000 1.9
@@ -131,8 +131,8 @@
extern int argfit;
extern int argfullscreen;
extern int argloop;
-extern char *argwidth;
-extern char *argheight;
+extern char argwidth[PATH_MAX];
+extern char argheight[PATH_MAX];
extern char *audios;
#endif
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs