mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Allow description to be copied in properties dialog
This commit is contained in:
@@ -39,29 +39,31 @@ template $PropertiesWindow: Adw.Dialog {
|
||||
]
|
||||
}
|
||||
|
||||
Button {
|
||||
margin-top: 6;
|
||||
Label name {
|
||||
wrap: true;
|
||||
|
||||
styles [
|
||||
"title-1",
|
||||
"flat"
|
||||
"title-1"
|
||||
]
|
||||
|
||||
Label name {
|
||||
wrap: true;
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
sensitive: true;
|
||||
|
||||
Button description_button {
|
||||
styles [
|
||||
"title-4",
|
||||
"flat"
|
||||
]
|
||||
|
||||
Label description {
|
||||
wrap: true;
|
||||
Box {
|
||||
spacing: 12;
|
||||
|
||||
Label description {
|
||||
halign: start;
|
||||
wrap: true;
|
||||
hexpand: true;
|
||||
}
|
||||
Image {
|
||||
icon-name: "edit-copy-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,9 @@ class PropertiesWindow(Adw.Dialog):
|
||||
eol_app_banner = Gtk.Template.Child()
|
||||
eol_runtime_banner = Gtk.Template.Child()
|
||||
mask_banner = Gtk.Template.Child()
|
||||
description = Gtk.Template.Child()
|
||||
name = Gtk.Template.Child()
|
||||
description = Gtk.Template.Child()
|
||||
description_button = Gtk.Template.Child()
|
||||
|
||||
def copy_item(self, to_copy, to_toast=None):
|
||||
self.get_clipboard().set(to_copy)
|
||||
@@ -62,6 +63,12 @@ class PropertiesWindow(Adw.Dialog):
|
||||
self.size = self.my_utils.get_size_with_format(self.user_data_path)
|
||||
|
||||
def generate_upper(self):
|
||||
self.description_button.connect(
|
||||
"clicked",
|
||||
lambda *_a: self.copy_item(
|
||||
self.description.get_label(), _("Description")
|
||||
)
|
||||
)
|
||||
image = self.my_utils.find_app_icon(self.app_id)
|
||||
self.runtime.set_subtitle(self.current_flatpak[13])
|
||||
if image.get_paintable() == None:
|
||||
|
||||
Reference in New Issue
Block a user