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

This commit is contained in:
jgrizou 2013-07-05 17:36:57 +02:00
parent 516f8231ab
commit ac8ab54aae
2 changed files with 7 additions and 7 deletions

View File

@ -3,8 +3,6 @@ from .. import color
from ..configs import config
from .helpers import add_references_argument, parse_references
from ..events import RemoveEvent
def parser(subparsers):
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')
if force or sure:
for c in citekeys:
rmevent = RemoveEvent(ui, c)
rmevent.send()
rp.remove_paper(c)

View File

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