From dba1bff12ea430ce47bb25656ac51cffeccd6e72 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sun, 11 Nov 2012 20:27:55 +0000 Subject: [PATCH] handle the 0 copied files case... but... no thana - dont change the return value. it WAITS for efreet to be happy and give an update event. this event doesnt come and thats currently some efreet bug. SVN revision: 79120 --- src/modules/wizard/page_000.c | 4 ++++ src/modules/wizard/page_040.c | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/modules/wizard/page_000.c b/src/modules/wizard/page_000.c index 17b29f465..a688ae22e 100644 --- a/src/modules/wizard/page_000.c +++ b/src/modules/wizard/page_000.c @@ -17,6 +17,8 @@ wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__) { if (_update_handler) ecore_event_handler_del(_update_handler); _update_handler = NULL; + if (_next_timer) ecore_timer_del(_next_timer); + _next_timer = NULL; return 1; } @@ -34,6 +36,8 @@ _next_page(void *data __UNUSED__) static Eina_Bool _cb_desktops_update(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__) { + if (_update_handler) ecore_event_handler_del(_update_handler); + _update_handler = NULL; if (_next_timer) ecore_timer_del(_next_timer); _next_timer = ecore_timer_add(2.0, _next_page, NULL); return ECORE_CALLBACK_PASS_ON; diff --git a/src/modules/wizard/page_040.c b/src/modules/wizard/page_040.c index 220df5340..71e7ff03b 100644 --- a/src/modules/wizard/page_040.c +++ b/src/modules/wizard/page_040.c @@ -16,6 +16,8 @@ wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__) { if (_update_handler) ecore_event_handler_del(_update_handler); _update_handler = NULL; + if (_next_timer) ecore_timer_del(_next_timer); + _next_timer = NULL; return 1; } @@ -33,6 +35,8 @@ _next_page(void *data __UNUSED__) static Eina_Bool _cb_desktops_update(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__) { + if (_update_handler) ecore_event_handler_del(_update_handler); + _update_handler = NULL; if (_next_timer) ecore_timer_del(_next_timer); _next_timer = ecore_timer_add(1.0, _next_page, NULL); return ECORE_CALLBACK_PASS_ON; @@ -44,7 +48,7 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) Eina_List *extra_desks, *desks; Efreet_Desktop *desk, *extra_desk; char buf[PATH_MAX], *file; - int found; + int found, copies = 0; e_wizard_title_set(_("Adding missing App files")); e_wizard_button_next_enable_set(0); @@ -110,13 +114,22 @@ wizard_page_show(E_Wizard_Page *pg __UNUSED__) "%s/applications/%s", efreet_data_home_get(), file); ecore_file_cp(buf, abuf); + copies++; } } efreet_desktop_free(extra_desk); } free(file); } - return 0; /* 1 == show ui, and wait for user, 0 == just continue */ + if (copies == 0) + { + if (_next_timer) ecore_timer_del(_next_timer); + _next_timer = NULL; + if (_update_handler) ecore_event_handler_del(_update_handler); + _update_handler = NULL; + return 0; /* we didnt copy anything so advance anyway */ + } + return 1; /* 1 == show ui, and wait for user, 0 == just continue */ } EAPI int