diff options
Diffstat (limited to 'src/YalpClients')
| -rw-r--r-- | src/YalpClients/EflClient/media.py | 11 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/medialist.py | 14 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/playlist.py | 18 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/searchframe.py | 12 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/yalp_gui.edc | 23 |
5 files changed, 39 insertions, 39 deletions
diff --git a/src/YalpClients/EflClient/media.py b/src/YalpClients/EflClient/media.py index 4ab5448..692b27b 100644 --- a/src/YalpClients/EflClient/media.py +++ b/src/YalpClients/EflClient/media.py @@ -11,16 +11,12 @@ class Media(object): self.servercon = servercon self.win = win self.c = c - #self.c.signal_callback_add("hide_frames", "medialist",self.hide_frames) - + def callback(self, obj, str): songlist = [] songlist.append(self.result) ip = socket.gethostbyname(socket.gethostname()) - - #self.c.signal_callback_add("hide_frames", "medialist",self.hide_frames) - - + info = YalpInterfaces.AccessInfo("huhu", "huhu", "xine", "openmoko", YalpInterfaces.STREAM) stream = YalpInterfaces.Output(0, info, songlist, YalpInterfaces.CREATE, ip) @@ -28,9 +24,8 @@ class Media(object): stream.outputAction = YalpInterfaces.START ret = self.servercon.control(stream) print "stream.info:", stream.info - #video = playlist.Selection(self.win, self.c, vid, startstream) video = playlist.Selection(self.win, self.c, stream) - + video.add_button() #def hide_frames(self, obj, signal, source): #self.c.signal_emit("signal_from_python", "") diff --git a/src/YalpClients/EflClient/medialist.py b/src/YalpClients/EflClient/medialist.py index ac54a69..ff1a48b 100644 --- a/src/YalpClients/EflClient/medialist.py +++ b/src/YalpClients/EflClient/medialist.py @@ -13,26 +13,16 @@ class Medias(object): def __init__(self, win, c): self.win = win self.c = c - self.add_button() self.medialist = elementary.List(self.win); self.medialist.size_hint_weight_set(1.0, 1.0) self.medialist.size_hint_align_set(-1.0, -1.0) self.c.part_swallow("medialist", self.medialist) - # ???: - self.c.signal_callback_add("hide_frames", self.medialist.item,self.hide_frames) - + def add_media(self, media): self.medialist.item_append(media.result.name, None, None, media.callback) self.medialist.show() self.medialist.go() - - - def add_button(self): - addbutton = elementary.Button(self.win) - addbutton.label_set("Add to Playlist") - self.c.part_swallow("medialist_buttonframe", addbutton) - addbutton.show() - + def hide_frames(self, obj, signal, source): self.c.signal_emit("signal_from_python", "") diff --git a/src/YalpClients/EflClient/playlist.py b/src/YalpClients/EflClient/playlist.py index 242aa76..475b39e 100644 --- a/src/YalpClients/EflClient/playlist.py +++ b/src/YalpClients/EflClient/playlist.py @@ -15,13 +15,23 @@ class Selection(object): def __init__(self, win, c, stream): self.win = win self.c = c - self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer") + #self.vid = emotion.Emotion(win.canvas, module_filename="gstreamer") self.stream = stream + self.add_button() self.play_video () - + self.c.signal_callback_add("mouse,clicked,1", "medialist_buttonframe", self.huhu) + + def add_button(self): + addbutton = elementary.Button(self.win) + addbutton.label_set("Play") + self.c.part_swallow("medialist_buttonframe", addbutton) + addbutton.show() + + def huhu(self): + print "huhu" + def play_video(self): print self.stream - # ip = self.stream[0][0].destIp THIS CHRASHES!!! -> I know :-) ip = "127.0.0.1" port = 9993 print "stream from", ip, port @@ -29,4 +39,4 @@ class Selection(object): self.c.part_swallow("video", self.vid) self.vid.show() self.vid.play = True - + diff --git a/src/YalpClients/EflClient/searchframe.py b/src/YalpClients/EflClient/searchframe.py index 574315a..faa0799 100644 --- a/src/YalpClients/EflClient/searchframe.py +++ b/src/YalpClients/EflClient/searchframe.py @@ -19,13 +19,12 @@ class Search(object): self.add_button() c.signal_callback_add("mouse,clicked,1","find_buttonframe", self.findbutton_clicked) + def findbutton_clicked(self, obj, signal,source): searchentry = textfield.entry_get() - print searchentry co = client.Corba(self.win, self.c) co.corba_search(searchentry) - def add_button(self): findbutton = elementary.Button(self.win) findbutton.label_set("Find...") @@ -34,10 +33,15 @@ class Search(object): def searchfield(self): global textfield + searchframe = elementary.Frame(self.win) textfield = elementary.Entry(self.win) - #textfield.color(95,95,95,95) textfield.single_line_set(True) textfield.entry_set("Enter Title") - self.c.part_swallow("searcharea", textfield) + + self.c.part_swallow("searcharea", searchframe) textfield.editable_set(True) + textfield.color_set(50,50,50,50) + searchframe.content_set(textfield) + + searchframe.show() textfield.show() diff --git a/src/YalpClients/EflClient/yalp_gui.edc b/src/YalpClients/EflClient/yalp_gui.edc index 24c593f..70427af 100644 --- a/src/YalpClients/EflClient/yalp_gui.edc +++ b/src/YalpClients/EflClient/yalp_gui.edc @@ -108,7 +108,7 @@ collections } rel2 { - relative: 0.49 0.8; + relative: 1.0 1.0; offset: 0 0; } } @@ -169,7 +169,7 @@ collections } } } - /* + part { name: "medialist_buttonframe"; @@ -205,7 +205,7 @@ collections } } - */ + part { @@ -215,14 +215,14 @@ collections description { state: "default" 0.0; - color: 0 0 0 0; + color: 80 30 114 175; rel1 { - relative: 0.15 0.07; + relative: 0.15 0.1; } rel2 { - relative: 0.65 0.13; + relative: 0.5 0.13; } } @@ -232,22 +232,22 @@ collections color: 0 0 0 0; rel1 { - relative: 0.15 0.0; + relative: 0.15 -0.5; } rel2 { - relative: 0.65 0.0; + relative: 0.5 -0.5; } } } } programs { - /* + program { name: "hide_searchframe"; - source: "medialist"; + source: "medialist_buttonframe"; signal: "mouse,clicked,1"; action: STATE_SET "default" 1.0; target: "searchframe"; @@ -268,7 +268,7 @@ collections target: "searcharea"; transition:SINUSOIDAL 1; } - */ + /* program { name: "button_clicked_signal_program"; @@ -289,6 +289,7 @@ collections target: "medialist"; target: "searcharea"; } + */ } } } |
