summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2023-01-24 23:22:37 +0100
committerMarcus Lundblad <ml@dfupdate.se>2023-04-25 22:17:29 +0200
commit073bf637b0915986eb2ca2cbf47d4bfeb7e500d1 (patch)
treef871b77a4a7d42f9443bc4259e186aff8cdef1dd
parentaeba532161bad73e8ea9ded9788ea7eb37f13c2e (diff)
downloadgnome-maps-073bf637b0915986eb2ca2cbf47d4bfeb7e500d1.tar.gz
WIP: Add listbox row to go to main POI categories
-rw-r--r--data/org.gnome.Maps.data.gresource.xml.in1
-rw-r--r--data/ui/poi-category-goback-row.ui29
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/org.gnome.Maps.src.gresource.xml.in1
-rw-r--r--src/poiCategoryGobackRow.js30
5 files changed, 62 insertions, 0 deletions
diff --git a/data/org.gnome.Maps.data.gresource.xml.in b/data/org.gnome.Maps.data.gresource.xml.in
index c2eb266a..f77b7082 100644
--- a/data/org.gnome.Maps.data.gresource.xml.in
+++ b/data/org.gnome.Maps.data.gresource.xml.in
@@ -26,6 +26,7 @@
<file preprocess="xml-stripblanks">ui/place-list-row.ui</file>
<file preprocess="xml-stripblanks">ui/place-popover.ui</file>
<file preprocess="xml-stripblanks">ui/place-view.ui</file>
+ <file preprocess="xml-stripblanks">ui/poi-category-goback-row.ui</file>
<file preprocess="xml-stripblanks">ui/poi-category-row.ui</file>
<file preprocess="xml-stripblanks">ui/route-entry.ui</file>
<file preprocess="xml-stripblanks">ui/send-to-dialog.ui</file>
diff --git a/data/ui/poi-category-goback-row.ui b/data/ui/poi-category-goback-row.ui
new file mode 100644
index 00000000..0a245db6
--- /dev/null
+++ b/data/ui/poi-category-goback-row.ui
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk" version="4.0"/>
+ <template class="Gjs_PoiCategoryGobackRow" parent="GtkListBoxRow">
+ <accessibility>
+ <relation name="labelled-by">label</relation>
+ </accessibility>
+ <property name="margin-top">6</property>
+ <property name="margin-start">6</property>
+ <property name="margin-end">6</property>
+ <property name="child">
+ <object class="GtkBox">
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage">
+ <property name="icon-name">go-previous-symbolic</property>
+ <property name="valign">center</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="label" translatable="yes">Go back to main categories</property>
+ <property name="xalign">0</property>
+ </object>
+ </child>"
+ </object>
+ </property>
+ </template>
+</interface>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 125eb252..748cb648 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -26,6 +26,7 @@ data/ui/transit-options-panel.ui
data/ui/place-bar.ui
data/ui/place-buttons.ui
data/ui/place-view.ui
+data/ui/poi-category-goback-row.ui
data/ui/zoom-in-dialog.ui
lib/maps-file-data-source.c
lib/maps-osm.c
diff --git a/src/org.gnome.Maps.src.gresource.xml.in b/src/org.gnome.Maps.src.gresource.xml.in
index cbd5efcb..96274d10 100644
--- a/src/org.gnome.Maps.src.gresource.xml.in
+++ b/src/org.gnome.Maps.src.gresource.xml.in
@@ -64,6 +64,7 @@
<file>placeViewImage.js</file>
<file>placeZoom.js</file>
<file>poiCategories.js</file>
+ <file>poiCategoryGobackRow.js</file>
<file>poiCategoryRow.js</file>
<file>printLayout.js</file>
<file>printOperation.js</file>
diff --git a/src/poiCategoryGobackRow.js b/src/poiCategoryGobackRow.js
new file mode 100644
index 00000000..5c6148dc
--- /dev/null
+++ b/src/poiCategoryGobackRow.js
@@ -0,0 +1,30 @@
+/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
+/* vim: set et ts=4 sw=4: */
+/*
+ * Copyright (c) 2023 Marcus Lundblad.
+ *
+ * GNOME Maps is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * GNOME Maps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNOME Maps; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Marcus Lundblad <ml@dfupdate.se>
+ */
+
+import GObject from 'gi://GObject';
+import Gtk from 'gi://Gtk';
+
+export class PoiCategoryGobackRow extends Gtk.ListBoxRow {
+};
+
+GObject.registerClass({
+ Template: 'resource:///org/gnome/Maps/ui/poi-category-goback-row.ui',
+}, PoiCategoryGobackRow);