Skip to content

Commit

Permalink
feat: use Gtk.UriLauncher instead of Process
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirusha committed Aug 17, 2024
1 parent 03ff77e commit 70721cb
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/application.vala
Original file line number Diff line number Diff line change
Expand Up @@ -438,30 +438,15 @@ namespace Cassette {
}

void on_open_account_action () {
try {
Process.spawn_command_line_async ("xdg-open https://id.yandex.ru/");

} catch (SpawnError e) {
Logger.warning (_("Error while opening uri: %s").printf (e.message));
}
new Gtk.UriLauncher ("https://id.yandex.ru/").launch.begin (null, null);
}

void on_open_plus_action () {
try {
Process.spawn_command_line_async ("xdg-open https://plus.yandex.ru/");

} catch (SpawnError e) {
Logger.warning (_("Error while opening uri: %s").printf (e.message));
}
new Gtk.UriLauncher ("https://plus.yandex.ru/").launch.begin (null, null);
}

void on_get_plus_action () {
try {
Process.spawn_command_line_async ("xdg-open https://plus.yandex.ru/getplus");

} catch (SpawnError e) {
Logger.warning (_("Error while opening uri: %s").printf (e.message));
}
new Gtk.UriLauncher ("https://plus.yandex.ru/getplus/").launch.begin (null, null);
}

void on_mute_action () {
Expand Down

0 comments on commit 70721cb

Please sign in to comment.