-GtkImage* image_new_missing(){
- return GTK_IMAGE( gtk_image_new_from_stock( GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_SMALL_TOOLBAR ) );
+ui::Image image_new_missing(){
+ return ui::Image::from( gtk_image_new_from_stock( GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_SMALL_TOOLBAR ) );
-GtkImage* new_image( const char* filename ){
- {
- GtkImage* image = image_new_from_file_with_mask( filename );
- if ( image != 0 ) {
- return image;
- }
+ui::Image new_image( const char* filename ){
+ if ( auto image = image_new_from_file_with_mask( filename ) ) {
+ return image;
StringOutputStream fullPath( 256 );
fullPath << g_bitmapsPath.c_str() << filename;
return new_image( fullPath.c_str() );
StringOutputStream fullPath( 256 );
fullPath << g_bitmapsPath.c_str() << filename;
return new_image( fullPath.c_str() );