From 185dfe415adb8e5451d3e815b3b7ab1702ceeb2a Mon Sep 17 00:00:00 2001 From: Parker Cook <128870015+Frogg1e@users.noreply.github.com> Date: Tue, 2 Apr 2024 19:33:30 -0500 Subject: [PATCH] Removing the install button from Vala in Workbench Extensions (#926) I have been asked to delete the Install button for Vala in Workbenches extensions due to it having people install a different version of Vala than is needed. https://github.com/workbenchdev/Workbench/issues/925 --- src/Extensions/Extension.blp | 10 ++-------- src/Extensions/Extension.js | 32 -------------------------------- src/Extensions/Extensions.blp | 3 --- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/Extensions/Extension.blp b/src/Extensions/Extension.blp index 71b73d80a..2a64f0159 100644 --- a/src/Extensions/Extension.blp +++ b/src/Extensions/Extension.blp @@ -33,16 +33,10 @@ template $Extension: ListBoxRow { margin-bottom: 14; orientation: vertical; - Button button { - label: _("Install"); - visible: false; - halign: start; - margin-bottom: 12; - } - - Label label_hint { + Label { wrap: true; xalign: 0; + label: _("Run the following command"); styles [ "dim-label" diff --git a/src/Extensions/Extension.js b/src/Extensions/Extension.js index 60f337ecf..56730ea08 100644 --- a/src/Extensions/Extension.js +++ b/src/Extensions/Extension.js @@ -11,9 +11,7 @@ export default GObject.registerClass( "label_title", "image_enabled", "installation_guide", - "label_hint", "label_command", - "button", ], Properties: { title: GObject.ParamSpec.string( @@ -30,20 +28,6 @@ export default GObject.registerClass( GObject.ParamFlags.READWRITE, false, ), - uri: GObject.ParamSpec.string( - "uri", - "", - "", - GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT, - "", - ), - hint: GObject.ParamSpec.string( - "hint", - "", - "", - GObject.ParamFlags.READWRITE, - "", - ), command: GObject.ParamSpec.string( "command", "", @@ -57,15 +41,6 @@ export default GObject.registerClass( constructor(properties = {}) { super(properties); - if (properties.uri) { - this._button.visible = true; - this._button.connect("clicked", () => { - new Gtk.UriLauncher({ uri: properties.uri }) - .launch(this.get_root(), null) - .catch(console.error); - }); - } - this.bind_property( "title", this._label_title, @@ -87,13 +62,6 @@ export default GObject.registerClass( GObject.BindingFlags.SYNC_CREATE | GObject.BindingFlags.INVERT_BOOLEAN, ); - this.bind_property( - "hint", - this._label_hint, - "label", - GObject.BindingFlags.SYNC_CREATE, - ); - this.bind_property( "command", this._label_command, diff --git a/src/Extensions/Extensions.blp b/src/Extensions/Extensions.blp index 6517ffdcd..49bb366f0 100644 --- a/src/Extensions/Extensions.blp +++ b/src/Extensions/Extensions.blp @@ -53,15 +53,12 @@ Adw.Dialog dialog { $Extension extension_rust { title: _("Rust"); - hint: _("Run the following command"); command: "flatpak install flathub org.freedesktop.Sdk.Extension.rust-stable//23.08 org.freedesktop.Sdk.Extension.llvm16//23.08"; } $Extension extension_vala { title: _("Vala"); - hint: _("or run the following command"); command: "flatpak install flathub org.freedesktop.Sdk.Extension.vala//23.08"; - uri: "appstream://org.freedesktop.Sdk.Extension.vala"; } }