From: Manuel Bachmann Date: Thu, 29 Jan 2015 18:18:23 +0000 (+0100) Subject: Synchronize interactive installation popup timeouts X-Git-Tag: accepted/tizen/3.0.2014.q4/common/20150302.111434~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F34636%2F1;p=platform%2Fcore%2Fappfw%2Fslp-pkgmgr.git Synchronize interactive installation popup timeouts Installation confirmation job was waiting for 10 seconds, but the actual popup window could be shown infinitely, letting the user click without purpose. As notification-display-service now handles a "timeout" parameter, send it so the popup window gracefully disappears. Change-Id: I48b5073726c970caa5ed30e52c812ad7f350bf19 Signed-off-by: Manuel Bachmann --- diff --git a/server/src/pkgmgr-server.c b/server/src/pkgmgr-server.c index 5987b08..e931800 100644 --- a/server/src/pkgmgr-server.c +++ b/server/src/pkgmgr-server.c @@ -630,6 +630,7 @@ int create_popup(struct appdata *ad) char *button1_text = dgettext("sys_string", "IDS_COM_SK_YES"); char *button2_text = dgettext("sys_string", "IDS_COM_SK_NO"); */ + char *timeout_text = "10"; char *button1_text = "Yes"; char *button2_text = "No"; char *buttons_text = malloc(strlen(button1_text) + @@ -638,7 +639,7 @@ int create_popup(struct appdata *ad) strcat(buttons_text, ","); strcat(buttons_text, button2_text); - bundle_add (b, "timeout", "0"); + bundle_add (b, "timeout", timeout_text); bundle_add (b, "noresize", "1"); bundle_add (b, "buttons", buttons_text); @@ -668,7 +669,7 @@ int create_popup(struct appdata *ad) /* Catch user response */ int button; - err = notification_wait_response (noti, 10, &button, NULL); + err = notification_wait_response (noti, atoi(timeout_text), &button, NULL); if (err != NOTIFICATION_ERROR_NONE) { DBG("Failed to wait for user response, defaulting to 'no'\n"); button = 2;