Skip to content

Commit 8cf10fa

Browse files
committed
Apply review suggestions
1 parent d469bfd commit 8cf10fa

File tree

3 files changed

+15
-20
lines changed

3 files changed

+15
-20
lines changed

lib/Gestures/Gesture.vala

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ namespace Gala {
4141
MULTITASKING_VIEW,
4242
ZOOM,
4343
CUSTOM,
44-
N_ACTIONS
45-
}
44+
N_ACTIONS;
4645

47-
public ModalActions gesture_action_to_modal_action (GestureAction gesture_action) {
48-
switch (gesture_action) {
49-
case SWITCH_WORKSPACE:
50-
return SWITCH_WORKSPACE;
51-
case SWITCH_WINDOWS:
52-
return SWITCH_WINDOWS;
53-
case MULTITASKING_VIEW:
54-
return MULTITASKING_VIEW;
55-
case ZOOM:
56-
return ZOOM;
57-
default:
58-
return NONE;
46+
public ModalActions to_modal_action () {
47+
switch (this) {
48+
case SWITCH_WORKSPACE:
49+
return ModalActions.SWITCH_WORKSPACE;
50+
case SWITCH_WINDOWS:
51+
return ModalActions.SWITCH_WINDOWS;
52+
case MULTITASKING_VIEW:
53+
return ModalActions.MULTITASKING_VIEW;
54+
case ZOOM:
55+
return ModalActions.ZOOM;
56+
default:
57+
return ModalActions.NONE;
58+
}
5959
}
6060
}
6161

lib/Gestures/GestureController.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public class Gala.GestureController : Object {
157157

158158
var recognized_action = GestureSettings.get_action (gesture, out _action_info);
159159
recognizing = (
160-
recognized_action == action && !wm.filter_action (gesture_action_to_modal_action (recognized_action)) ||
160+
recognized_action == action && !wm.filter_action (recognized_action.to_modal_action ()) ||
161161
backend == scroll_backend && recognized_action == NONE
162162
);
163163

lib/WindowManager.vala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ namespace Gala {
3838
MEDIA_KEYS
3939
}
4040

41-
/**
42-
* Function that should return true if the given shortcut should be blocked.
43-
*/
44-
public delegate bool KeybindingFilter (Meta.KeyBinding binding);
45-
4641
/**
4742
* A minimal class mostly used to identify your call to {@link WindowManager.push_modal} and used
4843
* to end your modal mode again with {@link WindowManager.pop_modal}

0 commit comments

Comments
 (0)