Enlightenment CVS committal Author : chaos Project : e17 Module : proto
Dir : e17/proto/entropy/src/dialogs Modified Files: etk_file_context_menu.c etk_properties_dialog.c Log Message: * Shift responsibility for displaying the properties dialog to the layout, and create a new event to indicate that it's an 'extended stat', to differentiate between general stat events, and ones we want to show more detail for. =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/dialogs/etk_file_context_menu.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- etk_file_context_menu.c 19 Apr 2006 04:52:44 -0000 1.3 +++ etk_file_context_menu.c 19 Apr 2006 06:38:21 -0000 1.4 @@ -12,10 +12,6 @@ static entropy_generic_file* _entropy_etk_context_menu_current_file = NULL; static entropy_gui_component_instance* _entropy_etk_context_menu_current_instance = NULL; -static void (*entropy_etk_context_menu_stat_cb)(void*, entropy_generic_file*) = NULL; -static void *entropy_etk_context_menu_stat_cb_data = NULL; - - typedef enum _Etk_Menu_Item_Type { ETK_MENU_ITEM_NORMAL, @@ -57,11 +53,11 @@ static void _entropy_etk_context_menu_properties_cb(Etk_Object *object, void *data) { - if (_entropy_etk_context_menu_current_file) { - if (entropy_etk_context_menu_stat_cb) - (*entropy_etk_context_menu_stat_cb)(entropy_etk_context_menu_stat_cb_data, - _entropy_etk_context_menu_current_file); + entropy_event_extended_stat_expect(_entropy_etk_context_menu_current_file, + _entropy_etk_context_menu_current_instance); + + if (_entropy_etk_context_menu_current_file) { entropy_event_stat_request(_entropy_etk_context_menu_current_file, _entropy_etk_context_menu_current_instance); } @@ -219,21 +215,11 @@ } -void entropy_etk_context_menu_stat_cb_register( - void (*cb)(void*, entropy_generic_file*), void* data) { - - - entropy_etk_context_menu_stat_cb = cb; - entropy_etk_context_menu_stat_cb_data = data; - -} - void entropy_etk_context_menu_popup(entropy_gui_component_instance* instance, entropy_generic_file* current_file) { _entropy_etk_context_menu_current_file = current_file; _entropy_etk_context_menu_current_instance = instance; - entropy_etk_context_menu_stat_cb = NULL; if (!_entropy_etk_context_menu) entropy_etk_context_menu_init(); =================================================================== RCS file: /cvs/e/e17/proto/entropy/src/dialogs/etk_properties_dialog.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- etk_properties_dialog.c 17 Apr 2006 02:48:21 -0000 1.8 +++ etk_properties_dialog.c 19 Apr 2006 06:38:21 -0000 1.9 @@ -128,6 +128,9 @@ etk_box_pack_start(ETK_BOX(hbox), label, ETK_TRUE, ETK_TRUE, 0); /*------------------*/ + /**/ + + /*Permissions*/ ivbox = etk_vbox_new(ETK_FALSE,0); etk_notebook_page_append(ETK_NOTEBOOK(notebook), "Permissions", ivbox); @@ -196,12 +199,14 @@ button = etk_button_new_with_label("OK"); etk_box_pack_start(ETK_BOX(hbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_signal_connect("pressed", ETK_OBJECT(button), ETK_CALLBACK(_etk_window_deleted_cb), dialog); button = etk_button_new_with_label("Apply"); etk_box_pack_start(ETK_BOX(hbox), button, ETK_FALSE, ETK_FALSE, 0); button = etk_button_new_with_label("Cancel"); etk_box_pack_start(ETK_BOX(hbox), button, ETK_FALSE, ETK_FALSE, 0); + etk_signal_connect("pressed", ETK_OBJECT(button), ETK_CALLBACK(_etk_window_deleted_cb), dialog); if (perms) entropy_free(perms); ------------------------------------------------------- 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