summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2015-05-04 08:38:27 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2015-05-04 08:38:27 +0300
commit94779d1640981bca3af79bd6ff5cd77edd138567 (patch)
treefc5600b61992f2487b36ed7ea7e8d8354241109b
parent59b2e1ee598d6c412dc496dd96e0bb529c4dd88f (diff)
Examples: Fixed ecore_x and dbus examples
-rwxr-xr-xexamples/dbus/test_dbus_spy.py18
-rw-r--r--examples/ecore/x/mplayer_embed.py4
-rw-r--r--examples/ecore/x/window_creation.py2
3 files changed, 13 insertions, 11 deletions
diff --git a/examples/dbus/test_dbus_spy.py b/examples/dbus/test_dbus_spy.py
index fb7fff2..f89b7b8 100755
--- a/examples/dbus/test_dbus_spy.py
+++ b/examples/dbus/test_dbus_spy.py
@@ -20,7 +20,9 @@ from efl.elementary.label import Label
20from efl.elementary.panes import Panes 20from efl.elementary.panes import Panes
21from efl.elementary.popup import Popup 21from efl.elementary.popup import Popup
22from efl.elementary.separator import Separator 22from efl.elementary.separator import Separator
23from efl.elementary.genlist import Genlist, GenlistItem, GenlistItemClass 23from efl.elementary.genlist import Genlist, GenlistItemClass, \
24 ELM_GENLIST_ITEM_GROUP, ELM_GENLIST_ITEM_TREE, \
25 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY
24from efl.dbus_mainloop import DBusEcoreMainLoop 26from efl.dbus_mainloop import DBusEcoreMainLoop
25 27
26 28
@@ -253,12 +255,12 @@ class NamesList(Genlist):
253 255
254 # add private & public group items 256 # add private & public group items
255 self.public_group = self.item_append(self.itc_g, "Public Services", 257 self.public_group = self.item_append(self.itc_g, "Public Services",
256 flags=elm.ELM_GENLIST_ITEM_GROUP) 258 flags=ELM_GENLIST_ITEM_GROUP)
257 self.public_group.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 259 self.public_group.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
258 260
259 self.private_group = self.item_append(self.itc_g, "Private Services", 261 self.private_group = self.item_append(self.itc_g, "Private Services",
260 flags=elm.ELM_GENLIST_ITEM_GROUP) 262 flags=ELM_GENLIST_ITEM_GROUP)
261 self.private_group.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 263 self.private_group.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
262 264
263 # populate the genlist 265 # populate the genlist
264 self.populate() 266 self.populate()
@@ -361,8 +363,8 @@ class DetailList(Genlist):
361 # objects 363 # objects
362 for obj in recursive_introspect(bus, name, '/'): 364 for obj in recursive_introspect(bus, name, '/'):
363 obj_item = self.item_append(self.itc_g, obj, 365 obj_item = self.item_append(self.itc_g, obj,
364 flags=elm.ELM_GENLIST_ITEM_GROUP) 366 flags=ELM_GENLIST_ITEM_GROUP)
365 obj_item.select_mode_set(elm.ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY) 367 obj_item.select_mode_set(ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY)
366 368
367 # interfaces 369 # interfaces
368 for iface in obj.interfaces: 370 for iface in obj.interfaces:
@@ -371,7 +373,7 @@ class DetailList(Genlist):
371 continue 373 continue
372 iface_item = self.item_append(self.itc, iface, 374 iface_item = self.item_append(self.itc, iface,
373 parent_item=obj_item, 375 parent_item=obj_item,
374 flags=elm.ELM_GENLIST_ITEM_TREE) 376 flags=ELM_GENLIST_ITEM_TREE)
375 377
376 def sort_cb(self, it1, it2): 378 def sort_cb(self, it1, it2):
377 pri1 = pri2 = 0 379 pri1 = pri2 = 0
diff --git a/examples/ecore/x/mplayer_embed.py b/examples/ecore/x/mplayer_embed.py
index e1a62af..6586ad1 100644
--- a/examples/ecore/x/mplayer_embed.py
+++ b/examples/ecore/x/mplayer_embed.py
@@ -2,7 +2,7 @@
2 2
3import sys 3import sys
4import efl.ecore 4import efl.ecore
5from efl.ecore.x import Window, on_window_configure_add 5from efl.ecore_x import Window, on_window_configure_add
6from subprocess import Popen, PIPE 6from subprocess import Popen, PIPE
7 7
8 8
@@ -39,5 +39,5 @@ def on_configure(event, main_window, sub_window):
39on_window_configure_add(on_configure, main_window, sub_window) 39on_window_configure_add(on_configure, main_window, sub_window)
40 40
41efl.ecore.fd_handler_add( 41efl.ecore.fd_handler_add(
42 p.stdout, efl.ecore.ECORE_FD_ALL, handle_read, p.stdout) 42 p.stdout, efl.ecore_x.ECORE_FD_ALL, handle_read, p.stdout)
43efl.ecore.main_loop_begin() 43efl.ecore.main_loop_begin()
diff --git a/examples/ecore/x/window_creation.py b/examples/ecore/x/window_creation.py
index f8275bb..5dc2268 100644
--- a/examples/ecore/x/window_creation.py
+++ b/examples/ecore/x/window_creation.py
@@ -1,7 +1,7 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3import efl.ecore 3import efl.ecore
4from efl.ecore.x import Window, on_window_configure_add 4from efl.ecore_x import Window, on_window_configure_add
5 5
6 6
7# method 1 7# method 1