discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=627050e55fcf03efc8232dab726aed4a57dad8af

commit 627050e55fcf03efc8232dab726aed4a57dad8af
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Sun Sep 6 22:11:27 2015 -0400

    break out dbus popup of doom into separate function for reuse
---
 src/bin/empc.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index fce1738..dc538fb 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -118,6 +118,22 @@ static void filesystem_next(void *data, Evas_Object *obj, 
void *event_info);
 static void filesystem_prev(void);
 static Evas_Object *filesystem_new(const char *uri);
 
+static void
+error_o_doom(void)
+{
+   Evas_Object *o;
+
+   o = elm_popup_add(win);
+   elm_object_text_set(o, _("<b>THIS IS THE ANGRY ERROR MESSAGE!<br/>"
+                            "DBUS </b>.service<b> INSTALLATION FAILED.<br/>"
+                            "FIX YOUR INSTALL OR START '</b>empdd<b>' 
MANUALLY.<br/>"
+                            "<br/>"
+                            "RESTART EMPC WHEN YOU HAVE FIXED THIS.<br/>"
+                            "<br/>"
+                            "PS. CAPS LOCK IS FUN FOR DEVELOPERS!"));
+   evas_object_show(o);
+}
+
 static inline unsigned char
 bg_next_get(void)
 {
@@ -1950,17 +1966,7 @@ empc_isconnected(Eldbus_Proxy *proxy EINA_UNUSED, void 
*data EINA_UNUSED, Eldbus
 {
    if (error && error->error && error->error[0])
      {
-        Evas_Object *o;
-
-        o = elm_popup_add(win);
-        elm_object_text_set(o, _("<b>THIS IS THE ANGRY ERROR MESSAGE!<br/>"
-                                 "DBUS </b>.service<b> INSTALLATION 
FAILED.<br/>"
-                                 "FIX YOUR INSTALL OR START '</b>empdd<b>' 
MANUALLY.<br/>"
-                                 "<br/>"
-                                 "RESTART EMPC WHEN YOU HAVE FIXED THIS.<br/>"
-                                 "<br/>"
-                                 "PS. CAPS LOCK IS FUN FOR DEVELOPERS!"));
-        evas_object_show(o);
+        error_o_doom();
         return;
      }
    if (connected)

-- 


Reply via email to