Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/infoslicer/widgets/Format_Pane.py
blob: ef8c2f555cda5ad7ed28b803bbfbd06938dc007e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Copyright (C) IBM Corporation 2008 
import pygtk
pygtk.require('2.0')
import gtk
from gettext import gettext as _

from Editing_View import Editing_View

class Format_Pane(Editing_View):
    """
    Created by Jonathan Mace
    
    See __init__.py for overview of panes.
    
    The Format Pane shows only the current edit article.
    Users can apply formatting such as bold, underline etc.
    Formatting has currently not been implemented.  Dummy buttons are on the toolbar.
    """
    
    def __init__(self):
        Editing_View.__init__(self)
        self.toolitems = []
        
        """
        self.combocontainer = gtk.ToolItem()
        self.combocontainer.add(self.combobox)
        self.toolbar.insert(self.combocontainer, -1)
        self.combocontainer.show()
        
        self.boldbutton = gtk.ToolButton(gtk.STOCK_BOLD)
        self.boldbutton.set_expand(False)
        self.toolbar.insert(self.boldbutton, -1)
        self.boldbutton.show()
        
        self.italicbutton = gtk.ToolButton(gtk.STOCK_ITALIC)
        self.italicbutton.set_expand(False)
        self.toolbar.insert(self.italicbutton, -1)
        self.italicbutton.show()
        
        self.underlinebutton = gtk.ToolButton(gtk.STOCK_UNDERLINE)
        self.underlinebutton.set_expand(False)
        self.toolbar.insert(self.underlinebutton, -1)
        self.underlinebutton.show()
        """

    def set_source_article(self, article):
        self.source = article
        
    def set_working_article(self, article):
        self.articletitle.set_markup(
                "<span size='medium'><b> %s </b>  %s</span>" % \
                (_("Article:"), article.article_title))
        if self.textbox.get_article() != article:
            self.textbox.set_article(article)