summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Janetzek <hannes.janetzek@gmail.com>2011-03-22 23:21:20 +0000
committerHannes Janetzek <hannes.janetzek@gmail.com>2011-03-22 23:21:20 +0000
commit325455719440c2a23f5771e9f263c85742822c45 (patch)
treeae2d8b1f7ddd96fd3fe5ebcd7706249893acdce6
parent394a0ff35014e518ee1a6b654755e1446bd2970f (diff)
e-modules/mail: always show inboxes in top-level
SVN revision: 58003
-rw-r--r--src/e_mod_main.c51
1 files changed, 27 insertions, 24 deletions
diff --git a/src/e_mod_main.c b/src/e_mod_main.c
index ed3413f..59bbd7a 100644
--- a/src/e_mod_main.c
+++ b/src/e_mod_main.c
@@ -226,30 +226,6 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
226 char buf[1024]; 226 char buf[1024];
227 227
228 m = e_menu_new (); 228 m = e_menu_new ();
229
230 if ((inst->ci->boxes) && (eina_list_count (inst->ci->boxes) > 0))
231 {
232 E_Menu_Item *mm;
233
234 snprintf (buf, sizeof (buf), "%s/module.edj",
235 e_module_dir_get (mail_config->module));
236
237 for (l = inst->ci->boxes; l; l = l->next)
238 {
239 Config_Box *cb;
240
241 cb = l->data;
242 if (!cb)
243 continue;
244 mi = e_menu_item_new (m);
245 snprintf (buf, sizeof (buf), "%s: %d/%d", cb->name, cb->num_new,
246 cb->num_total);
247 e_menu_item_label_set (mi, buf);
248 if ((cb->exec) && (cb->use_exec))
249 e_menu_item_callback_set (mi, _mail_menu_cb_exec, cb);
250 }
251 }
252
253 mi = e_menu_item_new (m); 229 mi = e_menu_item_new (m);
254 e_menu_item_label_set (mi, D_("Settings")); 230 e_menu_item_label_set (mi, D_("Settings"));
255 e_util_menu_item_theme_icon_set(mi, "preferences-system"); 231 e_util_menu_item_theme_icon_set(mi, "preferences-system");
@@ -259,6 +235,33 @@ _mail_cb_mouse_down (void *data, Evas * e, Evas_Object * obj,
259 e_menu_post_deactivate_callback_set (m, _mail_menu_cb_post, inst); 235 e_menu_post_deactivate_callback_set (m, _mail_menu_cb_post, inst);
260 mail_config->menu = m; 236 mail_config->menu = m;
261 237
238 if ((inst->ci->boxes) && (eina_list_count (inst->ci->boxes) > 0))
239 {
240 mi = NULL;
241 snprintf (buf, sizeof (buf), "%s/module.edj",
242 e_module_dir_get (mail_config->module));
243
244 for (l = inst->ci->boxes; l; l = l->next)
245 {
246 Config_Box *cb;
247
248 cb = l->data;
249 if (!cb)
250 continue;
251 mi = e_menu_item_new_relative (m, mi);
252 snprintf (buf, sizeof (buf), "%s: %d/%d", cb->name, cb->num_new,
253 cb->num_total);
254 e_menu_item_label_set (mi, buf);
255 if ((cb->exec) && (cb->use_exec))
256 e_menu_item_callback_set (mi, _mail_menu_cb_exec, cb);
257 }
258 if (mi)
259 {
260 mi = e_menu_item_new_relative(m, mi);
261 e_menu_item_separator_set(mi, 1);
262 }
263 }
264
262 e_gadcon_canvas_zone_geometry_get (inst->gcc->gadcon, &x, &y, &w, &h); 265 e_gadcon_canvas_zone_geometry_get (inst->gcc->gadcon, &x, &y, &w, &h);
263 e_menu_activate_mouse (m, 266 e_menu_activate_mouse (m,
264 e_util_zone_current_get (e_manager_current_get 267 e_util_zone_current_get (e_manager_current_get