From d03ceac79fd26ab8184f821b3e4ce1079c899dda Mon Sep 17 00:00:00 2001 From: Alex K <73014273+alexkdeveloper@users.noreply.github.com> Date: Sat, 23 Mar 2024 17:27:46 +0800 Subject: [PATCH] Add files via upload --- com.github.alexkdeveloper.desktop-files-creator.json | 2 +- ...ub.alexkdeveloper.desktop-files-creator.appdata.xml.in | 7 +++++++ src/window.vala | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/com.github.alexkdeveloper.desktop-files-creator.json b/com.github.alexkdeveloper.desktop-files-creator.json index 5d6c253..3af5b3e 100644 --- a/com.github.alexkdeveloper.desktop-files-creator.json +++ b/com.github.alexkdeveloper.desktop-files-creator.json @@ -1,7 +1,7 @@ { "app-id" : "com.github.alexkdeveloper.desktop-files-creator", "runtime" : "org.gnome.Platform", - "runtime-version" : "45", + "runtime-version" : "46", "sdk" : "org.gnome.Sdk", "command" : "desktop-files-creator", "finish-args" : [ diff --git a/data/com.github.alexkdeveloper.desktop-files-creator.appdata.xml.in b/data/com.github.alexkdeveloper.desktop-files-creator.appdata.xml.in index d1dff00..e26b99f 100644 --- a/data/com.github.alexkdeveloper.desktop-files-creator.appdata.xml.in +++ b/data/com.github.alexkdeveloper.desktop-files-creator.appdata.xml.in @@ -44,6 +44,13 @@ com.github.alexkdeveloper.desktop-files-creator.desktop + + +
    +
  • Updated to GNOME Platform version 46
  • +
+
+
    diff --git a/src/window.vala b/src/window.vala index 25c466e..d2d55f8 100644 --- a/src/window.vala +++ b/src/window.vala @@ -188,13 +188,13 @@ namespace DesktopFilesCreator { entry_name.grab_focus(); return; } - var dialog_create_desktop_file = new Adw.MessageDialog(this, _("Create file %s?").printf(file.get_basename()), ""); + var dialog_create_desktop_file = new Adw.AlertDialog(_("Create file %s?").printf(file.get_basename()), ""); dialog_create_desktop_file.add_response("cancel", _("_Cancel")); dialog_create_desktop_file.add_response("ok", _("_OK")); dialog_create_desktop_file.set_default_response("ok"); dialog_create_desktop_file.set_close_response("cancel"); dialog_create_desktop_file.set_response_appearance("ok", SUGGESTED); - dialog_create_desktop_file.show(); + dialog_create_desktop_file.present(this); dialog_create_desktop_file.response.connect((response) => { if (response == "ok") { create_desktop_file(); @@ -250,14 +250,14 @@ Categories="+entry_categories.get_text().strip(); } private void alert (string heading, string body){ - var dialog_alert = new Adw.MessageDialog(this, heading, body); + var dialog_alert = new Adw.AlertDialog(heading, body); if (body != "") { dialog_alert.set_body(body); } dialog_alert.add_response("ok", _("_OK")); dialog_alert.set_response_appearance("ok", SUGGESTED); dialog_alert.response.connect((_) => { dialog_alert.close(); }); - dialog_alert.show(); + dialog_alert.present(this); } } }