-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
public class Tuba.Feedback { | ||
public static string sound_theme { get; private set; } | ||
|
||
static construct { | ||
var settings = new GLib.Settings ("org.gnome.desktop.sound"); | ||
sound_theme = settings.get_string ("theme-name"); | ||
} | ||
|
||
public static void trigger_event (string event_name, int timeout = -1) { | ||
if (!Lfb.is_initted () || timeout == 0) return; | ||
|
||
var event = new Lfb.Event (event_name) { | ||
timeout = timeout | ||
}; | ||
event.trigger_feedback_async.begin (null, (obj, res) => { | ||
try { | ||
event.trigger_feedback_async.end (res); | ||
} catch (GLib.Error e) { | ||
warning (@"Error triggering $event_name: $(e.message)"); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters