[gnome-maps] shapeLayerFileChooser: Use the correct parent for the UI template
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] shapeLayerFileChooser: Use the correct parent for the UI template
- Date: Mon, 22 Jan 2018 21:05:40 +0000 (UTC)
commit d0d3c6a150c4988c9874b929213e3dda0bc9031e
Author: Marcus Lundblad <ml update uu se>
Date: Mon Jan 22 22:01:49 2018 +0100
shapeLayerFileChooser: Use the correct parent for the UI template
Also, programmatically set the file chooser dialog title,
as it seems to not be picked up for the template (might be an X issue?).
data/ui/shape-layer-file-chooser.ui | 2 +-
src/mainWindow.js | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/shape-layer-file-chooser.ui b/data/ui/shape-layer-file-chooser.ui
index 449a9d2..383a2df 100644
--- a/data/ui/shape-layer-file-chooser.ui
+++ b/data/ui/shape-layer-file-chooser.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <template class="Gjs_ShapeLayerFileChooser" parent="GtkFileChooserDialog">
+ <template class="Gjs_ShapeLayerFileChooser" parent="GtkFileChooserNative">
<property name="title" translatable="yes">Open Shape Layer</property>
<property name="select_multiple">True</property>
<child type="action">
diff --git a/src/mainWindow.js b/src/mainWindow.js
index b6b0bf8..59e1532 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -20,6 +20,8 @@
* Zeeshan Ali (Khattak) <zeeshanak gnome org>
*/
+const _ = imports.gettext.gettext;
+
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Gdk = imports.gi.Gdk;
@@ -59,6 +61,7 @@ var ShapeLayerFileChooser = new Lang.Class({
allFilter.set_name(_("All Layer Files"));
this.add_filter(allFilter);
this.set_filter(allFilter);
+ this.title = _("Open Shape Layer");
ShapeLayer.SUPPORTED_TYPES.forEach((function(layerClass) {
let filter = new Gtk.FileFilter();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]