Index: econnman-bin.in
===================================================================
--- econnman-bin.in	(revision 81738)
+++ econnman-bin.in	(working copy)
@@ -7,18 +7,35 @@
 #  - Fix connman's PropertyChanged when changing off/manual -> dhcp,
 #    gateway is not updated.
 
-import elementary as elm
-import evas
-import e_dbus
-import ecore
-import edje
+from efl import elementary as elm
+from efl.elementary.scroller import Scroller
+from efl.elementary.box import Box
+from efl.elementary.check import Check
+from efl.elementary.button import Button
+from efl.elementary.label import Label
+from efl.elementary.progressbar import Progressbar
+from efl.elementary.frame import Frame
+from efl.elementary.entry import Entry
+from efl.elementary.window import Window
+from efl.elementary.background import Background
+from efl.elementary.naviframe import Naviframe
+from efl.elementary.genlist import Genlist, GenlistItemClass
+from efl.elementary.icon import Icon
+from efl.elementary.layout import Layout
+from efl.elementary.scroller import Scroller
+from efl.elementary.segment_control import SegmentControl
+from efl.elementary.popup import Popup
+from efl import evas
+from efl import edbus
+from efl import ecore
+from efl import edje
 import dbus
 import dbus.service
 import logging
 import argparse
 import os.path
 
-dbus_ml = e_dbus.DBusEcoreMainLoop()
+dbus_ml = edbus.DBusEcoreMainLoop()
 bus = dbus.SystemBus(mainloop=dbus_ml)
 log = logging.getLogger()
 
@@ -95,7 +112,7 @@
         self.sig_ch = self.bus_obj.connect_to_signal("PropertyChanged",
                                                      self.on_property_changed)
 
-        self.obj = elm.Scroller(parent)
+        self.obj = Scroller(parent)
         self.obj.on_del_add(self._deleted)
         self.obj.size_hint_weight = EXPAND_BOTH
         self.obj.policy_set(elm.ELM_SCROLLER_POLICY_OFF,
@@ -103,7 +120,7 @@
         self.obj.bounce_set(False, True)
         self.obj.content_min_limit(True, False)
 
-        self.box = elm.Box(self.obj)
+        self.box = Box(self.obj)
         self.box.size_hint_weight = EXPAND_HORIZ
         self.box.horizontal = False
 
@@ -128,7 +145,7 @@
         log.critical("must be implemented!")
 
     def add_check(self, box, label, callback=None):
-        obj = elm.Check(box)
+        obj = Check(box)
         obj.size_hint_weight = EXPAND_HORIZ
         obj.size_hint_align = FILL_BOTH
         obj.text = label
@@ -139,7 +156,7 @@
         return obj
 
     def add_button(self, box, label, callback):
-        obj = elm.Button(box)
+        obj = Button(box)
         obj.size_hint_weight = EXPAND_HORIZ
         obj.size_hint_align = FILL_BOTH
         obj.text = label
@@ -149,7 +166,7 @@
         return obj
 
     def add_label(self, box, label):
-        lb = elm.Label(box)
+        lb = Label(box)
         lb.size_hint_weight = EXPAND_HORIZ
         lb.size_hint_align = FILL_BOTH
         lb.text = label
@@ -158,7 +175,7 @@
         return lb
 
     def add_progress(self, box, label):
-        pb = elm.Progressbar(box)
+        pb = Progressbar(box)
         pb.size_hint_weight = EXPAND_HORIZ
         pb.size_hint_align = FILL_BOTH
         pb.text = label
@@ -167,7 +184,7 @@
         return pb
 
     def add_segment_control(self, box, options, callback):
-        sc = elm.SegmentControl(box)
+        sc = SegmentControl(box)
         sc.size_hint_weight = EXPAND_HORIZ
         sc.size_hint_align = FILL_BOTH
         items = {}
@@ -179,14 +196,14 @@
         return sc, items
 
     def add_frame_and_box(self, box, label):
-        fr = elm.Frame(box)
+        fr = Frame(box)
         fr.size_hint_weight = EXPAND_HORIZ
         fr.size_hint_align = FILL_BOTH
         fr.text = label
         fr.show()
         box.pack_end(fr)
 
-        bx = elm.Box(fr)
+        bx = Box(fr)
         bx.size_hint_weight = EXPAND_HORIZ
         bx.size_hint_align = FILL_BOTH
         bx.horizontal = False
@@ -197,7 +214,7 @@
     def add_label_and_entry(self, box, label, callback=None):
         lb = self.add_label(box, label)
 
-        en = elm.Entry(box)
+        en = Entry(box)
         en.size_hint_weight = EXPAND_HORIZ
         en.size_hint_align = FILL_BOTH
         en.single_line = True
@@ -218,7 +235,7 @@
     user to set the property remotely.
     """
     def __init__(self, win):
-        self.obj = elm.Check(win)
+        self.obj = Check(win)
         self.obj.style = "toggle"
         self.obj.part_text_set("on", "Offline")
         self.obj.part_text_set("off", "Online")
@@ -275,7 +292,7 @@
     def __init__(self, parent, on_selected=None):
         self.techs = {}
         self.items = {}
-        self.obj = elm.Genlist(parent)
+        self.obj = Genlist(parent)
         self.obj.on_del_add(self._deleted)
         self.on_selected = on_selected
         self.obj.callback_selected_add(self._tech_selected)
@@ -288,7 +305,7 @@
                                                   "net.connman.Technology",
                                                   "net.connman",
                                                   path_keyword='path')
-        self.itc = elm.GenlistItemClass(item_style="default",
+        self.itc = GenlistItemClass(item_style="default",
                                         text_get_func=self._item_text_get,
                                         content_get_func=self._item_content_get)
 
@@ -367,7 +384,7 @@
 
     def _item_content_get(self, obj, part, item_data):
         if part == "elm.swallow.end":
-            ic = elm.Icon(obj)
+            ic = Icon(obj)
             ic.standard = "arrow_right"
             return ic
 
@@ -377,7 +394,7 @@
         if not t:
             return None
 
-        ic = elm.Icon(obj)
+        ic = Icon(obj)
         if t.get("Connected", False):
             ic.standard = "connman-tech-connected"
         elif t.get("Powered", False):
@@ -509,7 +526,7 @@
     def __init__(self, parent, on_selected=None, on_disclosure=None):
         self.services = {}
         self.items = {}
-        self.obj = elm.Genlist(parent)
+        self.obj = Genlist(parent)
         self.on_selected = on_selected
         self.on_disclosure = on_disclosure
         self.obj.callback_selected_add(self._item_selected)
@@ -523,7 +540,7 @@
                                                   path_keyword='path')
         manager.GetServices(reply_handler=self._get_services_reply,
                             error_handler=self._get_services_error)
-        self.itc = elm.GenlistItemClass(item_style="default",
+        self.itc = GenlistItemClass(item_style="default",
                                         text_get_func=self._item_text_get,
                                         content_get_func=self._item_content_get)
 
@@ -642,35 +659,35 @@
                 security.remove("none")
 
         if part == "elm.swallow.end":
-            bx = elm.Box(obj)
+            bx = Box(obj)
             bx.horizontal = True
             bx.homogeneous = True
             bx.padding = (2, 0)
             bx.align = (1.0, 0.5)
 
             if connected:
-                ic = elm.Icon(obj)
+                ic = Icon(obj)
                 ic.standard = "connman-connected"
                 ic.size_hint_min = ic.size_hint_max = (32, 32)
                 ic.show()
                 bx.pack_end(ic)
 
             if security and favorite:
-                ic = elm.Icon(obj)
+                ic = Icon(obj)
                 ic.standard = "connman-security-favorite"
                 ic.size_hint_min = ic.size_hint_max = (32, 32)
                 ic.show()
                 bx.pack_end(ic)
             elif security:
-                ic = elm.Icon(obj)
+                ic = Icon(obj)
                 ic.standard = "connman-security"
                 ic.size_hint_min = ic.size_hint_max = (32, 32)
                 ic.show()
                 bx.pack_end(ic)
 
-            ic = elm.Icon(obj)
+            ic = Icon(obj)
             ic.standard = "arrow_right"
-            bt = elm.Button(obj)
+            bt = Button(obj)
             bt.content = ic
             bt.callback_clicked_add(self._item_disclosure, item_data)
             bt.propagate_events = False
@@ -683,7 +700,7 @@
         if part != "elm.swallow.icon":
             return
 
-        ly = elm.Layout(obj)
+        ly = Layout(obj)
         ly.theme_set("icon", type, "default")
         ly.size_hint_min_set(32, 32)
 
@@ -1332,25 +1349,25 @@
             on_done(response)
             w.delete()
 
-        self.dialog = w = elm.Window("econnman-agent", elm.ELM_WIN_DIALOG_BASIC)
+        self.dialog = w = Window("econnman-agent", elm.ELM_WIN_DIALOG_BASIC)
         w.title = "ConnMan Requested Input"
         w.icon_name = "econnman"
         w.autodel = True
         w.on_del_add(on_deleted)
         w.show()
 
-        bg = elm.Background(w)
+        bg = Background(w)
         bg.size_hint_weight = EXPAND_BOTH
         bg.show()
         w.resize_object_add(bg)
 
-        bx = elm.Box(w)
+        bx = Box(w)
         bx.size_hint_align = FILL_BOTH
         bx.horizontal = False
         bx.show()
         w.resize_object_add(bx)
 
-        lb = elm.Label(bx)
+        lb = Label(bx)
         lb.size_hint_weight = EXPAND_HORIZ
         lb.size_hint_align = FILL_BOTH
         lb.text = "<b>ConnMan needs your input</b>"
@@ -1359,7 +1376,7 @@
 
         name = self.serv_lst.service_name_get(path)
         if name:
-            lb = elm.Label(bx)
+            lb = Label(bx)
             lb.size_hint_weight = EXPAND_HORIZ
             lb.size_hint_align = FILL_BOTH
             lb.text = "Service: %s" % (name,)
@@ -1374,14 +1391,14 @@
                 decos += " (type: %s)" % (t,)
             if desc.get("Requirement") == "mandatory":
                 decos += " REQUIRED"
-            lb = elm.Label(bx)
+            lb = Label(bx)
             lb.size_hint_weight = EXPAND_HORIZ
             lb.size_hint_align = FILL_BOTH
             lb.text = "%s:%s" % (name, decos)
             lb.show()
             bx.pack_end(lb)
 
-            en = elm.Entry(bx)
+            en = Entry(bx)
             en.size_hint_weight = EXPAND_HORIZ
             en.size_hint_align = FILL_BOTH
             en.single_line = True
@@ -1392,7 +1409,7 @@
             bx.pack_end(en)
             widgets[name] = en
 
-        bt = elm.Button(bx)
+        bt = Button(bx)
         bt.size_hint_weight = EXPAND_HORIZ
         bt.size_hint_align = FILL_BOTH
         bt.callback_clicked_add(on_clicked)
@@ -1410,12 +1427,12 @@
     """
     win = obj.top_widget_get()
     log.critical("%s: %s", title, message)
-    pop = elm.Popup(win)
+    pop = Popup(win)
     pop.size_hint_weight = EXPAND_BOTH
     pop.part_text_set("title,text", title)
     pop.text = message
 
-    bt = elm.Button(win)
+    bt = Button(win)
     bt.text = "Quit"
     bt.callback_clicked_add(lambda bt: elm.exit())
     pop.part_content_set("button1", bt)
@@ -1427,12 +1444,12 @@
     """Shows a popup with an error message and a Close button."""
     win = obj.top_widget_get()
     log.error("%s: %s", title, message)
-    pop = elm.Popup(win)
+    pop = Popup(win)
     pop.size_hint_weight = EXPAND_BOTH
     pop.part_text_set("title,text", title)
     pop.text = message
 
-    bt = elm.Button(win)
+    bt = Button(win)
     bt.text = "Close"
     bt.callback_clicked_add(lambda bt: pop.delete())
     pop.part_content_set("button1", bt)
@@ -1459,14 +1476,14 @@
         if os.path.exists(td):
             elm.theme_extension_add(td)
 
-    win = elm.Window("econnman", elm.ELM_WIN_BASIC)
+    win = Window("econnman", elm.ELM_WIN_BASIC)
     win.title = "EConnMan"
     win.icon_name = "econnman"
     win.autodel = True
     win.size = (480, 700)
     win.show()
 
-    bg = elm.Background(win)
+    bg = Background(win)
     bg.size_hint_weight = EXPAND_BOTH
     bg.show()
     win.resize_object_add(bg)
@@ -1481,14 +1498,14 @@
         elm.shutdown()
         raise
 
-    nf = elm.Naviframe(win)
+    nf = Naviframe(win)
     nf.size_hint_weight = EXPAND_BOTH
     nf.show()
     win.resize_object_add(nf)
 
     offline_mon = OfflineModeMonitor(win)
 
-    techs = elm.Button(win)
+    techs = Button(win)
     techs.text = "Techs"
     techs.callback_clicked_add(show_techs, nf)
 
