diff options
author | IvaDobreva <iva95dobreva@gmail.com> | 2013-01-13 19:38:17 (GMT) |
---|---|---|
committer | IvaDobreva <iva95dobreva@gmail.com> | 2013-01-13 19:38:17 (GMT) |
commit | 428bbeba7afd8604a21744321924eb6ec35c3e9f (patch) | |
tree | d6b1ba4053c5885526522c2afc559eb6534fed25 | |
parent | ca21feee3193e89105a17ec2307aa5eaab26a9a2 (diff) |
drawing
-rw-r--r-- | activity.py | 4 | ||||
-rw-r--r-- | activity.py~ | 10 | ||||
-rw-r--r-- | eye.py | 2 | ||||
-rw-r--r-- | eye.py~ | 1 | ||||
-rw-r--r-- | mouth.py | 2 | ||||
-rw-r--r-- | mouth.py~ | 1 |
6 files changed, 11 insertions, 9 deletions
diff --git a/activity.py b/activity.py index 8f4654d..c4a4a12 100644 --- a/activity.py +++ b/activity.py @@ -87,7 +87,7 @@ class SpeakActivity(SharedActivity): self.face.show() # layout the screen - box = Gtk.Vbox(False, 0) + box = Gtk.VBox(False, 0) box.set_size_request(Gdk.Screen.width(), Gdk.Screen.height()) box.add(self.face) box.add(self.entrycombo) @@ -105,7 +105,7 @@ class SpeakActivity(SharedActivity): self.notebook.props.show_tabs=False box.show_all() - self.notebook.append_page(box) + self.notebook.append_page(box, None) """ self.chat = chat.View() self.chat.show_all() diff --git a/activity.py~ b/activity.py~ index 39b0660..225cc3c 100644 --- a/activity.py~ +++ b/activity.py~ @@ -74,20 +74,20 @@ class SpeakActivity(SharedActivity): self.connect("notify::active", self._activeCb) # make a box to type into - self.entrycombo = Gtk.combo_box_entry_new_text() + self.entrycombo = Gtk.ComboBoxText() self.entrycombo.connect("changed", self._combo_changed_cb) self.entry = self.entrycombo.get_child() - self.entry.set_editable(True) - self.entry.connect('activate', self._entry_activate_cb) + # self.entry.set_editable(True) + # self.entry.connect('activate', self._entry_activate_cb) self.entry.connect("key-press-event", self._entry_key_press_cb) - self.input_font = Pango.FontDescription(str='sans bold 24') + self.input_font = Pango.FontDescription('sans bold 24') self.entry.modify_font(self.input_font) self.face = face.View() self.face.show() # layout the screen - box = Gtk.Vbox(False, 0) + box = Gtk.VBox(False, 0) box.set_size_request(Gdk.Screen.width(), Gdk.Screen.height()) box.add(self.face) box.add(self.entrycombo) @@ -31,7 +31,7 @@ import math class Eye(Gtk.DrawingArea): def __init__(self, fill_color): GObject.GObject.__init__(self) - self.connect("expose_event", self.expose) + self.connect("draw", self.expose) self.frame = 0 self.blink = False self.x, self.y = 0, 0 @@ -23,6 +23,7 @@ import gi from gi.repository import Gtk +from gi.repository import GObject from gi.repository import Gdk import math @@ -34,7 +34,7 @@ class Mouth(Gtk.DrawingArea): def __init__(self, audioSource, fill_color): GObject.GObject.__init__(self) - self.connect("expose_event", self.expose) + self.connect("draw", self.expose) self.buffers = [] self.buffer_size = 256 self.main_buffers = [] @@ -24,6 +24,7 @@ # This code is a super-stripped down version of the waveform view from Measure from gi.repository import Gtk +from gi.repository import GObject import cairo from struct import unpack import numpy.core |