summaryrefslogtreecommitdiff
path: root/wikipedia/widgets/BackButton.js
diff options
context:
space:
mode:
Diffstat (limited to 'wikipedia/widgets/BackButton.js')
-rw-r--r--wikipedia/widgets/BackButton.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/wikipedia/widgets/BackButton.js b/wikipedia/widgets/BackButton.js
new file mode 100644
index 0000000..cfb3155
--- /dev/null
+++ b/wikipedia/widgets/BackButton.js
@@ -0,0 +1,18 @@
+const GObject = imports.gi.GObject;
+const Gtk = imports.gi.Gtk;
+const Lang = imports.lang;
+
+const BackButton = new Lang.Class({
+ Name: 'BackButton',
+ Extends: Gtk.Button,
+
+ _init: function(props) {
+ props = props || {};
+ props.image = Gtk.Image.new_from_icon_name('go-previous-symbolic',
+ Gtk.IconSize.BUTTON);
+ props.always_show_image = true;
+ // Don't do that. What should actually happen is the system-wide setting
+ // that controls whether buttons show images should be changed.
+ this.parent(props);
+ }
+});