Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/infoslicer/widgets/Edit_Pane.py
diff options
context:
space:
mode:
Diffstat (limited to 'infoslicer/widgets/Edit_Pane.py')
-rw-r--r--infoslicer/widgets/Edit_Pane.py38
1 files changed, 18 insertions, 20 deletions
diff --git a/infoslicer/widgets/Edit_Pane.py b/infoslicer/widgets/Edit_Pane.py
index d7ab056..8da2ad9 100644
--- a/infoslicer/widgets/Edit_Pane.py
+++ b/infoslicer/widgets/Edit_Pane.py
@@ -1,13 +1,11 @@
# Copyright (C) IBM Corporation 2008
-import gi
-gi.require_version('Gtk', '3.0')
-from gi.repository import Gtk
-from gi.repository import Gdk
-from gi.repository import GObject
+import pygtk
+pygtk.require('2.0')
+import gtk
import logging
from gettext import gettext as _
-from sugar3.graphics.toolcombobox import ToolComboBox
+from sugar.graphics.toolcombobox import ToolComboBox
from Reading_View import Reading_View
from Editing_View import Editing_View
@@ -15,7 +13,7 @@ from infoslicer.processing.Article import Article
logger = logging.getLogger('infoslicer')
-class Edit_Pane(Gtk.HBox):
+class Edit_Pane(gtk.HBox):
"""
Created by Jonathan Mace
@@ -32,23 +30,23 @@ class Edit_Pane(Gtk.HBox):
"""
def __init__(self):
- GObject.GObject.__init__(self)
+ gtk.HBox.__init__(self)
self.toolitems = []
- readarticle_box = Gtk.VBox()
+ readarticle_box = gtk.VBox()
readarticle_box.show()
- labeleb = Gtk.EventBox()
- labeleb.modify_bg(Gtk.StateType.NORMAL, Gdk.color_parse("#EEEEEE"))
+ labeleb = gtk.EventBox()
+ labeleb.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#EEEEEE"))
readarticle_box.pack_start(labeleb, False, False, 0)
labeleb.show()
- self.articletitle = Gtk.Label()
- self.articletitle.set_justify(Gtk.Justification.CENTER)
+ self.articletitle = gtk.Label()
+ self.articletitle.set_justify(gtk.JUSTIFY_CENTER)
labeleb.add(self.articletitle)
self.articletitle.show()
- vbox = Gtk.VBox()
+ vbox = gtk.VBox()
snap = ToolComboBox(label_text=_('Snap selection to:'))
snap.combo.append_item(0, _("Nothing"))
@@ -56,21 +54,21 @@ class Edit_Pane(Gtk.HBox):
snap.combo.append_item(2, _("Paragraphs"))
snap.combo.append_item(3, _("Sections"))
snap.combo.set_active(1)
- vbox.pack_start(snap, False, False, 0)
+ vbox.pack_start(snap, False)
"""
Create reading and editing panels
"""
self.readarticle = Reading_View()
- self.readarticle.set_size_request(Gdk.Screen.width()/2, -1)
+ self.readarticle.set_size_request(gtk.gdk.screen_width()/2, -1)
self.readarticle.show()
- readarticle_box.pack_start(self.readarticle, True, True, 0)
- vbox.pack_start(readarticle_box, True, True, 0)
+ readarticle_box.pack_start(self.readarticle)
+ vbox.pack_start(readarticle_box)
- self.pack_start(vbox, False, False, 0)
+ self.pack_start(vbox, False)
self.editarticle = Editing_View()
- self.pack_start(self.editarticle, True, True, 0)
+ self.pack_start(self.editarticle)
self.editarticle.show()
snap.combo.connect("changed", self.selection_mode_changed, None)