Changes

Line 110: Line 110:  
= Code Snippets =
 
= Code Snippets =
   −
== Gtk.Style.fg_gc ==
+
== Gtk.TextBuffer =
   −
  gc = self.get_style().fg_gc[Gtk.StateType.NORMAL]
+
  self.lessonbuffer = gtk.TextBuffer(self.tagtable)
 +
self.lessontext = gtk.TextView(self.lessonbuffer)
    
replaced by:
 
replaced by:
   −
  gc = self.get_style().fg[Gtk.StateType.NORMAL]
+
  self.lessonbuffer = Gtk.TextBuffer.new(self.tagtable)
 +
self.lessontext = Gtk.TextView.new_with_buffer(self.lessonbuffer)
 +
 
 +
== Gdk.Event ==
    +
event.state
   −
== Gtk.DrawingArea ==
+
replaced by:
   −
  self.layout = self.create_pango_layout('')
+
  event.get_state()
self.layout.set_text(self.title_original)
     −
replaced by:
+
== Rsvg ==
   −
  self.layout = self.create_pango_layout('')
+
  import rsvg
  self.layout.set_text(self.title_original, len(self.title_original)
+
  image = rsvg.Handle(file=filename)
   −
----
+
replaced by:
   −
  self.lessonbuffer = Gtk.TextBuffer.new(self.tagtable)
+
  from gi.repository import Rsvg
  self.lessontext = Gtk.TextView.new_with_buffer(self.lessonbuffer)
+
  image = Rsvg.Handle.new_from_file(filename)
    
= Gtk.TextTag =
 
= Gtk.TextTag =
266

edits