Enlightenment CVS committal
Author : englebass
Project : e_modules
Module : tclock
Dir : e_modules/tclock
Modified Files:
e_mod_main.c e_mod_main.h
Log Message:
Revert gadcon menu change.
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -3 -r1.53 -r1.54
--- e_mod_main.c 25 Nov 2007 04:42:12 -0000 1.53
+++ e_mod_main.c 2 Dec 2007 16:37:00 -0000 1.54
@@ -22,6 +22,7 @@
/* Module Protos */
static void _tclock_cb_mouse_down (void *data, Evas *e,
Evas_Object *obj, void *event_info);
static void _tclock_menu_cb_configure (void *data, E_Menu *m,
E_Menu_Item *mi);
+static void _tclock_menu_cb_post (void *data, E_Menu *m);
static int _tclock_cb_check (void *data);
static Config_Item *_tclock_config_item_get (const char *id);
@@ -105,7 +106,9 @@
ecore_timer_del (check_timer);
check_timer = NULL;
}
- E_FREE(inst);
+
+ free (inst);
+ inst = NULL;
}
static void
@@ -156,13 +159,15 @@
inst = data;
ev = event_info;
- if ((ev->button == 3) && (!inst->gcc->menu))
+ if ((ev->button == 3) && (!tclock_config->menu))
{
E_Menu *mn;
E_Menu_Item *mi;
int x, y, w, h;
mn = e_menu_new ();
+ e_menu_post_deactivate_callback_set (mn, _tclock_menu_cb_post, inst);
+ tclock_config->menu = mn;
mi = e_menu_item_new (mn);
e_menu_item_label_set (mi, D_ ("Configuration"));
@@ -178,13 +183,22 @@
e_util_zone_current_get (e_manager_current_get
()), x + ev->output.x,
y + ev->output.y, 1, 1,
- E_MENU_POP_DIRECTION_AUTO, ev->timestamp);
+ E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
evas_event_feed_mouse_up (inst->gcc->gadcon->evas, ev->button,
EVAS_BUTTON_NONE, ev->timestamp, NULL);
}
}
static void
+_tclock_menu_cb_post (void *data, E_Menu * m)
+{
+ if (!tclock_config->menu)
+ return;
+ e_object_del (E_OBJECT (tclock_config->menu));
+ tclock_config->menu = NULL;
+}
+
+static void
_tclock_menu_cb_configure (void *data, E_Menu * m, E_Menu_Item * mi)
{
Instance *inst;
@@ -373,6 +387,12 @@
if (tclock_config->config_dialog)
e_object_del (E_OBJECT (tclock_config->config_dialog));
+ if (tclock_config->menu)
+ {
+ e_menu_post_deactivate_callback_set (tclock_config->menu, NULL, NULL);
+ e_object_del (E_OBJECT (tclock_config->menu));
+ tclock_config->menu = NULL;
+ }
while (tclock_config->items)
{
@@ -387,10 +407,12 @@
evas_stringshare_del (ci->time_format);
if (ci->date_format)
evas_stringshare_del (ci->date_format);
- E_FREE(ci);
+ free (ci);
+ ci = NULL;
}
- E_FREE(tclock_config);
+ free (tclock_config);
+ tclock_config = NULL;
E_CONFIG_DD_FREE (conf_item_edd);
E_CONFIG_DD_FREE (conf_edd);
return 1;
@@ -402,3 +424,4 @@
e_config_domain_save ("module.tclock", conf_edd, tclock_config);
return 1;
}
+
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- e_mod_main.h 25 Nov 2007 04:42:12 -0000 1.22
+++ e_mod_main.h 2 Dec 2007 16:37:00 -0000 1.23
@@ -13,6 +13,7 @@
{
E_Module *module;
E_Config_Dialog *config_dialog;
+ E_Menu *menu;
Evas_List *instances;
Evas_List *items;
};
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs