Skip to content

Commit

Permalink
ui.backend.gtk: default-icon-path considers install-prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
bjourne committed Sep 13, 2016
1 parent 43a085c commit e3d4a19
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions basis/ui/backend/gtk/gtk.factor
Expand Up @@ -4,13 +4,13 @@ USING: accessors alien.accessors alien.c-types alien.data
alien.strings arrays assocs classes.struct combinators continuations
destructors environment gdk.ffi gdk.gl.ffi gdk.pixbuf.ffi glib.ffi
gobject-introspection.standard-types gobject.ffi gtk.ffi gtk.gl.ffi
io.encodings.binary io.encodings.utf8 io.files io.pathnames kernel libc literals
locals math math.bitwise math.vectors namespaces sequences strings
system threads ui ui.backend ui.backend.gtk.input-methods
ui.backend.gtk.io ui.clipboards ui.event-loop ui.gadgets
ui.gadgets.private ui.gadgets.worlds ui.gestures
ui.pixel-formats ui.pixel-formats.private ui.private
vocabs.loader ;
io.encodings.binary io.encodings.utf8 io.files io.pathnames kernel
libc literals locals math math.bitwise math.vectors namespaces
sequences strings system threads ui ui.backend
ui.backend.gtk.input-methods ui.backend.gtk.io ui.backend.x11.keys
ui.clipboards ui.event-loop ui.gadgets ui.gadgets.private
ui.gadgets.worlds ui.gestures ui.pixel-formats
ui.pixel-formats.private ui.private vocabs.loader ;
IN: ui.backend.gtk

SINGLETON: gtk-ui-backend
Expand Down Expand Up @@ -171,7 +171,11 @@ CONSTANT: events-mask
: on-focus-out ( win event user-data -- ? )
2drop window unfocus-world t ;

CONSTANT: default-icon-path "resource:misc/icons/Factor_128x128.png"
: default-icon-path ( -- path )
install-prefix dup "." =
[ drop "resource:misc/icons/Factor_128x128.png" ] [
"share/factor/icons/Factor_128x128.png" append-path
] if ;

: default-icon-data ( -- byte-array/f )
[
Expand Down

0 comments on commit e3d4a19

Please sign in to comment.