Ejemplo n.º 1
0
	def initialize_artwork_page(self, artlist):
		def on_artwork_clicked (item):
			def callback (widget, event):
				self.prepare_artwork_page_and_go(item)
			return callback

		label = gtk.Label()
		label.set_markup(gui_helper.markup(22, "Please select a topic"))
		self.buildScrolledList(
			self.wTree.get_widget("artwork_eventbox"),
			label,
			artlist,
			on_artwork_clicked)
Ejemplo n.º 2
0
	def listen_selections_text (self, category, artwork, visitors, artists, curators, educators):
		contributors = []
		if visitors: contributors.append("Visitors")
		if artists: contributors.append("Artists")
		if curators: contributors.append("Curators")
		if educators: contributors.append("Educators/Experts")
		if len(contributors) == 4: contributors = ["All contributors"]
		if len(contributors) == 0: contributors = ["No contributors"]
		
		str = ",".join(contributors) + " talking about "
		if artwork: str += "<b>" + artwork["artist_name"] + ":</b> <i>" + artwork["name"] + "</i>"
		else: str += "<b>" + category["name"] + "</b>"

		return gui_helper.markup(16, str)
Ejemplo n.º 3
0
	def initialize_question_page (self):
		def on_question_clicked (item):
			def callback (widget, event):
				self.current_question = item
				self.goto_record_page()
			return callback
		label = gtk.Label()
		label.set_markup(gui_helper.markup(22, "Please select a question"))
		questions = []
		for question in self.current_category["questions"]:
			if not self.current_artwork or (question["subcategoryid"] == self.current_artwork["id"]):
				questions.append(question)
		self.buildScrolledList(
			self.wTree.get_widget("question_eventbox"),
			label,
			questions,
			on_question_clicked)
Ejemplo n.º 4
0
	def goto_record_page (self):
		self.recordbtn.toggle_to(True, False)
		self.client_record.prepare_for_recording()
		self.wTree.get_widget("sub_notebook").set_current_page(RECORD_PAGE)
		self.wTree.get_widget("speak_selections_label").set_markup(
			gui_helper.markup(16, "<b>" + self.current_question["text"] + "</b>"))
Ejemplo n.º 5
0
	def report_number_of_voices(self, number):
		if number == 1: word = "recording matches"
		else: word = "recordings match"
		self.wTree.get_widget("number_of_voices_label").set_markup(
			gui_helper.markup(16, "<b>" + str(number) + "</b> " + word + \
			" your current selections."))