Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_config_dialog.c e_config_dialog.h
Log Message:
autoapply has a lag of 0.5 seconds from changin config to applying to 1.
limit overhead and 2. minimise bugs.
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_config_dialog.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- e_config_dialog.c 2 Mar 2006 12:03:48 -0000 1.23
+++ e_config_dialog.c 10 May 2006 10:17:58 -0000 1.24
@@ -6,6 +6,7 @@
/* local subsystem functions */
static void _e_config_dialog_free(E_Config_Dialog *cfd);
static void _e_config_dialog_go(E_Config_Dialog *cfd,
E_Config_Dialog_CFData_Type type);
+static int _e_config_dialog_cb_auto_apply_timer(void *data);
static void _e_config_dialog_cb_dialog_del(void *obj);
static void _e_config_dialog_cb_ok(void *data, E_Dialog *dia);
static void _e_config_dialog_cb_apply(void *data, E_Dialog *dia);
@@ -76,6 +77,7 @@
static void
_e_config_dialog_free(E_Config_Dialog *cfd)
{
+ if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
if (cfd->title) evas_stringshare_del(cfd->title);
if (cfd->icon) evas_stringshare_del(cfd->icon);
if (cfd->cfdata)
@@ -186,6 +188,29 @@
}
}
+static int
+_e_config_dialog_cb_auto_apply_timer(void *data)
+{
+ E_Config_Dialog *cfd;
+
+ cfd = data;
+
+ if (cfd->auto_apply_timer) ecore_timer_del(cfd->auto_apply_timer);
+ cfd->auto_apply_timer = NULL;
+
+ if (cfd->view_type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
+ {
+ if (cfd->view->basic.apply_cfdata)
+ cfd->view->basic.apply_cfdata(cfd, cfd->cfdata);
+ }
+ else
+ {
+ if (cfd->view->advanced.apply_cfdata)
+ cfd->view->advanced.apply_cfdata(cfd, cfd->cfdata);
+ }
+ return 0;
+}
+
static void
_e_config_dialog_cb_dialog_del(void *obj)
{
@@ -194,6 +219,7 @@
dia = obj;
cfd = dia->data;
+ if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
cfd->dia = NULL;
e_object_del(E_OBJECT(cfd));
}
@@ -249,6 +275,7 @@
E_Config_Dialog *cfd;
cfd = data;
+ if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
_e_config_dialog_go(cfd, E_CONFIG_DIALOG_CFDATA_TYPE_ADVANCED);
}
@@ -258,6 +285,7 @@
E_Config_Dialog *cfd;
cfd = data;
+ if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
_e_config_dialog_go(cfd, E_CONFIG_DIALOG_CFDATA_TYPE_BASIC);
}
@@ -276,16 +304,8 @@
}
else
{
- if (cfd->view_type == E_CONFIG_DIALOG_CFDATA_TYPE_BASIC)
- {
- if (cfd->view->basic.apply_cfdata)
- ok = cfd->view->basic.apply_cfdata(cfd, cfd->cfdata);
- }
- else
- {
- if (cfd->view->advanced.apply_cfdata)
- ok = cfd->view->advanced.apply_cfdata(cfd, cfd->cfdata);
- }
+ if (cfd->auto_apply_timer) ecore_timer_del(cfd->auto_apply_timer);
+ cfd->auto_apply_timer = ecore_timer_add(0.5,
_e_config_dialog_cb_auto_apply_timer, cfd);
}
}
@@ -296,6 +316,7 @@
int ok = 1;
cfd = dia->data;
+ if (cfd->auto_apply_timer) _e_config_dialog_cb_auto_apply_timer(cfd);
if (cfd->view->close_cfdata)
ok = cfd->view->close_cfdata(cfd, cfd->cfdata);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_config_dialog.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- e_config_dialog.h 2 Mar 2006 12:03:48 -0000 1.11
+++ e_config_dialog.h 10 May 2006 10:17:59 -0000 1.12
@@ -47,6 +47,7 @@
void *data;
int cfg_changed;
int hide_buttons;
+ Ecore_Timer *auto_apply_timer;
};
EAPI E_Config_Dialog *e_config_dialog_new(E_Container *con, const char *title,
const char *icon, int icon_size, E_Config_Dialog_View *view, void *data);
-------------------------------------------------------
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