diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/YalpClients/EflClient/main.py | 57 | ||||
| -rw-r--r-- | src/YalpClients/EflClient/medialist.py | 55 |
2 files changed, 72 insertions, 40 deletions
diff --git a/src/YalpClients/EflClient/main.py b/src/YalpClients/EflClient/main.py index 4837129..a7050b8 100755 --- a/src/YalpClients/EflClient/main.py +++ b/src/YalpClients/EflClient/main.py @@ -9,18 +9,28 @@ import emotion import evas import elementary +import searchframe +import medialist + +#import globals + # Handle options and create output window + 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(win.canvas, file=edje_file, group = "yalp") +m = medialist.Medias() +s = searchframe.Search() +""" def huhu(obj, str, x): print "guck guck" + def findbutton_clicked(obj, signal,source): print "Huhu"; - +""" def fill_playlist(obj, str, x): playlist = elementary.List(win); playlist.size_hint_weight_set(1.0, 1.0) @@ -38,43 +48,15 @@ def fill_playlist(obj, str, x): playlist.go() box1.show() -def fill_medialist(): - items = [("huhu", fill_playlist), - ("haha", fill_playlist), - ("hoho", fill_playlist), - ("hehe", fill_playlist), - ("hihi", fill_playlist), - ("12345", huhu), - ("abcde", huhu), - ("fghij", huhu), - ("klmno", huhu), - ("pqrst", huhu), - ("uvwxyz", 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("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() - box0.show() - def paint_buttons(): + """ addbutton = elementary.Button(win) addbutton.label_set("Add to Playlist") c.part_swallow("medialist_buttonframe", addbutton) addbutton.show() - + """ + + m.add_button(win, c) playbutton = elementary.Button(win) playbutton.label_set("Play") c.part_swallow("playlist_buttonframe", playbutton) @@ -94,19 +76,14 @@ def play_video(): vid.play = True def gui(): - #elementary.init() - #win = elementary.Window("Yalp", elementary.ELM_WIN_BASIC) global win global c win.title_set("YALP") - #edje_file = os.path.join(os.path.dirname(sys.argv[0]),"yalp_gui.edj") - #c = edje.Edje(win.canvas, file=edje_file, group = "yalp") - c.signal_callback_add("mouse,clicked,1","findbutton",findbutton_clicked) - + c.signal_callback_add("mouse,clicked,1","findbutton", s.findbutton_clicked) paint_buttons() - fill_medialist() + m.fill_medialist(win, c) #play_video() c.show() diff --git a/src/YalpClients/EflClient/medialist.py b/src/YalpClients/EflClient/medialist.py new file mode 100644 index 0000000..e4b29c6 --- /dev/null +++ b/src/YalpClients/EflClient/medialist.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +import edje +import ecore.evas +import sys +import os +import ecore +import emotion +import evas +import elementary + +#import globals + +class Medias(): + def _init_(self): + pass + + def huhu(obj, str, x): + print "guck guck" + + def fill_medialist(self, win, c): + items = [("huhu", self.huhu), + ("haha", self.huhu), + ("hoho", self.huhu), + ("hehe", self.huhu), + ("hihi", self.huhu), + ("12345", self.huhu), + ("abcde", self.huhu), + ("fghij", self.huhu), + ("klmno", self.huhu), + ("pqrst", self.huhu), + ("uvwxyz", self.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("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() + box0.show() + + def add_button(self, win, c): + addbutton = elementary.Button(win) + addbutton.label_set("Add to Playlist") + c.part_swallow("medialist_buttonframe", addbutton) + addbutton.show() + |
