Fix centering label in the module.

Reset mail count to zero on call to check mail so that we only get total of
new mail. During checks, add new mail count to the total.


SVN revision: 23399
master
Christopher Michael 17 years ago
parent e891afba95
commit 4c01d010bf
  1. 2
      e_mod_main.c
  2. 6
      imap.c
  3. 36
      mail.edc
  4. 2
      mbox.c
  5. 3
      mdir.c
  6. 2
      pop.c

@ -487,6 +487,8 @@ _mail_cb_check(void *data)
int have_imap = 0, have_pop = 0;
if (!inst) return 1;
inst->count = 0;
ci = _mail_config_item_get(inst->gcc->id);
if (!ci->boxes) return 1;
for (l = ci->boxes; l; l = l->next)

@ -194,8 +194,9 @@ _mail_imap_server_del(void *data, int type, void *event)
ecore_con_server_del(is->server);
is->server = NULL;
inst = is->data;
inst->count = is->count;
inst->count += is->count;
_mail_set_text(inst);
return 0;
@ -258,9 +259,6 @@ _mail_imap_server_data(void *data, int type, void *event)
is->count += num;
ic->config->num_new = num;
ic->config->num_total = total;
inst = is->data;
inst->count = num;
_mail_set_text(inst);
if ((num > 0) && (ic->config->use_exec) && (ic->config->exec))
_mail_start_exe(ic->config);

@ -16,32 +16,10 @@ collections
max: 128 128;
parts
{
part
{
name: "clip";
type: RECT;
mouse_events: 1;
description
{
state: "default" 0.0;
color: 255 255 255 255;
rel1
{
relative: 0.0 0.0;
offset: 0 0;
}
rel2
{
relative: 1.0 1.0;
offset: -1 -1;
}
}
}
part
{
name: "logo";
type: IMAGE;
clip_to: "clip";
mouse_events: 1;
description
{
@ -78,14 +56,13 @@ collections
{
name: "new_label";
type: TEXT;
clip_to: "clip";
effect: SOFT_SHADOW;
effect: OUTLINE_SOFT_SHADOW;
mouse_events: 1;
description
{
state: "default" 0.0;
color: 0 0 0 255;
color3: 255 255 255 42;
color: 255 255 255 255;
color3: 0 0 0 32;
visible: 0;
rel1
{
@ -103,10 +80,9 @@ collections
{
text: "";
font: "VeraBold";
size: 14;
size: 16;
min: 1 1;
align: 0.5 0.5;
text_class: "module_large";
align: 1.0 0.5;
}
}
description
@ -114,8 +90,6 @@ collections
state: "visible" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 0 0 0 255;
color3: 255 255 255 42;
}
}
}

@ -105,7 +105,7 @@ _mail_mbox_check_mail(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event
fclose(f);
inst = mb->data;
inst->count = mb->config->num_new;
inst->count += mb->config->num_new;
_mail_set_text(inst);
if ((mb->config->num_new > 0) && (mb->config->use_exec) && (mb->config->exec))
_mail_start_exe(mb->config);

@ -75,8 +75,9 @@ _mail_mdir_check_mail(void *data, Ecore_File_Monitor *monitor, Ecore_File_Event
mc->config->num_total = _mail_mdir_get_files(mc->config->cur_path);
mc->config->num_new = _mail_mdir_get_files(mc->config->new_path);
inst = mc->data;
inst->count = mc->config->num_new;
inst->count += mc->config->num_new;
_mail_set_text(inst);
if ((mc->config->num_new > 0) && (mc->config->use_exec) && (mc->config->exec))
_mail_start_exe(mc->config);

@ -192,7 +192,7 @@ _mail_pop_server_data(void *data, int type, void *event)
pc->config->num_new = num;
pc->config->num_total = num;
}
inst->count = num;
inst->count += num;
_mail_pop_client_quit(pc);
if ((num > 0) && (pc->config->use_exec) && (pc->config->exec))
_mail_start_exe(pc->config);

Loading…
Cancel
Save