Enlightenment CVS committal
Author : devilhorns
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_int_config_desk.c
Log Message:
Add a desktop_default_name fallback in the Apply code so if someone erases
the current desktop_name, it will add a default name and not segf.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_desk.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_int_config_desk.c 15 Nov 2006 11:31:30 -0000 1.1
+++ e_int_config_desk.c 15 Nov 2006 11:46:48 -0000 1.2
@@ -110,6 +110,14 @@
static int
_basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
{
+ char name[40];
+
+ if (!cfdata->name)
+ {
+ snprintf(name, sizeof(name), _(e_config->desktop_default_name),
cfdata->desk_x, cfdata->desk_y);
+ cfdata->name = strdup(name);
+ }
+
e_desk_name_del(cfdata->con_num, cfdata->zone_num, cfdata->desk_x,
cfdata->desk_y);
e_desk_name_add(cfdata->con_num, cfdata->zone_num, cfdata->desk_x,
cfdata->desk_y, cfdata->name);
e_desk_name_update();
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs