Пример #1
0
    def update_clock(self):
        default_message = GLib.markup_escape_text (settings.get_default_away_message(), -1)
        font_message = settings.get_message_font()

        if self.away_message and self.away_message != "":
            user_name = utils.get_user_display_name()
            markup = ('%s\n\n<b><span font_desc=\"Ubuntu 14\" foreground=\"#CCCCCC\">%s</span></b>' +\
                      '\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#ACACAC\">  ~ %s</span></b>') %\
                     (self.get_clock_string(), self.away_message, user_name)
        else:
            markup = '%s\n\n<b><span font_desc=\"%s\" foreground=\"#CCCCCC\">%s</span></b>' %\
                     (self.get_clock_string(), font_message, default_message)

        self.label.set_markup(markup)
        self.label.set_line_wrap(True)
        self.label.set_alignment(0.5, 0.5)
Пример #2
0
    def update_clock(self):
        default_message = GLib.markup_escape_text (settings.get_default_away_message(), -1)
        font_message = settings.get_message_font()

        if self.away_message and self.away_message != "":
            user_name = utils.get_user_display_name()
            markup = ('%s\n\n<b><span font_desc=\"Ubuntu 14\" foreground=\"#CCCCCC\">%s</span></b>' +\
                      '\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#ACACAC\">  ~ %s</span></b>') %\
                     (self.clock.get_clock(), self.away_message, user_name)
        else:
            markup = '%s\n\n<b><span font_desc=\"%s\" foreground=\"#CCCCCC\">%s</span></b>' %\
                     (self.clock.get_clock(), font_message, default_message)

        self.label.set_markup(markup)
        self.label.set_line_wrap(True)
        self.label.set_alignment(0.5, 0.5)
Пример #3
0
    def update_clock(self):
        default_message = GLib.markup_escape_text (settings.get_default_away_message(), -1)
        font_message = Pango.FontDescription.from_string(settings.get_message_font())

        if self.low_res:
            msg_size = font_message.get_size() * .66
            font_message.set_size(int(msg_size))

        if self.away_message and self.away_message != "":
            user_name = utils.get_user_display_name()
            markup = ('<b><span font_desc=\"Ubuntu 14\" foreground=\"#CCCCCC\">%s</span></b>' +\
                      '\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#ACACAC\">  ~ %s</span></b>\n ') %\
                     (self.away_message, user_name)
        else:
            markup = '<b><span font_desc=\"%s\" foreground=\"#CCCCCC\">%s</span></b>\n ' %\
                     (font_message.to_string(), default_message)

        self.label.set_markup(self.clock.get_clock())
        self.msg_label.set_markup(markup)
Пример #4
0
    def update_clock(self):
        default_message = GLib.markup_escape_text(
            settings.get_default_away_message(), -1)
        font_message = Pango.FontDescription.from_string(
            settings.get_message_font())

        if self.low_res:
            msg_size = font_message.get_size() * .66
            font_message.set_size(int(msg_size))

        if self.away_message and self.away_message != "":
            user_name = utils.get_user_display_name()
            markup = ('<b><span font_desc=\"Ubuntu 14\" foreground=\"#CCCCCC\">%s</span></b>' +\
                      '\n<b><span font_desc=\"Ubuntu 10\" foreground=\"#ACACAC\">  ~ %s</span></b>\n ') %\
                     (self.away_message, user_name)
        else:
            markup = '<b><span font_desc=\"%s\" foreground=\"#CCCCCC\">%s</span></b>\n ' %\
                     (font_message.to_string(), default_message)

        self.label.set_markup(self.clock.get_clock())
        self.msg_label.set_markup(markup)