Enlightenment CVS committal Author : chaos Project : e17 Module : proto
Dir : e17/proto/entropy/src/dialogs Modified Files: etk_file_context_menu.c Log Message: * Make double click actually work * Trash restore work =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/dialogs/etk_file_context_menu.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- etk_file_context_menu.c 20 Aug 2006 05:51:11 -0000 1.15 +++ etk_file_context_menu.c 26 Aug 2006 12:59:15 -0000 1.16 @@ -20,6 +20,7 @@ Etk_Widget* _entropy_etk_context_menu_groups_remove_from_item = NULL; Etk_Widget* _entropy_etk_context_menu_rename_menu_item = NULL; +Etk_Widget* _entropy_etk_context_menu_restore_trash_menu_item = NULL; entropy_generic_file* _entropy_etk_context_menu_current_folder = NULL; entropy_generic_file* _entropy_etk_context_menu_current_file = NULL; @@ -230,6 +231,20 @@ } static void +_entropy_etk_context_menu_trash_restore_cb(Etk_Object *object, void *data) +{ + Ecore_List* files; + + files = ecore_list_new(); + ecore_list_append(files, _entropy_etk_context_menu_current_file); + + entropy_plugin_filesystem_file_trash_restore( + files, _entropy_etk_context_menu_current_instance); + + ecore_list_destroy(files); +} + +static void _entropy_etk_context_menu_group_file_add_remove_cb(Etk_Object *object, void *data) { const char* label; @@ -448,6 +463,15 @@ etk_signal_connect("activated", ETK_OBJECT(menu_item), ETK_CALLBACK(_entropy_etk_context_menu_trash_copy_cb), NULL); + /*Trash restore*/ + _entropy_etk_context_menu_restore_trash_menu_item = + _entropy_etk_menu_item_new(ETK_MENU_ITEM_NORMAL, _("Restore from Trash (test)"), + ETK_STOCK_EDIT_COPY, ETK_MENU_SHELL(menu),NULL); + + etk_signal_connect("activated", ETK_OBJECT(_entropy_etk_context_menu_restore_trash_menu_item), + ETK_CALLBACK(_entropy_etk_context_menu_trash_restore_cb), NULL); + + } entropy_etk_context_menu_metadata_groups_populate(); @@ -467,6 +491,11 @@ etk_widget_show_all(_entropy_etk_context_menu_open_with_item); etk_widget_show_all(_entropy_etk_context_menu_rename_menu_item); + if (!strcmp(current_file->uri_base, "trash")) + etk_widget_show_all(_entropy_etk_context_menu_restore_trash_menu_item); + else + etk_widget_hide(_entropy_etk_context_menu_restore_trash_menu_item); + /*Mode = single*/ _entropy_etk_context_menu_mode = 0; @@ -482,6 +511,7 @@ /*Hide*/ etk_widget_hide(_entropy_etk_context_menu_open_with_item); etk_widget_hide(_entropy_etk_context_menu_rename_menu_item); + etk_widget_hide(_entropy_etk_context_menu_restore_trash_menu_item); if (_entropy_etk_context_menu_selected_files) ecore_list_destroy(_entropy_etk_context_menu_selected_files); ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs