Call int() for zoom level messages
This commit is contained in:
parent
3c2d568a2e
commit
ed5bea6e3f
@ -849,7 +849,7 @@ class CommandDispatcher:
|
|||||||
perc = tab.zoom.offset(count)
|
perc = tab.zoom.offset(count)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise cmdexc.CommandError(e)
|
raise cmdexc.CommandError(e)
|
||||||
message.info("Zoom level: {}%".format(perc), replace=True)
|
message.info("Zoom level: {}%".format(int(perc)), replace=True)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||||
@cmdutils.argument('count', count=True)
|
@cmdutils.argument('count', count=True)
|
||||||
@ -864,7 +864,7 @@ class CommandDispatcher:
|
|||||||
perc = tab.zoom.offset(-count)
|
perc = tab.zoom.offset(-count)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise cmdexc.CommandError(e)
|
raise cmdexc.CommandError(e)
|
||||||
message.info("Zoom level: {}%".format(perc), replace=True)
|
message.info("Zoom level: {}%".format(int(perc)), replace=True)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||||
@cmdutils.argument('count', count=True)
|
@cmdutils.argument('count', count=True)
|
||||||
@ -895,7 +895,7 @@ class CommandDispatcher:
|
|||||||
tab.zoom.set_factor(float(level) / 100)
|
tab.zoom.set_factor(float(level) / 100)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise cmdexc.CommandError("Can't zoom {}%!".format(level))
|
raise cmdexc.CommandError("Can't zoom {}%!".format(level))
|
||||||
message.info("Zoom level: {}%".format(level), replace=True)
|
message.info("Zoom level: {}%".format(int(level)), replace=True)
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window')
|
@cmdutils.register(instance='command-dispatcher', scope='window')
|
||||||
def tab_only(self, prev=False, next_=False, force=False):
|
def tab_only(self, prev=False, next_=False, force=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user