2015-04-03 16:57:08 -06:00
|
|
|
# -*- coding: utf-8 -*-
|
2019-06-06 11:52:23 -05:00
|
|
|
from __future__ import unicode_literals
|
2015-04-03 16:57:08 -06:00
|
|
|
from gi.repository import Gtk
|
|
|
|
import widgetUtils
|
|
|
|
|
|
|
|
class soundsTutorialDialog(Gtk.Dialog):
|
2021-06-16 16:18:41 -05:00
|
|
|
def __init__(self, actions):
|
|
|
|
super(soundsTutorialDialog, self).__init__("Sounds tutorial", None, 0, (Gtk.STOCK_CANCEL, widgetUtils.CANCEL))
|
|
|
|
box = self.get_content_area()
|
|
|
|
label = Gtk.Label("Press enter for listen the sound")
|
|
|
|
self.list = widgetUtils.list("Action")
|
|
|
|
self.populate_actions(actions)
|
|
|
|
lBox = Gtk.Box(spacing=6)
|
|
|
|
lBox.add(label)
|
|
|
|
lBox.add(self.list.list)
|
|
|
|
box.add(lBox)
|
|
|
|
self.play = Gtk.Button("Play")
|
|
|
|
box.add(self.play)
|
|
|
|
self.show_all()
|
2015-04-03 16:57:08 -06:00
|
|
|
|
2021-06-16 16:18:41 -05:00
|
|
|
def populate_actions(self, actions):
|
|
|
|
for i in actions:
|
|
|
|
self.list.insert_item(i)
|
2015-04-03 16:57:08 -06:00
|
|
|
|
2021-06-16 16:18:41 -05:00
|
|
|
def get_selected(self):
|
|
|
|
return self.list.get_selected()
|