Skip to content

Commit

Permalink
Removing the install button from Vala in Workbench Extensions (#926)
Browse files Browse the repository at this point in the history
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.

#925
  • Loading branch information
Frogg1e authored Apr 3, 2024
1 parent 4c2944e commit 185dfe4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 43 deletions.
10 changes: 2 additions & 8 deletions src/Extensions/Extension.blp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
32 changes: 0 additions & 32 deletions src/Extensions/Extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export default GObject.registerClass(
"label_title",
"image_enabled",
"installation_guide",
"label_hint",
"label_command",
"button",
],
Properties: {
title: GObject.ParamSpec.string(
Expand All @@ -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",
"",
Expand All @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 0 additions & 3 deletions src/Extensions/Extensions.blp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
}

Expand Down

0 comments on commit 185dfe4

Please sign in to comment.