diff options
author | Manuel Quiñones <manuq@laptop.org> | 2012-09-20 02:21:17 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2012-09-20 12:44:45 (GMT) |
commit | e92baeeba033ae2fc4276ea088d6036e284dfd56 (patch) | |
tree | 16919bdd6b75d4b70a2955a36d558515e59a1e26 /src/jarabe | |
parent | 4d661c3fa5a6790a92c7b15efac422960ff77b63 (diff) |
Fix Speech device icon - SL #3931
- Port palette with mixed content to new API.
- pack_start: the convert script got confused here.
- Gtk.HScale API change: set adjustment with set_adjustment method,
not in the constructor.
- Gtk.Adjustment API change: use get_value method because value
property was removed.
- Gdk.Clipboard API changes: Gtk.Clipboard.get needs a GdkAtom [1] and
Gdk.SELECTION_PRIMARY is the one we need.
Gtk.Clipboard.request_text needs another argument user_data [2],
passing None seems to work, but maybe the annotations are wrong.
- fixed long lines and a few indentations
- fixed mispelled variable name 'adjustement' to 'adjustment'
- style: call show() after packing widgets, not before
[1] http://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-get
[2] http://developer.gnome.org/gtk3/stable/gtk3-Clipboards.html#gtk-clipboard-request-text
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'src/jarabe')
-rw-r--r-- | src/jarabe/model/speech.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jarabe/model/speech.py b/src/jarabe/model/speech.py index 864f639..d34237a 100644 --- a/src/jarabe/model/speech.py +++ b/src/jarabe/model/speech.py @@ -20,6 +20,7 @@ import logging from gi.repository import GConf from gi.repository import Gst from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import GObject @@ -96,8 +97,8 @@ class SpeechManager(GObject.GObject): self._player.speak(self._pitch, self._rate, self._voice_name, text) def say_selected_text(self): - clipboard = Gtk.clipboard_get(selection='PRIMARY') - clipboard.request_text(self.__primary_selection_cb) + clipboard = Gtk.Clipboard.get(Gdk.SELECTION_PRIMARY) + clipboard.request_text(self.__primary_selection_cb, None) def pause(self): self._player.pause_sound_device() |