Enlightenment CVS committal Author : englebass Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_border.c e_config.c e_config.h e_int_config_icon_themes.c e_thumb.c e_thumb_main.c Log Message: - nice config for thumbnailing. Needs config dialog. - event for theme change. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v retrieving revision 1.581 retrieving revision 1.582 diff -u -3 -r1.581 -r1.582 --- e_border.c 5 Apr 2007 06:59:02 -0000 1.581 +++ e_border.c 5 Apr 2007 17:20:08 -0000 1.582 @@ -45,6 +45,7 @@ static int _e_border_cb_desktop_change(void *data, int ev_type, void *ev); static int _e_border_cb_sync_alarm(void *data, int ev_type, void *ev); static int _e_border_cb_util_desktop_list_change(void *data, int ev_type, void *ev); +static int _e_border_cb_config_icon_theme(void *data, int ev_type, void *ev); static int _e_border_cb_pointer_warp(void *data, int ev_type, void *ev); static void _e_border_cb_signal_bind(void *data, Evas_Object *obj, const char *emission, const char *source); @@ -170,6 +171,7 @@ handlers = evas_list_append(handlers, ecore_event_handler_add(E_EVENT_POINTER_WARP, _e_border_cb_pointer_warp, NULL)); handlers = evas_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE, _e_border_cb_util_desktop_list_change, NULL)); + handlers = evas_list_append(handlers, ecore_event_handler_add(E_EVENT_CONFIG_ICON_THEME, _e_border_cb_config_icon_theme, NULL)); E_EVENT_BORDER_ADD = ecore_event_type_new(); E_EVENT_BORDER_REMOVE = ecore_event_type_new(); @@ -4277,6 +4279,23 @@ static int _e_border_cb_util_desktop_list_change(void *data, int ev_type, void *ev) +{ + Evas_List *l; + + /* mark all borders for desktop/icon updates */ + for (l = borders; l; l = l->next) + { + E_Border *bd; + + bd = l->data; + bd->changes.icon = 1; + bd->changed = 1; + } + return 1; +} + +static int +_e_border_cb_config_icon_theme(void *data, int ev_type, void *ev) { Evas_List *l; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_config.c,v retrieving revision 1.235 retrieving revision 1.236 diff -u -3 -r1.235 -r1.236 --- e_config.c 4 Apr 2007 22:45:45 -0000 1.235 +++ e_config.c 5 Apr 2007 17:20:09 -0000 1.236 @@ -41,10 +41,14 @@ static E_Config_DD *_e_config_shelf_edd = NULL; static E_Config_DD *_e_config_mime_icon_edd = NULL; +EAPI int E_EVENT_CONFIG_ICON_THEME = 0; + /* externally accessible functions */ EAPI int e_config_init(void) { + E_EVENT_CONFIG_ICON_THEME = ecore_event_type_new(); + _e_config_profile = getenv("E_CONF_PROFILE"); if (!_e_config_profile) { @@ -542,6 +546,8 @@ E_CONFIG_LIST(D, T, mime_icons, _e_config_mime_icon_edd); /**/ E_CONFIG_VAL(D, T, desk_auto_switch, INT); + + E_CONFIG_VAL(D, T, thumb_nice, INT); e_config = e_config_domain_load("e", _e_config_edd); if (e_config) @@ -1360,6 +1366,10 @@ IFCFG(0x113) e_config->clientlist_max_caption_len = 0; + IFCFGEND; + + IFCFG(0x114) + e_config->thumb_nice = 0; IFCFGEND; e_config->config_version = E_CONFIG_FILE_VERSION; =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_config.h,v retrieving revision 1.149 retrieving revision 1.150 diff -u -3 -r1.149 -r1.150 --- e_config.h 4 Apr 2007 22:45:45 -0000 1.149 +++ e_config.h 5 Apr 2007 17:20:09 -0000 1.150 @@ -39,6 +39,8 @@ typedef struct _E_Config_Shelf E_Config_Shelf; typedef struct _E_Config_Mime_Icon E_Config_Mime_Icon; +typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme; + typedef Eet_Data_Descriptor E_Config_DD; #else @@ -52,7 +54,7 @@ /* increment this whenever a new set of config values are added but the users * config doesn't need to be wiped - simply new values need to be put in */ -#define E_CONFIG_FILE_GENERATION 0x0113 +#define E_CONFIG_FILE_GENERATION 0x0114 #define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION) #define E_EVAS_ENGINE_DEFAULT 0 @@ -288,6 +290,8 @@ Evas_List *mime_icons; // GUI int desk_auto_switch; // GUI; + + int thumb_nice; }; struct _E_Config_Module @@ -405,6 +409,11 @@ const char *icon; }; +struct _E_Event_Config_Icon_Theme +{ + const char *icon_theme; +}; + EAPI int e_config_init(void); EAPI int e_config_shutdown(void); @@ -435,6 +444,8 @@ EAPI E_Config_Binding_Wheel *e_config_binding_wheel_match(E_Config_Binding_Wheel *eb_in); extern EAPI E_Config *e_config; + +extern EAPI int E_EVENT_CONFIG_ICON_THEME; #endif #endif =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_icon_themes.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- e_int_config_icon_themes.c 25 Mar 2007 22:44:59 -0000 1.23 +++ e_int_config_icon_themes.c 5 Apr 2007 17:20:09 -0000 1.24 @@ -99,16 +99,18 @@ static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) { - E_Action *a; + E_Event_Config_Icon_Theme *ev; /* Actually take our cfdata settings and apply them in real life */ e_config->icon_theme = evas_stringshare_add(cfdata->themename); e_config_save_queue(); - /* If it's good enough for themes, it's good enough for icon themes, but ICK!. */ - a = e_action_find("restart"); - if ((a) && (a->func.go)) a->func.go(NULL, NULL); - + ev = E_NEW(E_Event_Config_Icon_Theme, 1); + if (ev) + { + ev->icon_theme = e_config->icon_theme; + ecore_event_add(E_EVENT_CONFIG_ICON_THEME, ev, NULL, NULL); + } return 1; /* Apply was OK */ } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -3 -r1.40 -r1.41 --- e_thumb.c 24 Mar 2007 12:55:14 -0000 1.40 +++ e_thumb.c 5 Apr 2007 17:20:09 -0000 1.41 @@ -134,7 +134,8 @@ { Ecore_Exe *exe; - snprintf(buf, sizeof(buf), "%s/enlightenment_thumb", e_prefix_bin_get()); + snprintf(buf, sizeof(buf), "%s/enlightenment_thumb --nice=%d", e_prefix_bin_get(), + e_config->thumb_nice); exe = ecore_exe_run(buf, NULL); _thumbnailers_exe = evas_list_append(_thumbnailers_exe, exe); } =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb_main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- e_thumb_main.c 24 Mar 2007 11:29:12 -0000 1.25 +++ e_thumb_main.c 5 Apr 2007 17:20:09 -0000 1.26 @@ -44,13 +44,12 @@ int main(int argc, char **argv) { -// char buf[4096]; int i; -/* FIXME: make this configurable */ -// nice(20); for (i = 1; i < argc; i++) { + printf("arg: %d - '%s'\n", strlen(argv[i]), argv[i]); + printf("hm: %d\n", (!strncmp(argv[i], "--nice=", 7))); if ((!strcmp(argv[i], "-h")) || (!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "--help"))) @@ -61,6 +60,14 @@ ); exit(0); } + else if (!strncmp(argv[i], "--nice=", 7)) + { + const char *val; + + val = argv[i] + 7; + if (*val) + nice(atoi(val)); + } } ecore_init(); @@ -359,7 +366,6 @@ ecore_ipc_server_send(_e_ipc_server, 5, 2, eth->objid, 0, 0, buf, strlen(buf) + 1); } -/* FIXME: should use md5 or sha1 sum of the path */ static char * _e_thumb_file_id(char *file, char *key) { ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs