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:58:05 +0200 |
commit | 48f052aa613ce2f33679330dcdbef29de52d0df5 (patch) | |
tree | 3485e7d0bf782dc8e89a48c33eae43f6ecd65b28 | |
parent | 379205d5ff64f4814a0ac9dc2812f1f9a9644a72 (diff) | |
download | gnome-maps-48f052aa613ce2f33679330dcdbef29de52d0df5.tar.gz |
sendToDialog: Unbreak OpenWithRows
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 f2665417..14c5c57e 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(); } |