aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChidambar Zinnoury <illogict@online.fr>2012-12-26 15:44:07 +0000
committerChidambar Zinnoury <illogict@online.fr>2012-12-26 15:44:07 +0000
commitb583794081440eee2e394306420923b6bd7c1773 (patch)
treecd5726068001feb7d747e696a263351a4a100eec
parent e fileman settings: fix values reading, check changed, apply, and title (“... (diff)
downloadenlightenment-b583794081440eee2e394306420923b6bd7c1773.tar.gz
e notification settings: add check changed.
SVN revision: 81717
-rw-r--r--ChangeLog1
-rw-r--r--NEWS3
-rw-r--r--src/modules/notification/e_mod_config.c35
3 files changed, 36 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 04f3d2ba8..2cb112654 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
2012-12-26 Chidambar Zinnoury (ilLogict)
+ * Notification settings: add check changed.
* Fileman settings: fix values reading, check changed, apply,
and title (“Fileman”→“File Manager”).
* Pager settings: fix check changed and strings (“px”→“pixels”).
diff --git a/NEWS b/NEWS
index dfcce3398..8d2132560 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,8 @@ Improvements:
- clientlist,
- startup theme,
- desktop environments,
- - language.
+ - language,
+ - notification.
* Improve UI of desk settings.
* Add icons for gadcon settings.
* Improve strings of pager settings.
diff --git a/src/modules/notification/e_mod_config.c b/src/modules/notification/e_mod_config.c
index b21f327f5..3f521c872 100644
--- a/src/modules/notification/e_mod_config.c
+++ b/src/modules/notification/e_mod_config.c
@@ -10,6 +10,7 @@ struct _E_Config_Dialog_Data
int dual_screen;
double timeout;
int corner;
+ Evas_Object *force_timeout_slider;
};
/* local function protos */
@@ -22,6 +23,10 @@ static Evas_Object *_basic_create(E_Config_Dialog *cfd,
E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd,
E_Config_Dialog_Data *cfdata);
+static int _basic_check_changed(E_Config_Dialog *cfd,
+ E_Config_Dialog_Data *cfdata);
+static void _force_timeout_changed(void *data,
+ Evas_Object *obj __UNUSED__);
E_Config_Dialog *
e_int_config_notification_module(E_Container *con,
@@ -40,6 +45,7 @@ e_int_config_notification_module(E_Container *con,
v->free_cfdata = _free_data;
v->basic.create_widgets = _basic_create;
v->basic.apply_cfdata = _basic_apply;
+ v->basic.check_changed = _basic_check_changed;
snprintf(buf, sizeof(buf), "%s/e-module-notification.edj", notification_mod->dir);
cfd = e_config_dialog_new(con, _("Notification Settings"), "Notification",
@@ -103,11 +109,13 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__,
of = e_widget_framelist_add(evas, _("Default Timeout"), 0);
ow = e_widget_check_add(evas, _("Force timeout for all notifications"), &(cfdata->force_timeout));
+ e_widget_on_change_hook_set(ow, _force_timeout_changed, cfdata);
e_widget_framelist_object_append(of, ow);
- ow = e_widget_slider_add(evas, 1, 0, _("%.1f seconds"), 0.0, 15.0, 0.1, 0,
- &(cfdata->timeout), NULL, 200);
+ cfdata->force_timeout_slider = ow =
+ e_widget_slider_add(evas, 1, 0, _("%.1f seconds"), 0.0, 15.0, 0.1, 0, &(cfdata->timeout), NULL, 200);
e_widget_framelist_object_append(of, ow);
e_widget_list_object_append(o, of, 1, 1, 0.5);
+ _force_timeout_changed(cfdata, NULL);
/* man = e_manager_current_get();
* of = e_widget_framelist_add(evas, _("Placement"), 0);
@@ -166,3 +174,26 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__,
return 1;
}
+static int
+_basic_check_changed(E_Config_Dialog *cfd __UNUSED__,
+ E_Config_Dialog_Data *cfdata)
+{
+ return
+ (cfdata->show_low != notification_cfg->show_low) ||
+ (cfdata->show_normal != notification_cfg->show_normal) ||
+ (cfdata->show_critical != notification_cfg->show_critical) ||
+ (cfdata->timeout != notification_cfg->timeout) ||
+ (cfdata->corner != notification_cfg->corner) ||
+ (cfdata->force_timeout != notification_cfg->force_timeout) ||
+ (cfdata->ignore_replacement != notification_cfg->ignore_replacement) ||
+ (cfdata->dual_screen != notification_cfg->dual_screen);
+}
+
+static void
+_force_timeout_changed(void *data,
+ Evas_Object *obj __UNUSED__)
+{
+ E_Config_Dialog_Data *cfdata = data;
+
+ e_widget_disabled_set(cfdata->force_timeout_slider, !cfdata->force_timeout);
+}