(self, widget, event)
Handle button presses on a Pane
Handle button presses on a Pane
Handle button presses on a Pane
def on_button_press(self, widget, event):
        """Handle button presses on a Pane"""
        if event.button == 1 and event.type == Gdk.EventType._2BUTTON_PRESS:
            if event.get_state() & Gdk.ModifierType.MOD4_MASK == Gdk.ModifierType.MOD4_MASK:
                recurse_up=True
            else:
                recurse_up=False
            
            if event.get_state() & Gdk.ModifierType.SHIFT_MASK == Gdk.ModifierType.SHIFT_MASK:
                recurse_down=True
            else:
                recurse_down=False

            self.last_balance_time = time.time()
            self.last_balance_args = (recurse_up, recurse_down)
            return True
        else:
            return False
def on_button_press ( self , widget , event ) : if event . button == 1 and event . type == Gdk . EventType . _2BUTTON_PRESS : if event . get_state ( ) & Gdk . ModifierType . MOD4_MASK == Gdk . ModifierType . MOD4_MASK : recurse_up = True else : recurse_up = False if event . get_state ( ) & Gdk . ModifierType . SHIFT_MASK == Gdk . ModifierType . SHIFT_MASK : recurse_down = True else : recurse_down = False self . last_balance_time = time . time ( ) self . last_balance_args = ( recurse_up , recurse_down ) return True else : return False