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)
 
        for style in ALLOWED_STYLES:
            if StyledTextTagType.STYLE_TYPE[style] == bool:
                value = str(style) in tag_names
            else:
    def _apply_style_to_selection(self, style, value):
        # FIXME can this be unified?
        if StyledTextTagType.STYLE_TYPE[style] == bool:
            start, end = self._get_selection()
 
            if value:
                self.apply_tag_by_name(str(style), start, end)
            else:
                self.remove_tag_by_name(str(style), start, end)
        elif StyledTextTagType.STYLE_TYPE[style] == str:
            self._remove_style_from_selection(style)
            self._apply_tag_to_selection(tag)
        elif StyledTextTagType.STYLE_TYPE[style] == int:
            tag = self._find_tag_by_name(style, value)
            self._remove_style_from_selection(style)
 
        """
        if style not in StyledTextTagType.STYLE_TYPE:
            return None
        elif StyledTextTagType.STYLE_TYPE[style] == bool:

src/g/r/gramps-3.4.2/src/gui/widgets/styledtexteditor.py   Gramps(Download)
        except ValueError:
            _LOG.debug("unable to convert '%s' to '%s'" %
                       (text, StyledTextTagType.STYLE_TYPE[style]))
 
    def _format_clear_cb(self, action):