Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        layout_etk_simple.c 


Log Message:
* Location add dialog -> hide, not destroy, for now - means we leak, but 
destroy causes a segv for some reason.  For those interested, a trace is at: 
http://pastebin.com/572565
* Start of a 'remove location' menu 

===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/entropy/src/plugins/layout_etk_simple.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- layout_etk_simple.c 24 Feb 2006 23:19:48 -0000      1.15
+++ layout_etk_simple.c 26 Feb 2006 02:33:25 -0000      1.16
@@ -1,6 +1,7 @@
 #include <Etk.h>
 #include "entropy.h"
 #include "entropy_gui.h"
+#include "etk_location_add_dialog.h"
 #include <dlfcn.h>
 #include <Ecore.h>
 #include <stdlib.h>
@@ -18,6 +19,8 @@
   Etk_Widget *paned;
   Etk_Widget *statusbar_box;
   Etk_Widget *statusbars[3];
+
+  Etk_Widget* popup;
 };
 
 typedef enum _Etk_Menu_Item_Type
@@ -44,6 +47,21 @@
   printf ("Destroying layout_etk...\n");
 }
 
+static void _etk_layout_row_clicked(Etk_Object *object, 
+               Etk_Tree_Row *row, Etk_Event_Mouse_Up_Down *event, void *data)
+{
+       entropy_gui_component_instance* instance = data;
+       entropy_layout_gui* gui = instance->data;       
+       
+       printf("Button: %d\n", event->button);
+
+       if (event->button == 3) {
+               etk_tree_row_select(row);
+               etk_menu_popup(ETK_MENU(gui->popup));
+       }
+       
+}
+
 static Etk_Widget *_entropy_etk_menu_item_new(Etk_Menu_Item_Type item_type, 
const char *label,
    Etk_Stock_Id stock_id, Etk_Menu_Shell *menu_shell, Etk_Widget *statusbar)
 {
@@ -262,6 +280,13 @@
 
   etk_widget_size_request_set(gui->tree, 180, 600);
 
+  /*Popup init*/
+   gui->popup = etk_menu_new();
+   etk_signal_connect("row_clicked", ETK_OBJECT( gui->tree  ),
+          ETK_CALLBACK(_etk_layout_row_clicked), layout);
+
+   _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Delete this entry"), 
ETK_STOCK_DOCUMENT_OPEN, ETK_MENU_SHELL(gui->popup),NULL);
+
 
   /*Config load*/
   if (!(tmp = entropy_config_str_get ("layout_ewl_simple", "structure_bar"))) {




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to