Show a confirmation when adding bookmarks.
This commit is contained in:
parent
3b747d91d2
commit
d3d999e041
@ -1049,10 +1049,14 @@ class CommandDispatcher:
|
|||||||
def bookmark_add(self):
|
def bookmark_add(self):
|
||||||
"""Save the current page as a bookmark."""
|
"""Save the current page as a bookmark."""
|
||||||
bookmark_manager = objreg.get('bookmark-manager')
|
bookmark_manager = objreg.get('bookmark-manager')
|
||||||
|
url = self._current_url()
|
||||||
try:
|
try:
|
||||||
bookmark_manager.add(self._current_url(), self._current_title())
|
bookmark_manager.add(url, self._current_title())
|
||||||
except urlmarks.Error as e:
|
except urlmarks.Error as e:
|
||||||
raise cmdexc.CommandError(str(e))
|
raise cmdexc.CommandError(str(e))
|
||||||
|
else:
|
||||||
|
message.info(self._win_id,
|
||||||
|
"Bookmarked {}!".format(url.toDisplayString()))
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window',
|
@cmdutils.register(instance='command-dispatcher', scope='window',
|
||||||
maxsplit=0,
|
maxsplit=0,
|
||||||
|
Loading…
Reference in New Issue
Block a user