Changeset 73
- Timestamp:
- 05/20/07 07:08:51 (2 years ago)
- Files:
-
- branches/bughunt/dsss.conf (modified) (1 diff)
- branches/bughunt/minwin/peer.d (modified) (1 diff)
- branches/bughunt/minwin/window.d (modified) (1 diff)
- branches/bughunt/samples/imageview.d (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/bughunt/dsss.conf
r63 r73 10 10 11 11 [samples/idle.d] 12 [samples/imageview.d] 12 13 [samples/layout.d] 13 14 [samples/menus.d] branches/bughunt/minwin/peer.d
r60 r73 46 46 version (MinWin32) { 47 47 int ok = DeleteObject(peer); 48 sysAssert(ok != false, "Failed to dispose peer Font");48 sysAssert(ok != false, "Failed to dispose peer"); 49 49 } else version (GTK) { 50 50 g_object_unref(cast(GObject*)peer); branches/bughunt/minwin/window.d
r72 r73 663 663 664 664 Image loadCompatibleImage(char[] imageKey, char[] fmt = "bmp") { 665 char[] fname = imageKey; 666 if (gApp.resourcePath.length > 0) { 667 fname = gApp.resourcePath ~ "/" ~ fname; 668 } 669 return loadCompatibleImageFile(fname ~ "." ~ fmt); 670 } 671 672 Image loadCompatibleImageFile(char[] imagefile) { 665 673 GtkWidget* widget = cast(GtkWidget*)content; 666 674 GdkDrawable* gwin = cast(GdkDrawable*)widget.window; 667 675 GError* err; 668 char[] fname = imageKey; 669 if (gApp.resourcePath.length > 0) { 670 fname = gApp.resourcePath ~ "/" ~ fname; 671 } 672 fname = fname ~ "." ~ fmt; 673 GdkPixbuf* pbuf = gdk_pixbuf_new_from_file(toStringz(fname),&err); 676 GdkPixbuf* pbuf = gdk_pixbuf_new_from_file(toStringz(imagefile),&err); 677 if (err !is null || pbuf is null) 678 return null; 674 679 int width = gdk_pixbuf_get_width(pbuf); 675 680 int height = gdk_pixbuf_get_height(pbuf);
