Skip to content

Commit a2df146

Browse files
authored
Fix some warnings (#2570)
1 parent 162d718 commit a2df146

File tree

4 files changed

+3
-30
lines changed

4 files changed

+3
-30
lines changed

daemon/MonitorLabel.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
var provider = new Gtk.CssProvider ();
3232
try {
3333
provider.load_from_string (COLORED_STYLE_CSS.printf (title, info.background_color, info.text_color));
34-
get_style_context ().add_class (title);
35-
get_style_context ().add_class ("monitor-label");
34+
add_css_class (title);
35+
add_css_class ("monitor-label");
3636

3737
Gtk.StyleContext.add_provider_for_display (
3838
Gdk.Display.get_default (),

lib/Gestures/GestureSettings.vala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@ private class Gala.GestureSettings : Object {
3434
: touchpad_settings.get_boolean ("natural-scroll");
3535
}
3636

37-
public Meta.MotionDirection? get_direction (Gesture gesture) {
38-
switch (gesture.direction) {
39-
case GestureDirection.UP:
40-
return Meta.MotionDirection.UP;
41-
case GestureDirection.DOWN:
42-
return Meta.MotionDirection.DOWN;
43-
case GestureDirection.LEFT:
44-
return Meta.MotionDirection.LEFT;
45-
case GestureDirection.RIGHT:
46-
return Meta.MotionDirection.RIGHT;
47-
default:
48-
return null;
49-
}
50-
}
51-
5237
public Meta.MotionDirection? get_natural_scroll_direction (Gesture gesture) {
5338
bool natural_scroll = is_natural_scroll_enabled (gesture.performed_on_device_type);
5439

lib/Gestures/ScrollBackend.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private class Gala.ScrollBackend : Object, GestureBackend {
7373
// Scroll events apply the natural scroll preferences out of the box
7474
// Standardize them so the direction matches the physical direction of the gesture and the
7575
// GestureTracker user can decide if it wants to follow natural scroll settings or not
76-
bool natural_scroll = settings.is_natural_scroll_enabled (Clutter.InputDeviceType.TOUCHPAD_DEVICE);
76+
bool natural_scroll = GestureSettings.is_natural_scroll_enabled (Clutter.InputDeviceType.TOUCHPAD_DEVICE);
7777
if (natural_scroll) {
7878
x *= -1;
7979
y *= -1;

lib/Gestures/ToucheggBackend.vala

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,6 @@ private class Gala.ToucheggBackend : Object, GestureBackend {
150150
new Thread<void> (null, (owned) run);
151151
}
152152

153-
public void stop () {
154-
try {
155-
reconnection_attempts = MAX_RECONNECTION_ATTEMPTS;
156-
157-
if (!connection.closed) {
158-
connection.close_sync ();
159-
}
160-
} catch (Error e) {
161-
// Ignore this error, the process is being killed as this point
162-
}
163-
}
164-
165153
[CCode (instance_pos = -1)]
166154
private void on_new_message (DBusConnection connection, string? sender_name, string object_path,
167155
string interface_name, string signal_name, Variant parameters) {

0 commit comments

Comments
 (0)