Skip to content

Commit ea5faba

Browse files
authored
Don't read orca prompt if already enabled (#716)
1 parent 37fdf66 commit ea5faba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/MainWindow.vala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,15 @@ public class Installer.MainWindow : Hdy.Window {
109109
});
110110

111111
var mediakeys_settings = new Settings ("org.gnome.settings-daemon.plugins.media-keys");
112+
var a11y_settings = new Settings ("org.gnome.desktop.a11y.applications");
112113

113114
orca_timeout_id = Timeout.add_seconds (10, () => {
115+
orca_timeout_id = 0;
116+
117+
if (a11y_settings.get_boolean ("screen-reader-enabled")) {
118+
return Source.REMOVE;
119+
}
120+
114121
var shortcut_string = Granite.accel_to_string (
115122
mediakeys_settings.get_strv ("screenreader")[0]
116123
);
@@ -126,7 +133,6 @@ public class Installer.MainWindow : Hdy.Window {
126133
critical ("Couldn't read Orca prompt: %s", e.message);
127134
}
128135

129-
orca_timeout_id = 0;
130136
return Source.REMOVE;
131137
});
132138
}

0 commit comments

Comments
 (0)