Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/g/r/gramps-3.4.2/src/gui/widgets/styledtextbuffer.py   Gramps(Download)
#-------------------------------------------------------------------------
ALLOWED_STYLES = (
    StyledTextTagType.BOLD,
    StyledTextTagType.ITALIC,
    StyledTextTagType.UNDERLINE,
 
STYLE_TO_PROPERTY = {
    StyledTextTagType.BOLD: 'weight', # permanent tag is used instead
    StyledTextTagType.ITALIC: 'style', # permanent tag is used instead
    StyledTextTagType.UNDERLINE: 'underline', # permanent tag is used instead

src/g/r/gramps-3.4.2/src/gui/widgets/styledtexteditor.py   Gramps(Download)
</ui>
''' % (StyledTextTagType.ITALIC,
       StyledTextTagType.BOLD,
       StyledTextTagType.UNDERLINE,
       StyledTextTagType.FONTFACE,
            (str(StyledTextTagType.ITALIC), gtk.STOCK_ITALIC, None, None,
             _('Italic'), self._on_toggle_action_activate),
            (str(StyledTextTagType.BOLD), gtk.STOCK_BOLD, None, None,
             _('Bold'), self._on_toggle_action_activate),
            (str(StyledTextTagType.UNDERLINE), gtk.STOCK_UNDERLINE, None, None,
        self.action_accels = {
            '<Control>i': str(StyledTextTagType.ITALIC),
            '<Control>b': str(StyledTextTagType.BOLD),
            '<Control>u': str(StyledTextTagType.UNDERLINE),
        }

src/g/r/gramps-3.4.2/src/plugins/gramplet/WelcomeGramplet.py   Gramps(Download)
def boldst(text):
    """ Return text as bold styled text
    """
    tags = [StyledTextTag(StyledTextTagType.BOLD, True,
                            [(0, len(text))])]