-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi devs, here's my two cents to edje_editor, a very nice and powerful
app. With my patch you can remove program from collection's tree.
Great work, Dave!
Ciao
Massimiliano
- --
Massimiliano Calamelli
http://mcalamelli.netsons.org
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
iD8DBQFHTWMtleGEL56NNP4RAlbEAJ9nVGpfEUj2i5Mf4dZdujF8r1pHtwCeJ+P7
flGhTosjheSJOpMtYKCUKz0=
=50Fe
-----END PGP SIGNATURE-----
Index: callbacks.c
===================================================================
RCS file: /var/cvs/e/e17/proto/edje_editor/src/bin/callbacks.c,v
retrieving revision 1.37
diff -u -r1.37 callbacks.c
--- callbacks.c 28 Nov 2007 07:10:52 -0000 1.37
+++ callbacks.c 28 Nov 2007 12:40:13 -0000
@@ -15,6 +15,7 @@
extern void PROTO_engrave_part_state_image_tween_remove_all(Engrave_Part_State
*eps);
extern int PROTO_engrave_part_raise(Engrave_Part *ep);
extern int PROTO_engrave_part_lower(Engrave_Part *ep);
+extern void PROTO_engrave_group_program_remove(Engrave_Group *eg,
Engrave_Program *epr);
int current_color_object;
@@ -1509,6 +1510,24 @@
ShowAlert("No group selected");
}
break;
+ case REMOVE_PROG:
+ if (Cur.epr) {
+ row = NULL;
+ row = etk_tree_row_next_get(ecore_hash_get(hash,Cur.epr));
+ if (!row) row =
etk_tree_row_prev_get(ecore_hash_get(hash,Cur.epr));
+ etk_tree_row_delete(ecore_hash_get(hash,Cur.epr));
+ ecore_hash_remove (hash, Cur.epr);
+ PROTO_engrave_group_program_remove(Cur.eg, Cur.epr);
+ engrave_program_free(Cur.epr);
+
+ Cur.epr = NULL;
+
+ ev_redraw();
+ if (row) etk_tree_row_select(row);
+ } else {
+ ShowAlert("No program selected");
+ }
+ break;
}
return ETK_TRUE;
}
Index: interface.c
===================================================================
RCS file: /var/cvs/e/e17/proto/edje_editor/src/bin/interface.c,v
retrieving revision 1.44
diff -u -r1.44 interface.c
--- interface.c 28 Nov 2007 07:10:52 -0000 1.44
+++ interface.c 28 Nov 2007 12:40:19 -0000
@@ -1350,6 +1350,14 @@
etk_signal_connect("activated", ETK_OBJECT(menu_item),
ETK_CALLBACK(on_RemoveMenu_item_activated),
(void*)REMOVE_GROUP);
etk_menu_shell_append(ETK_MENU_SHELL(UI_RemoveMenu),
ETK_MENU_ITEM(menu_item));
+
+ //program
+ menu_item = etk_menu_item_image_new_with_label("Selected Program");
+ image = etk_image_new_from_edje(EdjeFile,"PROG.PNG");
+ etk_menu_item_image_set(ETK_MENU_ITEM_IMAGE(menu_item), ETK_IMAGE(image));
+ etk_signal_connect("activated", ETK_OBJECT(menu_item),
+ ETK_CALLBACK(on_RemoveMenu_item_activated), (void*)REMOVE_PROG);
+ etk_menu_shell_append(ETK_MENU_SHELL(UI_RemoveMenu),
ETK_MENU_ITEM(menu_item));
sep = etk_vseparator_new();
etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), sep, ETK_BOX_START);
Index: main.c
===================================================================
RCS file: /var/cvs/e/e17/proto/edje_editor/src/bin/main.c,v
retrieving revision 1.17
diff -u -r1.17 main.c
--- main.c 28 Nov 2007 07:10:52 -0000 1.17
+++ main.c 28 Nov 2007 12:40:19 -0000
@@ -155,6 +155,26 @@
eg->parts = evas_list_remove(eg->parts,ep);
engrave_part_parent_set(ep, NULL);
}
+
+/**
+ * engrave_group_program_remove - remove the given program from the group
+ * @param eg: The Engrave_Group to remove the program too.
+ * @param ep: The Engrave_Program to remove.
+ *
+ * @return Returns no value.
+ */
+/*EAPI*/ void
+PROTO_engrave_group_program_remove(Engrave_Group *eg, Engrave_Program *epr) {
+ Engrave_Group * group;
+ Evas_List * list;
+
+ if (!eg || !epr) return;
+
+ eg->programs = evas_list_remove(eg->programs, epr);
+ engrave_program_parent_set(epr, NULL);
+
+}
+
/**
* engrave_file_group_remove - remove the group from the given file
* @param ef: The Engrave_File to remove the group too.
Index: main.h
===================================================================
RCS file: /var/cvs/e/e17/proto/edje_editor/src/bin/main.h,v
retrieving revision 1.15
diff -u -r1.15 main.h
--- main.h 28 Nov 2007 07:10:52 -0000 1.15
+++ main.h 28 Nov 2007 12:40:19 -0000
@@ -67,6 +67,7 @@
REMOVE_DESCRIPTION,
REMOVE_PART,
REMOVE_GROUP,
+ REMOVE_PROG,
REL1X_SPINNER,
REL1Y_SPINNER,
REL2X_SPINNER,
-------------------------------------------------------------------------
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-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel