devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d36166f4af85fb600d0d3ef37c3342ad912b8072

commit d36166f4af85fb600d0d3ef37c3342ad912b8072
Author: kabeer khan <kabeer.k...@samsung.com>
Date:   Fri Nov 7 08:34:00 2014 -0500

    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.k...@samsung.com>
    
    Reviewers: zmike, devilhorns
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D1648
---
 src/bin/e_startup.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_startup.c b/src/bin/e_startup.c
index d03cc61..645d068 100644
--- a/src/bin/e_startup.c
+++ b/src/bin/e_startup.c
@@ -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);

-- 


Reply via email to