[dots] Set always the buffer according to ASCII/Braille option
- From: Fernando Herrera de las Heras <fherrera src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dots] Set always the buffer according to ASCII/Braille option
- Date: Wed, 1 Dec 2010 21:33:49 +0000 (UTC)
commit 4e4b1bb279409ff800965e9dee632e555224f0e8
Author: Fernando Herrera <fherrera onirica com>
Date: Wed Dec 1 21:21:43 2010 +0100
Set always the buffer according to ASCII/Braille option
dots/app_window.py | 5 +++++
dots/dots_project.py | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/dots/app_window.py b/dots/app_window.py
index 65090e6..4ac9535 100644
--- a/dots/app_window.py
+++ b/dots/app_window.py
@@ -361,6 +361,11 @@ class AppWindow(object):
if self.project is not None:
del self.project
self.project = DotsProject(document, _("Unsaved Document"), self.main_xml.get_object("textview1"))
+ ascii_radio = self.main_xml.get_object("ascii_radio")
+ if ascii_radio.get_active():
+ self.project.view_ascii()
+ else:
+ self.project.view_braille()
self.window.set_title(os.path.basename(document.input_file) + " - dots")
self.project.connect("line-changed", self._onLineChanged)
diff --git a/dots/dots_project.py b/dots/dots_project.py
index 4ca0814..5e2fc62 100644
--- a/dots/dots_project.py
+++ b/dots/dots_project.py
@@ -29,7 +29,7 @@ class DotsProject(gobject.GObject):
self.view.set_sensitive(True)
#self.view.modify_font(pango.FontDescription('Mono'))
self.view.connect_after("move-cursor", self._onMoved)
- self.buffer = self.view.get_buffer()
+ self.buffer = gtk.TextBuffer()
self.braille_buffer = gtk.TextBuffer()
self.document = document
self.out_file = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]