From fd81565c5527b99dd212b03c2f329a00e146f03b Mon Sep 17 00:00:00 2001 From: Rory MacQueen Date: Thu, 15 Aug 2013 15:41:36 -0700 Subject: Reorganized import paths Moved all widgets into widgets directory. Changed Endless Wikipedia file to expose wikipedia web view [endlessm/eos-sdk#260] --- wikipedia/widgets/BackButton.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 wikipedia/widgets/BackButton.js (limited to 'wikipedia/widgets/BackButton.js') 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); + } +}); -- cgit v1.2.3