Skip to content

Commit

Permalink
Use Budgie Control Center if present
Browse files Browse the repository at this point in the history
  • Loading branch information
samlane-ma committed Mar 3, 2022
1 parent 3f6d8b8 commit e2e95b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/analogue-clock-applet.vala
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,18 @@ namespace AnalogueClock {

private void on_date_activate() {
this.popover.hide();
var app_info = new DesktopAppInfo("gnome-datetime-panel.desktop");
string desktop_file = "gnome-datetime-panel.desktop";
if (Environment.find_program_in_path("budgie-control-center") != null) {
desktop_file = "budgie-datetime-panel.desktop";
}
var app_info = new DesktopAppInfo(desktop_file);
if (app_info == null) {
return;
}
try {
app_info.launch(null, null);
} catch (Error e) {
message("Unable to launch gnome-datetime-panel.desktop: %s", e.message);
message("Unable to launch %s: %s", desktop_file, e.message);
}
}

Expand Down

0 comments on commit e2e95b1

Please sign in to comment.