Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : screenshot
Dir : e_modules/screenshot
Modified Files:
e_mod_config.c e_mod_main.c module_icon.png
Log Message:
Fixes for taking screenshots when no filename is specified in the config.
Cleanups in regards to using config filename vs inst filename.
===================================================================
RCS file: /cvs/e/e_modules/screenshot/e_mod_config.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- e_mod_config.c 26 Jun 2006 15:11:01 -0000 1.24
+++ e_mod_config.c 1 Jul 2006 19:53:51 -0000 1.25
@@ -199,12 +199,9 @@
ci->location = evas_stringshare_add(tmp);
}
- if (ci->filename)
- evas_stringshare_del(ci->filename);
+ evas_stringshare_del(ci->filename);
if (cfdata->filename != NULL)
ci->filename = evas_stringshare_add(cfdata->filename);
- else
- ci->filename = evas_stringshare_add("");
ci->delay_time = cfdata->delay_time;
e_config_save_queue();
===================================================================
RCS file: /cvs/e/e_modules/screenshot/e_mod_main.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- e_mod_main.c 13 Jun 2006 01:25:49 -0000 1.48
+++ e_mod_main.c 1 Jul 2006 19:53:51 -0000 1.49
@@ -233,7 +233,7 @@
}
ci->prompt = 0;
ci->location = evas_stringshare_add(e_user_homedir_get());
- ci->filename = evas_stringshare_add("");
+ ci->filename = NULL;
ci->import.use_img_border = 1;
ci->import.use_dither = 1;
ci->import.use_frame = 1;
@@ -324,7 +324,7 @@
}
ci->prompt = 0;
ci->location = evas_stringshare_add(e_user_homedir_get());
- ci->filename = evas_stringshare_add("");
+ ci->filename = NULL;
ci->import.use_img_border = 1;
ci->import.use_dither = 1;
ci->import.use_frame = 1;
@@ -441,11 +441,10 @@
if (!ci->prompt)
{
- if (!ci->filename)
+ if ((!ci->filename) || (ci->filename == NULL))
{
char *f = _get_filename(ci);
- ci->filename = evas_stringshare_add(f);
- e_config_save_queue();
+ inst->filename = evas_stringshare_add(f);
}
_ss_take_shot(inst);
}
@@ -538,7 +537,7 @@
t = time(NULL);
loctime = localtime(&t);
strftime(buff, sizeof(buff), "%Y-%m-%d-%H%M%S", loctime);
- snprintf(buff, sizeof(buff), "%s/%s.png", strdup(ci->location),
strdup(buff));
+ snprintf(buff, sizeof(buff), "%s.png", strdup(buff));
}
else
{
@@ -554,7 +553,7 @@
c = 1;
else
c++;
- snprintf(buff, sizeof(buff), "%s/%s%i.png", strdup(ci->location),
strdup(ci->filename), c);
+ snprintf(buff, sizeof(buff), "%s%i.png", strdup(ci->filename), c);
}
}
return strdup(buff);
@@ -622,17 +621,11 @@
return;
}
- p = strrchr(ci->filename, '.');
+ p = strrchr(inst->filename, '.');
if (!p)
- {
- snprintf(buf, sizeof(buf), "%s.png", ci->filename);
- evas_stringshare_del(ci->filename);
- ci->filename = evas_stringshare_add(buf);
- e_config_save_queue();
- }
+ snprintf(buf, sizeof(buf), "%s.png", inst->filename);
- snprintf(buf, sizeof(buf), "%s %s %s/%s", cmd, opt, ci->location,
ci->filename);
- inst->filename = evas_stringshare_add(ci->filename);
+ snprintf(buf, sizeof(buf), "%s %s %s/%s", cmd, opt, ci->location,
inst->filename);
ss_config->exe_exit_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
_ss_exe_cb_exit, NULL);
if (ci->delay_time > 0)
{
@@ -684,11 +677,7 @@
ci->location = evas_stringshare_add(t);
}
- if (ci->filename)
- evas_stringshare_del(ci->filename);
- ci->filename = evas_stringshare_add(text);
- e_config_save_queue();
-
+ inst->filename = strdup(text);
_ss_take_shot(inst);
}
===================================================================
RCS file: /cvs/e/e_modules/screenshot/module_icon.png,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
Binary files /tmp/cvspulqId and /tmp/cvsdCp8Fg differ
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs