summaryrefslogtreecommitdiff
path: root/src/YalpClients/EflClient/searchframe.py
blob: 574315a6e41fa641eb786af1db6562afe161b301 (plain)
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
#!/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()
		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...")
		self.c.part_swallow("find_buttonframe", findbutton)
		findbutton.show()

	def searchfield(self):
		global textfield
		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)
		textfield.editable_set(True)
		textfield.show()