########################################################################
#
#  Copyright (C) 2009, CZ.NIC, z.s.p.o.
# 
#  This file is part of dnstester.
#
#  dnstester is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  dnstester is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
########################################################################

import pygtk
pygtk.require("2.0")
import gtk, gobject
import lang


class LabelText(gtk.Label):

    def __init__(self, tag = '', padding = 10):
        gtk.Label.__init__(self)
        self.set_line_wrap(True)
        lang.bind(self, tag)
        self.set_size_request(560, -1)
        self.set_padding(padding, padding)
        self.set_alignment(0, 0)

    def set_text_tag(self, tag):
        self.set_text(lang.get_string(tag))
