Changed the event, deleted the ui and add the Rename event.

main
jgrizou 12 years ago
parent 516f8231ab
commit ac8ab54aae

@ -3,8 +3,6 @@ from .. import color
from ..configs import config from ..configs import config
from .helpers import add_references_argument, parse_references from .helpers import add_references_argument, parse_references
from ..events import RemoveEvent
def parser(subparsers): def parser(subparsers):
parser = subparsers.add_parser('remove', help='removes a paper') parser = subparsers.add_parser('remove', help='removes a paper')
@ -29,7 +27,4 @@ def command(args):
sure = ui.input_yn(question=are_you_sure, default='n') sure = ui.input_yn(question=are_you_sure, default='n')
if force or sure: if force or sure:
for c in citekeys: for c in citekeys:
rmevent = RemoveEvent(ui, c)
rmevent.send()
rp.remove_paper(c) rp.remove_paper(c)

@ -28,6 +28,11 @@ class Event(object):
class RemoveEvent(Event): class RemoveEvent(Event):
def __init__(self, ui, citekey): def __init__(self, citekey):
self.ui = ui
self.citekey = citekey self.citekey = citekey
class RenameEvent(Event):
def __init__(self, old_citekey, new_citekey):
self.old_citekey = old_citekey
self.new_citekey = new_citekey

Loading…
Cancel
Save