# Path: plugins/examples/Bookmark2/signals.py
# class Signals(SignalManager):
#     toggle         = Signal()
#     remove_all     = Signal(1)
#     show           = Signal()
#     hide           = Signal()
#     add            = Signal(2)
#     remove         = Signal(2)
#     lines          = Signal(1)
#     bookmark_lines = Signal(1)
#     model_data     = Signal(1)
#     scroll_to_line = Signal(1)
#     updated_model  = Signal()


from gettext import gettext as _
from .signals import Signals


MESSAGE = _("Bookmarked lines")

class Feedback(object):
    def __init__(self, signals, editor):
        self.editor = editor
        signals.connect_signals(self)

    @Signals.add(after=True)
    def add(self, sender, line, feedback=None):
        if feedback:
            message = _("Marked line %d") % (line + 1)
            self.editor.update_message(message, "yes")
            
        return False


# Path: plugins/examples/Bookmark2/signals.py
# class Signals(SignalManager):
#     toggle         = Signal()
#     remove_all     = Signal(1)
#     show           = Signal()
#     hide           = Signal()
#     add            = Signal(2)
#     remove         = Signal(2)
#     lines          = Signal(1)
#     bookmark_lines = Signal(1)
#     model_data     = Signal(1)
#     scroll_to_line = Signal(1)
#     updated_model  = Signal()


# Path: plugins/examples/Bookmark2/Feedback.py
from gettext import gettext as _
from .signals import Signals



MESSAGE = _("Bookmarked lines")

class Feedback(object):
    def __init__(self, signals, editor):
        self.editor = editor
        signals.connect_signals(self)

    @Signals.add(after=True)
    def add(self, sender, line, feedback=None):
        if feedback:
            message = _("Marked line %d") % (line + 1)
            self.editor.update_message(message, "yes")
            
        return False


    @Signals.remove(after=True)