Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_configure.c
Log Message:
handle more properties for .desktop fiels in config panel
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_configure.c,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -3 -r1.118 -r1.119
--- e_configure.c 23 May 2008 08:51:22 -0000 1.118
+++ e_configure.c 23 May 2008 14:40:51 -0000 1.119
@@ -75,6 +75,8 @@
{
char *s;
char *cfg_cat_item;
+ char *cfg_cat_name;
+ char *cfg_cat_icon;
char *cfg_cat;
char *cfg_cat_cfg;
char *cfg_icon;
@@ -86,12 +88,24 @@
cfg_icon = NULL;
cfg_cat_cfg = NULL;
cfg_pri = 1000;
+ cfg_cat_name = NULL;
+ cfg_cat_icon = NULL;
label = NULL;
if (desktop->x)
{
cfg_cat_cfg = ecore_hash_get(desktop->x,
"X-Enlightenment-Config-Category");
s = ecore_hash_get(desktop->x, "X-Enlightenment-Config-Priority");
if (s) cfg_pri = atoi(s);
+ cfg_cat_name = ecore_hash_get(desktop->x,
"X-Enlightenment-Config-Category-Name");
+ cfg_cat_icon = ecore_hash_get(desktop->x,
"X-Enlightenment-Config-Category-Icon");
+ if (cfg_cat_icon)
+ {
+ if (cfg_cat_icon[0] == '/')
+ cfg_cat_icon = strdup(cfg_cat_icon);
+ else
+ cfg_cat_icon = efreet_icon_path_find(e_config->icon_theme,
+ cfg_cat_icon, "64x64");
+ }
}
if (desktop->icon)
{
@@ -106,12 +120,16 @@
else label = "???";
if (!cfg_cat_cfg)
{
+ char *ic;
+
snprintf(buf, sizeof(buf), "system/%s", label);
cfg_cat_cfg = buf;
+ ic = cfg_cat_icon;
+ if (!ic) ic = "enlightenment/system";
e_configure_registry_category_add("system",
1000, _("System"),
NULL,
- "enlightenment/system"); //
FIXME: another icon?
+ ic);
}
else
{
@@ -119,10 +137,12 @@
if (!cfg_cat) cfg_cat = strdup(cfg_cat_cfg);
if (cfg_cat)
{
+ if (!cfg_cat_name)
+ cfg_cat_name = cfg_cat;
e_configure_registry_category_add(cfg_cat,
- 1000, cfg_cat,
+ 1000, cfg_cat_name,
NULL,
- NULL); // FIXME: icon?
+ cfg_cat_icon);
free(cfg_cat);
cfg_cat = NULL;
}
@@ -132,6 +152,7 @@
NULL, NULL,
desktop);
if (cfg_icon) free(cfg_icon);
+ if (cfg_cat_icon) free(cfg_cat_icon);
}
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs