diff options
author | Marcus Lundblad <ml@dfupdate.se> | 2023-04-21 08:42:06 +0200 |
---|---|---|
committer | Marcus Lundblad <ml@dfupdate.se> | 2023-04-21 08:42:06 +0200 |
commit | 4706517fc8f28a40a84a65146c621fce0c5f20af (patch) | |
tree | 457813e2061f1823bf65804ae7a2c12f387a9d6b | |
parent | 5c8d16861f20f85f4167dcecb761bf9a5fb472a1 (diff) | |
download | gnome-maps-4706517fc8f28a40a84a65146c621fce0c5f20af.tar.gz |
sendToDialog: Unbreak OpenWithRowswip/mlundblad/port-openwithrow-gtk4
Port the missing OpenWithRow to GTK4, this
was broken since the GTK4 port, causing the
dialog to not work when there are installed
apps supporting geo: (and Maps running as non-Flatpak).
-rw-r--r-- | data/ui/open-with-row.ui | 19 | ||||
-rw-r--r-- | src/sendToDialog.js | 6 |
2 files changed, 10 insertions, 15 deletions
diff --git a/data/ui/open-with-row.ui b/data/ui/open-with-row.ui index d236a2a8..f56afa4a 100644 --- a/data/ui/open-with-row.ui +++ b/data/ui/open-with-row.ui @@ -1,29 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> <interface> - <requires lib="gtk+" version="3.12"/> + <requires lib="gtk" version="4.0"/> <template class="Gjs_OpenWithRow" parent="GtkListBoxRow"> - <property name="visible">True</property> - <child> + <property name="child"> <object class="GtkBox"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="spacing">12</property> - <property name="margin">6</property> + <property name="margin-start">6</property> + <property name="margin-end">6</property> + <property name="margin-top">6</property> + <property name="margin-bottom">6</property> <child> <object class="GtkImage" id="icon"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="pixel-size">32</property> </object> </child> <child> <object class="GtkLabel" id="label"> - <property name="visible">True</property> - <property name="can_focus">False</property> <property name="halign">start</property> </object> </child> </object> - </child> + </property> </template> </interface> + diff --git a/src/sendToDialog.js b/src/sendToDialog.js index 257df649..369f1692 100644 --- a/src/sendToDialog.js +++ b/src/sendToDialog.js @@ -239,12 +239,10 @@ GObject.registerClass({ }, SendToDialog); export class OpenWithRow extends Gtk.ListBoxRow { - constructor(params) { - let appinfo = params.appinfo; - delete params.appinfo; - + constructor({ appinfo, ...params }) { super(params); + this.appinfo = appinfo; this._label.label = _("Open with %s").format(appinfo.get_name()); this._icon.gicon = appinfo.get_icon(); } |