1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/usr/bin/env python
import edje
import ecore.evas
import sys
import os
import ecore
import emotion
import evas
import elementary
import client
class Search(object):
def __init__(self, win, c):
self.win = win
self.c = c
self.searchfield()
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()
co = client.Corba(self.win, self.c)
co.corba_search(searchentry)
def add_button(self):
findbutton = elementary.Button(self.win)
findbutton.label_set("Find...")
self.c.part_swallow("find_buttonframe", findbutton)
findbutton.show()
def searchfield(self):
global textfield
searchframe = elementary.Frame(self.win)
textfield = elementary.Entry(self.win)
textfield.single_line_set(True)
textfield.entry_set("")
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()
|