Skip to content

Commit

Permalink
Update Quick Add command
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Dec 8, 2023
1 parent 0282668 commit f6e7b9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-aux/io.github.alainm23.planify.Devel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"runtime" : "org.gnome.Platform",
"runtime-version": "45",
"sdk" : "org.gnome.Sdk",
"command" : "io.github.alainm23.planify",
"command" : "io.github.alainm23.planify.Devel",
"tags" : [
"devel"
],
Expand Down
6 changes: 3 additions & 3 deletions src/Dialogs/Preferences/PreferencesWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/

public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow {
private string QUICK_ADD_COMMAND = "flatpak run --command=io.github.alainm23.planify.quick-add io.github.alainm23.planify";
private string QUICK_ADD_COMMAND = "flatpak run --command=io.github.alainm23.planify.quick-add %s";

public PreferencesWindow () {
Object (
Expand Down Expand Up @@ -855,7 +855,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow {

var command_entry = new Adw.ActionRow ();
command_entry.add_suffix (copy_button);
command_entry.title = QUICK_ADD_COMMAND;
command_entry.title = QUICK_ADD_COMMAND.printf (Constants.APPLICATION_ID);
command_entry.add_css_class ("small-label");
command_entry.add_css_class ("monospace");

Expand Down Expand Up @@ -888,7 +888,7 @@ public class Dialogs.Preferences.PreferencesWindow : Adw.PreferencesWindow {

copy_button.clicked.connect (() => {
Gdk.Clipboard clipboard = Gdk.Display.get_default ().get_clipboard ();
clipboard.set_text (QUICK_ADD_COMMAND);
clipboard.set_text (QUICK_ADD_COMMAND.printf (Constants.APPLICATION_ID));
add_toast (Util.get_default ().create_toast (_("The command was copied to the clipboard.")));
});

Expand Down

0 comments on commit f6e7b9c

Please sign in to comment.