e-modules: update do e_gadcon_util_cliet_menu_append api changes. allowing to have settings menu in toplevel again

SVN revision: 57828
master
Hannes Janetzek 12 years ago
parent ebeb447bf4
commit 394a0ff350
  1. 19
      src/e_mod_main.c
  2. 2
      src/e_mod_main.h
  3. 3
      src/imap.c
  4. 29
      src/imap2.c

@ -220,14 +220,12 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
return;
if ((ev->button == 3) && (!mail_config->menu))
{
E_Menu *ma, *mg;
E_Menu *m;
E_Menu_Item *mi;
int x, y, w, h;
char buf[1024];
ma = e_menu_new ();
e_menu_post_deactivate_callback_set (ma, _mail_menu_cb_post, inst);
mail_config->menu = ma;
m = e_menu_new ();
if ((inst->ci->boxes) && (eina_list_count (inst->ci->boxes) > 0))
{
@ -243,7 +241,7 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
cb = l->data;
if (!cb)
continue;
mi = e_menu_item_new (ma);
mi = e_menu_item_new (m);
snprintf (buf, sizeof (buf), "%s: %d/%d", cb->name, cb->num_new,
cb->num_total);
e_menu_item_label_set (mi, buf);
@ -252,16 +250,17 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
}
}
mg = e_menu_new ();
mi = e_menu_item_new (mg);
mi = e_menu_item_new (m);
e_menu_item_label_set (mi, D_("Settings"));
e_util_menu_item_theme_icon_set(mi, "preferences-system");
e_menu_item_callback_set (mi, _mail_menu_cb_configure, inst);
e_gadcon_client_util_menu_items_append (inst->gcc, ma, mg, 0);
m = e_gadcon_client_util_menu_items_append (inst->gcc, m, 0);
e_menu_post_deactivate_callback_set (m, _mail_menu_cb_post, inst);
mail_config->menu = m;
e_gadcon_canvas_zone_geometry_get (inst->gcc->gadcon, &x, &y, &w, &h);
e_menu_activate_mouse (ma,
e_menu_activate_mouse (m,
e_util_zone_current_get (e_manager_current_get
()), x + ev->output.x,
y + ev->output.y, 1, 1,

@ -4,6 +4,8 @@
#ifndef E_MOD_MAIN_H
#define E_MOD_MAIN_H
#define PRINT_LOTS_OF_DEBUG 1
typedef enum
{
MAIL_TYPE_POP,

@ -25,15 +25,18 @@ _mail_imap_check_mail (void *data)
{
Ecore_Con_Type type;
Eina_List *l;
printf("check mail!!!!\n");
for (l = iservers; l; l = l->next)
{
ImapServer *is;
printf("1\n");
is = l->data;
is->data = data;
if (!is->server)
{
printf("2\n");
if (!is->add_handler)
is->add_handler =
ecore_event_handler_add (ECORE_CON_EVENT_SERVER_ADD,

@ -2,7 +2,7 @@
#include "e_mod_main.h"
#include "imap2.h"
#if 0
#if 1
#define D(args...) printf(args)
#else
#define D(args...)
@ -521,16 +521,15 @@ _mail_imap_server_data_parse (ImapClient *ic, char *line)
else
{
char *p;
/* The result can be <n> <result> */
p = strchr (value, ' ');
if (p) *p = '\0';
if (!strcmp (value, "RECENT"))
{
D ("Recent mails: %d\n", atoi (result));
//ic->state = IMAP_STATE_SEARCH_UNSEEN;
//ic->state = IMAP_STATE_SEARCH_RECENT;
ic->state = IMAP_STATE_SEARCH_NEW;
ic->state = IMAP_STATE_SEARCH_UNSEEN;
/* ic->state = IMAP_STATE_SEARCH_RECENT; */
/* ic->state = IMAP_STATE_SEARCH_NEW; */
}
else if (!strcmp (value, "EXISTS"))
{
@ -540,16 +539,16 @@ _mail_imap_server_data_parse (ImapClient *ic, char *line)
else if (!strcmp (value, "FETCH"))
{
D ("Reading mail: %d\n", atoi (result));
//ic->state = IMAP_STATE_SEARCH_UNSEEN;
//ic->state = IMAP_STATE_SEARCH_RECENT;
ic->state = IMAP_STATE_SEARCH_NEW;
ic->state = IMAP_STATE_SEARCH_UNSEEN;
/* ic->state = IMAP_STATE_SEARCH_RECENT; */
/* ic->state = IMAP_STATE_SEARCH_NEW; */
}
else if (!strcmp (value, "EXPUNGE"))
{
D ("Deleting mail: %d\n", atoi (result));
//ic->state = IMAP_STATE_SEARCH_UNSEEN;
//ic->state = IMAP_STATE_SEARCH_RECENT;
ic->state = IMAP_STATE_SEARCH_NEW;
ic->state = IMAP_STATE_SEARCH_UNSEEN;
/* ic->state = IMAP_STATE_SEARCH_RECENT; */
/* ic->state = IMAP_STATE_SEARCH_NEW; */
}
else
{
@ -602,9 +601,9 @@ _mail_imap_server_idle (ImapClient *ic)
ecore_con_server_send (ic->server, out, len);
ic->idling = 0;
//ic->state = IMAP_STATE_SEARCH_UNSEEN;
ic->state = IMAP_STATE_SEARCH_UNSEEN;
//ic->state = IMAP_STATE_SEARCH_RECENT;
ic->state = IMAP_STATE_SEARCH_NEW;
/* ic->state = IMAP_STATE_SEARCH_NEW; */
}
static void
@ -616,9 +615,9 @@ _mail_imap_server_noop (ImapClient *ic)
len = snprintf (out, sizeof (out), "A%04i NOOP\r\n", ic->cmd++);
ecore_con_server_send (ic->server, out, len);
//ic->state = IMAP_STATE_SEARCH_UNSEEN;
ic->state = IMAP_STATE_SEARCH_UNSEEN;
//ic->state = IMAP_STATE_SEARCH_RECENT;
ic->state = IMAP_STATE_SEARCH_NEW;
/* ic->state = IMAP_STATE_SEARCH_NEW; */
}
static int

Loading…
Cancel
Save