Enlightenment CVS committal

Author  : devilhorns
Project : e_modules
Module  : tclock

Dir     : e_modules/tclock


Modified Files:
        e_mod_main.h e_mod_main.c 


Log Message:
Fix tclock menu for recent gadcon_client_util_menu_items_append breakage w/
shelf.

===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- e_mod_main.h        31 Oct 2007 14:41:53 -0000      1.21
+++ e_mod_main.h        25 Nov 2007 04:42:12 -0000      1.22
@@ -13,7 +13,6 @@
 {
    E_Module *module;
    E_Config_Dialog *config_dialog;
-   E_Menu *menu;
    Evas_List *instances;
    Evas_List *items;
 };
===================================================================
RCS file: /cvs/e/e_modules/tclock/e_mod_main.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- e_mod_main.c        12 Nov 2007 04:15:53 -0000      1.52
+++ e_mod_main.c        25 Nov 2007 04:42:12 -0000      1.53
@@ -22,7 +22,6 @@
 /* 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);
 
@@ -106,9 +105,7 @@
        ecore_timer_del (check_timer);
        check_timer = NULL;
      }
-   
-  free (inst);
-  inst = NULL;
+   E_FREE(inst);
 }
 
 static void
@@ -159,15 +156,13 @@
 
   inst = data;
   ev = event_info;
-  if ((ev->button == 3) && (!tclock_config->menu))
+  if ((ev->button == 3) && (!inst->gcc->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"));
@@ -183,22 +178,13 @@
                             e_util_zone_current_get (e_manager_current_get
                                                      ()), x + ev->output.x,
                             y + ev->output.y, 1, 1,
-                            E_MENU_POP_DIRECTION_DOWN, ev->timestamp);
+                            E_MENU_POP_DIRECTION_AUTO, 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;
@@ -387,12 +373,6 @@
 
   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)
     {
@@ -407,12 +387,10 @@
        evas_stringshare_del (ci->time_format);
       if (ci->date_format)
        evas_stringshare_del (ci->date_format);
-      free (ci);
-      ci = NULL;
+       E_FREE(ci);
     }
 
-  free (tclock_config);
-  tclock_config = NULL;
+   E_FREE(tclock_config);
   E_CONFIG_DD_FREE (conf_item_edd);
   E_CONFIG_DD_FREE (conf_edd);
   return 1;
@@ -424,4 +402,3 @@
   e_config_domain_save ("module.tclock", conf_edd, tclock_config);
   return 1;
 }
-



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to