e_startup: Added dialog to notify user to fix his dbus setup

Summary:
Resolved TODO in e_startup, In case of dbus error added dialog
box to notify user to fix his dbus setup

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1648
This commit is contained in:
kabeer khan 2014-11-07 08:34:00 -05:00 committed by Chris Michael
parent 40cbdbc674
commit d36166f4af
1 changed files with 22 additions and 2 deletions

View File

@ -74,6 +74,23 @@ _e_startup_next_cb(void *data __UNUSED__)
_e_startup();
}
static void
_e_startup_error_dialog(const char *msg)
{
E_Dialog *dia;
dia = e_dialog_new(NULL, "E", "_startup_error_dialog");
EINA_SAFETY_ON_NULL_RETURN(dia);
e_dialog_title_set(dia, "ERROR!");
e_dialog_icon_set(dia, "enlightenment", 64);
e_dialog_text_set(dia, msg);
e_dialog_button_add(dia, _("Close"), NULL, NULL, NULL);
e_win_centered_set(dia->win, 1);
dia->win->state.no_remember = 1;
e_dialog_show(dia);
}
static Eina_Bool
_e_startup_event_cb(void *data, int ev_type __UNUSED__, void *ev)
{
@ -81,9 +98,12 @@ _e_startup_event_cb(void *data, int ev_type __UNUSED__, void *ev)
Efreet_Event_Cache_Update *e;
e = ev;
/* TODO: Tell user he should fix his dbus setup */
if ((e) && (e->error))
fprintf(stderr, "E: efreet couldn't build cache\n");
{
fprintf(stderr, "E: efreet couldn't build cache\n");
_e_startup_error_dialog("E: Efreet could not build cache. "
"Please check your DBus setup");
}
ecore_event_handler_del(desktop_cache_update_handler);
buf = data;
startup_apps = e_order_new(buf);