ui.backend.gtk: don't die if the icon doesn't exist, partially fixes #369
parent
80385770ef
commit
b667e4ff7e
|
@ -223,14 +223,18 @@ CONSTANT: action-key-codes
|
||||||
|
|
||||||
! This word gets replaced when deploying. See 'Vocabulary icons'
|
! This word gets replaced when deploying. See 'Vocabulary icons'
|
||||||
! in the docs and tools.deploy.shaker.gtk-icon
|
! in the docs and tools.deploy.shaker.gtk-icon
|
||||||
: get-icon-data ( -- byte-array )
|
: get-icon-data ( -- byte-array/f )
|
||||||
"resource:misc/icons/Factor_48x48.png" binary file-contents ;
|
[
|
||||||
|
"resource:misc/icons/Factor_48x48.png" binary file-contents
|
||||||
|
] [ drop f ] recover ;
|
||||||
|
|
||||||
: load-icon ( -- )
|
: load-icon ( -- )
|
||||||
get-icon-data [
|
get-icon-data [
|
||||||
|
[
|
||||||
data>GInputStream &g_object_unref
|
data>GInputStream &g_object_unref
|
||||||
GInputStream>GdkPixbuf gtk_window_set_default_icon
|
GInputStream>GdkPixbuf gtk_window_set_default_icon
|
||||||
] with-destructors ;
|
] with-destructors
|
||||||
|
] when* ;
|
||||||
|
|
||||||
:: connect-user-input-signals ( win -- )
|
:: connect-user-input-signals ( win -- )
|
||||||
win events-mask gtk_widget_add_events
|
win events-mask gtk_widget_add_events
|
||||||
|
|
Loading…
Reference in New Issue