From 65f425941d094d989ccd4d93ee153b1b0fa8d2d0 Mon Sep 17 00:00:00 2001 From: Nik Volkov Date: Thu, 17 Dec 2015 13:05:24 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=BE=20=D1=81=D0=B8=D0=BC=D0=BC=D0=B5=D1=82?= =?UTF-8?q?=D1=80=D0=B8=D1=87=D0=BD=D0=BE=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D1=80=D0=B0=20=D0=B8=D0=B7=D0=BC=D0=B5=D1=80=D0=B8=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=20(issue=209)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rackman.py | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/rackman.py b/rackman.py index 789a188..ff28fbf 100644 --- a/rackman.py +++ b/rackman.py @@ -17,7 +17,7 @@ -__version__ = '1.9.0' +__version__ = '1.10.0' @@ -26,7 +26,7 @@ def initial(): - config = {} # lint:ok + config = {} conf_file_name = "rackman.conf" conf_path_curdir = os.path.join('./', conf_file_name) @@ -399,22 +399,37 @@ def resizing(self, widget, event): acc = config['fast_mode_speed'] if event.state & gtk.gdk.CONTROL_MASK: - if event.hardware_keycode == 114: # right + if event.hardware_keycode == 114: # right ox += acc - elif event.hardware_keycode == 116: # down + elif event.hardware_keycode == 116: # down oy += acc - elif event.hardware_keycode == 113: # left + elif event.hardware_keycode == 113: # left ox -= acc - elif event.hardware_keycode == 111: # up + elif event.hardware_keycode == 111: # up oy -= acc + elif event.state & gtk.gdk.MOD1_MASK: # ~ alt + if event.hardware_keycode == 114: # right + ox -= acc + x += acc*2 + elif event.hardware_keycode == 116: # down + oy -= acc + y += acc*2 + elif event.hardware_keycode == 113: # left + if x > acc*2: + ox += acc + x -= acc*2 + elif event.hardware_keycode == 111: # up + if y > acc*2: + oy += acc + y -= acc*2 else: - if event.hardware_keycode == 114: # right + if event.hardware_keycode == 114: # right x += acc - elif event.hardware_keycode == 116: # down + elif event.hardware_keycode == 116: # down y += acc - elif event.hardware_keycode == 113: # left + elif event.hardware_keycode == 113: # left x -= acc - elif event.hardware_keycode == 111: # up + elif event.hardware_keycode == 111: # up y -= acc self.window.move(ox, oy)