Ejemplo n.º 1
0
    def __init__(self, ui, savedmap_data):
        TrayButton.__init__(self)

        self.ui = ui
        self.data = savedmap_data

        img = self.get_img()
        self.set_icon_widget(img)

        self.setup_rollover_options()
Ejemplo n.º 2
0
    def __init__(self, buf, color, title, owner, hash, notes=None):
        TrayButton.__init__(self)

        self._fill, self._stroke = color.split(',')
        self.set_image(buf)

        self.hash = hash
        self.notes = notes
        info = title + '\n' + owner
        self.setup_rollover_options(info)
Ejemplo n.º 3
0
    def __init__(self, ui, savedmap_data):
        TrayButton.__init__(self)

        self.ui = ui
        self.data = savedmap_data

        img = self.get_img()
        self.set_icon_widget(img)

        self.setup_rollover_options()
Ejemplo n.º 4
0
    def __init__(self, buf, color, title, owner, hash):
        TrayButton.__init__(self)

        # Color read from the Journal may be Unicode, but Rsvg needs
        # it as single byte string:
        if isinstance(color, unicode):
            color = str(color)
        self.set_image(buf, color.split(',')[1], color.split(',')[0])

        self.hash = hash
        info = title + '\n' + owner
        self.setup_rollover_options(info)
Ejemplo n.º 5
0
    def __init__(self, buf, color, title, owner, page):
        TrayButton.__init__(self)

        # Color read from the Journal may be Unicode, but Rsvg needs
        # it as single byte string:
        if isinstance(color, unicode):
            color = str(color)
        if buf is not None:
            self.set_image(buf, color.split(',')[1], color.split(',')[0])
        else:
            self.set_empty_image(page, color.split(',')[1],
                                 color.split(',')[0])

        self.page = int(page)
        self.setup_rollover_options(title, owner)
Ejemplo n.º 6
0
    def __init__(self, buf, color, title, owner, page):
        TrayButton.__init__(self)

        # Color read from the Journal may be Unicode, but Rsvg needs
        # it as single byte string:
        if isinstance(color, unicode):
            color = str(color)
        if buf is not None:
            self.set_image(buf, color.split(',')[1], color.split(',')[0])
        else:
            self.set_empty_image(page,
                                 color.split(',')[1],
                                 color.split(',')[0])

        self.page = int(page)
        self.setup_rollover_options(title, owner)
Ejemplo n.º 7
0
    def __init__(self, buf, color, title, owner, page, local):
        TrayButton.__init__(self)

        # Color read from the Journal may be Unicode, but Rsvg needs
        # it as single byte string:
        self._color = color
        if isinstance(color, unicode):
            self._color = str(color)
        self._have_preview = False
        if buf is not None:
            self.set_image(buf)
        else:
            self.set_empty_image(page)

        self.page = int(page)
        self.setup_rollover_options(title, owner, local)
Ejemplo n.º 8
0
    def __init__(self, buf, color, title, owner, page, local):
        TrayButton.__init__(self)

        # Color read from the Journal may be Unicode, but Rsvg needs
        # it as single byte string:
        self._color = color
        if isinstance(color, unicode):
            self._color = str(color)
        self._have_preview = False
        if buf is not None:
            self.set_image(buf)
        else:
            self.set_empty_image(page)

        self.page = int(page)
        self.setup_rollover_options(title, owner, local)
Ejemplo n.º 9
0
    def __init__(self, recd):
        TrayButton.__init__(self)
        self._recd = recd

        self.set_icon_widget(self.get_image())
        self._copy_menu_item_handler = None

        palette = Palette(recd.title)
        self.set_palette(palette)

        self._box = PaletteMenuBox()
        palette.set_content(self._box)
        self._box.show()

        self._rem_menu_item = PaletteMenuItem(
            _('Erase'), icon_name='edit-delete')
        self._rem_menu_item_handler = self._rem_menu_item.connect(
            'activate', self._remove_clicked)
        self._box.append_item(self._rem_menu_item)
        self._rem_menu_item.show()

        self._add_copy_menu_item()
Ejemplo n.º 10
0
    def __init__(self, recd):
        TrayButton.__init__(self)
        self._recd = recd

        self.set_icon_widget(self.get_image())
        self._copy_menu_item_handler = None

        palette = Palette(recd.title)
        self.set_palette(palette)

        self._box = PaletteMenuBox()
        palette.set_content(self._box)
        self._box.show()

        self._rem_menu_item = PaletteMenuItem(_('Erase'),
                                              icon_name='edit-delete')
        self._rem_menu_item_handler = self._rem_menu_item.connect(
            'activate', self._remove_clicked)
        self._box.append_item(self._rem_menu_item)
        self._rem_menu_item.show()

        self._add_copy_menu_item()