summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Traut <manut@vogone.traut>2009-12-30 20:27:42 +0100
committerManuel Traut <manut@vogone.traut>2009-12-30 20:27:42 +0100
commit81ccb90fb30cb07b2c6941ce52c20a5029037a2c (patch)
treede5d5d151887fc06cf4e37fed6b365fe32cd1538
parent30df095df63b3b101076f7ac64949b9f4d0481b3 (diff)
parent0933267609a286b96daeea91c8eee2a4f231f261 (diff)
Merge branch 'damba' of ssh://mecka.net/home/git/yalp into damba
-rw-r--r--log4j_auth_plugin.conf8
-rw-r--r--src/YalpClients/EflClient/corba_test.py40
-rwxr-xr-xsrc/YalpClients/EflClient/list.py6
-rw-r--r--src/YalpClients/EflClient/list_test.edc91
-rwxr-xr-xsrc/YalpClients/EflClient/list_test_elem.py54
-rwxr-xr-xsrc/YalpClients/EflClient/main.py86
-rw-r--r--src/YalpClients/EflClient/yalp_gui.edc46
7 files changed, 296 insertions, 35 deletions
diff --git a/log4j_auth_plugin.conf b/log4j_auth_plugin.conf
deleted file mode 100644
index 79c355b..0000000
--- a/log4j_auth_plugin.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-log4j.rootLogger=debug, stdout
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-
-# Pattern to output the caller's file name and line number.
-log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
-
diff --git a/src/YalpClients/EflClient/corba_test.py b/src/YalpClients/EflClient/corba_test.py
new file mode 100644
index 0000000..095062c
--- /dev/null
+++ b/src/YalpClients/EflClient/corba_test.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+import sys
+from omniORB import CORBA, PortableServer
+import Example
+import CosNaming, YalpInterfaces YalpInterfaces__POA
+
+orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
+poa = orb.resolve_initial_references("RootPOA")
+
+obj = orb.resolve_initial_references("NameService")
+root_context = obj._narrow(CosNaming.NamingContext)
+
+if root_context is None:
+ print "Failed to narrow the root naming context"
+ sys.exit(1)
+
+name = "YALP_Server"
+
+try:
+ yalp = root_context.resolve(name)
+ print "new aptd:apt object bound"
+
+except CosNaming.NamingContext.NotFound, ex:
+ print "Name not found"
+ sys.exit(1)
+
+if yalp is None:
+ print "Object reference is not an Example::Echo"
+ sys.exit(1)
+
+message = "Hello from Python"
+
+result = yalp.ping(err)
+
+poaManager = poa._get_the_POAManager()
+poaManager.activate()
+
+orb.run()
+
diff --git a/src/YalpClients/EflClient/list.py b/src/YalpClients/EflClient/list.py
index 2f9488a..e6bd6c3 100755
--- a/src/YalpClients/EflClient/list.py
+++ b/src/YalpClients/EflClient/list.py
@@ -9,7 +9,7 @@ import emotion
import elementary
import evas
-def huhu():
+def huhu(obj, it):
print "guck guck";
elementary.init();
@@ -36,9 +36,7 @@ li.show();
for item in items:
print item[0]
- li.item_append(item[0], None, None, huhu);
-
-li.item_append("blubb", None, None, huhu);
+ li.item_append(item[0], None, None, item[1]);
li.go();
diff --git a/src/YalpClients/EflClient/list_test.edc b/src/YalpClients/EflClient/list_test.edc
new file mode 100644
index 0000000..eb5762f
--- /dev/null
+++ b/src/YalpClients/EflClient/list_test.edc
@@ -0,0 +1,91 @@
+collections
+{
+ group
+ {
+ name: "huhu";
+ min: 800 600;
+ parts
+ {
+ part
+ {
+ name: "main";
+ type: RECT;
+ mouse_events: 0;
+ description
+ {
+ state: "default" 0.0;
+ rel1
+ {
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2
+ {
+ relative: 1.0 1.0;
+ offset: 0 0;
+ }
+ }
+ }
+ part
+ {
+ name: "list";
+ type: SWALLOW;
+ mouse_events: 1;
+ description
+ {
+ state: "default" 0.0;
+ color: 30 89 114 175;
+
+ rel1
+ {
+ relative: 0.0 0.2;
+ }
+ rel2
+ {
+ relative: 0.49 1.0;
+ }
+ }
+ }
+
+ part
+ {
+ name: "searchframe";
+ type: RECT;
+ mouse_events: 1;
+
+ description
+ {
+ state: "default" 0.0;
+ align: 0 0;
+ color: 30 89 114 175;
+
+ rel1
+ {
+ relative: 0.0 0.0;
+ offset: 0 0;
+
+ }
+ rel2
+ {
+ relative: 1.0 0.2;
+ offset: -1 -1;
+ }
+ }
+ description
+ {
+ state: "default" 1.0;
+ color: 0 0 0 0;
+ rel1
+ {
+ relative: 0.0 0.0;
+ offset: 0 0;
+ }
+ rel2
+ {
+ relative: 1.0 0.01;
+ offset: -1 -1;
+ }
+ }
+ }
+ }
+}
diff --git a/src/YalpClients/EflClient/list_test_elem.py b/src/YalpClients/EflClient/list_test_elem.py
new file mode 100755
index 0000000..74d5122
--- /dev/null
+++ b/src/YalpClients/EflClient/list_test_elem.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+import edje
+import ecore.evas
+import sys
+import os
+import ecore
+import emotion
+import evas
+import elementary
+
+#from omniORB import CORBA, PortableServer
+#import CosNaming, YalpInterfaces, YalpInterfaces__POA
+
+def huhu(obj, it, xyz):
+ print "guck guck"
+
+def gui():
+ elementary.init()
+ win = elementary.Window("test", elementary.ELM_WIN_BASIC)
+
+ edje_file = os.path.join(os.path.dirname(sys.argv[0]), "list_test.edj")
+ c = edje.Edje(win.canvas, file = edje_file, group = "huhu")
+
+ items = [("huhu", huhu),
+ ("haha", huhu),
+ ("hoho", huhu),
+ ("hehe", huhu),
+ ("hihi", huhu)]
+
+ medialist = elementary.List(win);
+ medialist.size_hint_weight_set(1.0, 1.0)
+ medialist.size_hint_align_set(-1.0, -1.0)
+
+ box0 = elementary.Box(win)
+ win.resize_object_add(box0)
+ c.part_swallow("list", medialist)
+
+ box0.pack_end(medialist)
+ medialist.show()
+
+ for item in items:
+ print item[0]
+ medialist.item_append(item[0], None, None, item[1])
+
+ medialist.go()
+
+ c.show()
+ win.resize(800, 600)
+ box0.show()
+ win.show()
+ elementary.run()
+
+gui()
diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py
index bd293b1..de731e9 100755
--- a/src/YalpClients/EflClient/main.py
+++ b/src/YalpClients/EflClient/main.py
@@ -7,11 +7,12 @@ import os
import ecore
import emotion
import evas
+import elementary
# Parse command line
-from optparse import OptionParser
+#from optparse import OptionParser
-usage = "usage: %prog [options]"
+"""usage = "usage: %prog [options]"
op = OptionParser(usage=usage)
op.add_option("-e", "--engine", type="choice", choices=("x11", "x11-16"),
default="x11-16",
@@ -21,9 +22,9 @@ op.add_option("-n", "--no-fullscreen", action="store_true",
op.add_option("-f", "--fps", type="int", default=20,
help="frames per second to use, default=%default")
-
+"""
# Handle options and create output window
-options, args = op.parse_args()
+"""options, args = op.parse_args()
if options.engine == "x11":
f = ecore.evas.SoftwareX11
elif options.engine == "x11-16":
@@ -32,26 +33,71 @@ elif options.engine == "x11-16":
else:
print "warning: x11-16 is not supported, fallback to x11"
f = ecore.evas.SoftwareX11
+"""
-ee = ecore.evas.SoftwareX11(w=800, h=600)
-edje.frametime_set(1.0 / options.fps)
+def huhu(obj, it, xy):
+ print "guck guck"
-edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj")
+def button_clicked(obj, signal,source):
+ print "Huhu";
+ c.signal_callback_add("mouse,clicked,1","findbutton",button_clicked)
-c = edje.Edje(ee.evas,file=edje_file,group="yalp")
-c.size = ee.evas.size
+def gui():
+ elementary.init()
+ win = elementary.Window("Yalp", elementary.ELM_WIN_BASIC)
+
+ edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj")
+ #c = edje.Edje(ee.evas,file=edje_file,group="yalp")
+ c = edje.Edje(win.canvas, file=edje_file, group = "yalp")
+ #c.size = ee.evas.size
+ #c.size = win.canvas.size
-vid = emotion.Emotion(ee.evas,module_filename="xine");
-vid.file_set("Lordi.mpg");
-c.part_swallow("video", vid)
+ items = [("huhu",huhu),
+ ("haha", huhu),
+ ("hoho", huhu),
+ ("hehe", huhu),
+ ("hihi", huhu),
+ ("12345", huhu),
+ ("abcde", huhu),
+ ("fghij", huhu),
+ ("klmno", huhu),
+ ("pqrst", huhu),
+ ("uvwxyz", huhu)]
-vid.show()
-vid.play = True
+ #ee = ecore.evas.SoftwareX11(w=800, h=600)
+ win.title_set("YALP")
+ #edje.frametime_set(1.0 / options.fps)
-def button_clicked(obj, signal,source):
- print "Huhu";
-c.signal_callback_add("mouse,clicked,1","findbutton",button_clicked)
+ medialist = elementary.List(win);
+ medialist.size_hint_weight_set(1.0, 1.0)
+ medialist.size_hint_align_set(-1.0, -1.0)
+
+ box0 = elementary.Box(win)
+ win.resize_object_add(box0)
+ c.part_swallow("medialist", medialist)
+
+ box0.pack_end(medialist)
+ medialist.show();
+
+ for item in items:
+ print item[0]
+ medialist.item_append(item[0], None, None, item[1]);
+
+ medialist.go();
+
+ vid = emotion.Emotion(win.canvas,module_filename="xine");
+ vid.file_set("/home/manut/Videos/2009-2.avi");
+
+ c.part_swallow("video", vid)
+
+ vid.show()
+ vid.play = True
+
+ c.show()
+ win.resize(800,600)
+ box0.show()
+ win.show()
+ #ecore.main_loop_begin();
+ elementary.run();
-c.show()
-ee.show()
-ecore.main_loop_begin();
+gui()
diff --git a/src/YalpClients/EflClient/yalp_gui.edc b/src/YalpClients/EflClient/yalp_gui.edc
index c16c618..2f20f66 100644
--- a/src/YalpClients/EflClient/yalp_gui.edc
+++ b/src/YalpClients/EflClient/yalp_gui.edc
@@ -3,6 +3,7 @@ collections
group
{
name: "yalp";
+ min: 800 600;
parts
{
part
@@ -90,7 +91,7 @@ collections
part
{
name: "medialist";
- type: RECT;
+ type: SWALLOW;
mouse_events: 1;
description
@@ -118,12 +119,12 @@ collections
rel1
{
- relative: 0.0 0.01;
+ relative: 0.0 0.0;
offset: 0 0;
}
rel2
{
- relative: 0.005 0.8;
+ relative: 0.0 0.8;
offset: 0 0;
}
}
@@ -318,6 +319,43 @@ collections
}
}
+ part
+ {
+ name: "buttontext_add";
+ type: TEXT;
+ mouse_events: 0;
+ description
+ {
+ color: 255 255 255 255;
+ rel1
+ {
+ relative: 0.17 0.86;
+ }
+ rel2
+ {
+ relative: 0.33 0.89 ;
+ }
+ text
+ {
+ text: "Add to Playlist";
+ font:"VeraBd.ttf";
+ size: 12;
+ }
+ }
+ description
+ {
+ state: "default" 1.0;
+ rel1
+ {
+ relative: 0.0 0.85;
+ }
+ rel2
+ {
+ relative: 0.0 0.9;
+ }
+ }
+ }
+
}
programs
{
@@ -333,6 +371,8 @@ collections
target: "medialist";
target: "playlist";
target: "add_button";
+ target: "controlframe";
+ target: "buttontext_add";
transition:SINUSOIDAL 1;
}
}