Enlightenment CVS committal
Author : englebass
Project : e_modules
Module : mail
Dir : e_modules/mail
Modified Files:
e_mod_main.h e_mod_config.c e_mod_main.c
Log Message:
Config settings for popup
===================================================================
RCS file: /cvs/e/e_modules/mail/e_mod_main.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_mod_main.h 27 Aug 2007 21:47:04 -0000 1.13
+++ e_mod_main.h 27 Aug 2007 21:59:05 -0000 1.14
@@ -54,6 +54,9 @@
unsigned char show_label;
double check_time;
+ unsigned char show_popup;
+ unsigned char show_popup_empty;
+
Evas_List *boxes;
};
===================================================================
RCS file: /cvs/e/e_modules/mail/e_mod_config.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -3 -r1.20 -r1.21
--- e_mod_config.c 15 Mar 2007 13:56:19 -0000 1.20
+++ e_mod_config.c 27 Aug 2007 21:59:05 -0000 1.21
@@ -6,6 +6,8 @@
{
int show_label;
double check_time;
+ int show_popup;
+ int show_popup_empty;
Evas_List *boxes;
/* Evas Object References */
@@ -57,6 +59,8 @@
{
cfdata->show_label = ci->show_label;
cfdata->check_time = ci->check_time;
+ cfdata->show_popup = ci->show_popup;
+ cfdata->show_popup_empty = ci->show_popup_empty;
cfdata->boxes = ci->boxes;
}
@@ -93,6 +97,12 @@
ob =
e_widget_check_add (evas, D_("Always Show Labels"), &(cfdata->show_label));
e_widget_framelist_object_append (of, ob);
+ ob =
+ e_widget_check_add (evas, D_("Show Mailbox Popup"), &(cfdata->show_popup));
+ e_widget_framelist_object_append (of, ob);
+ ob =
+ e_widget_check_add (evas, D_("Show All Boxes In Popup"),
&(cfdata->show_popup_empty));
+ e_widget_framelist_object_append (of, ob);
ob = e_widget_label_add (evas, D_("Check Interval"));
e_widget_framelist_object_append (of, ob);
ob =
@@ -141,6 +151,8 @@
ci = cfd->data;
ci->show_label = cfdata->show_label;
ci->check_time = cfdata->check_time;
+ ci->show_popup = cfdata->show_popup;
+ ci->show_popup_empty = cfdata->show_popup_empty;
e_config_save_queue ();
_mail_config_updated (ci->id);
return 1;
===================================================================
RCS file: /cvs/e/e_modules/mail/e_mod_main.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- e_mod_main.c 27 Aug 2007 21:47:04 -0000 1.48
+++ e_mod_main.c 27 Aug 2007 21:59:05 -0000 1.49
@@ -295,7 +295,7 @@
if (inst->popup) return;
ci = _mail_config_item_get (inst->gcc->id);
- if (!ci->boxes) return;
+ if ((!ci->show_popup) || (!ci->boxes)) return;
inst->popup = e_gadcon_popup_new (inst->gcc, _mail_popup_resize);
snprintf (path, sizeof (path), "%s/mail.edj",
@@ -307,12 +307,21 @@
cb = l->data;
if (!cb) continue;
+ if ((!ci->show_popup_empty) && (!cb->num_new)) continue;
snprintf (buf, sizeof (buf), "%s: %d/%d", cb->name, cb->num_new,
cb->num_total);
e_tlist_append (list, buf, NULL, NULL, NULL, NULL);
}
- e_gadcon_popup_content_set (inst->popup, list);
- e_gadcon_popup_show (inst->popup);
+ if (e_tlist_count (list))
+ {
+ e_gadcon_popup_content_set (inst->popup, list);
+ e_gadcon_popup_show (inst->popup);
+ }
+ else
+ {
+ e_object_del (E_OBJECT (inst->popup));
+ inst->popup = NULL;
+ }
}
static void
@@ -374,6 +383,8 @@
ci->id = evas_stringshare_add (id);
ci->show_label = 1;
ci->check_time = 15.0;
+ ci->show_popup = 1;
+ ci->show_popup_empty = 0;
ci->boxes = NULL;
mail_config->items = evas_list_append (mail_config->items, ci);
@@ -418,6 +429,8 @@
E_CONFIG_VAL (D, T, id, STR);
E_CONFIG_VAL (D, T, show_label, UCHAR);
E_CONFIG_VAL (D, T, check_time, DOUBLE);
+ E_CONFIG_VAL (D, T, show_popup, UCHAR);
+ E_CONFIG_VAL (D, T, show_popup_empty, UCHAR);
E_CONFIG_LIST (D, T, boxes, conf_box_edd);
conf_edd = E_CONFIG_DD_NEW ("Mail_Config", Config);
@@ -438,6 +451,8 @@
ci->id = evas_stringshare_add ("0");
ci->show_label = 1;
ci->check_time = 15.0;
+ ci->show_popup = 1;
+ ci->show_popup_empty = 0;
ci->boxes = NULL;
mail_config->items = evas_list_append (mail_config->items, ci);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs