fix my brokenness
svn path=/trunk/gtk-sharp/; revision=32943
This commit is contained in:
parent
c3d54388e2
commit
780218b349
3 changed files with 18 additions and 15 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
using Gtk;
|
||||
using Gdk;
|
||||
|
@ -61,7 +62,7 @@ namespace GtkDemo
|
|||
alignment.Add (frame);
|
||||
vbox.PackStart (alignment, false, false, 0);
|
||||
|
||||
Gtk.Image image = new Gtk.Image ("images/gtk-logo-rgb.gif");
|
||||
Gtk.Image image = new Gtk.Image (Gdk.Pixbuf.LoadFromResource ("gtk-logo-rgb.gif"));
|
||||
frame.Add (image);
|
||||
|
||||
// Animation
|
||||
|
@ -76,7 +77,7 @@ namespace GtkDemo
|
|||
alignment.Add (frame);
|
||||
vbox.PackStart (alignment, false, false, 0);
|
||||
|
||||
image = new Gtk.Image ("images/floppybuddy.gif");
|
||||
image = new Gtk.Image (Gdk.Pixbuf.LoadFromResource ("floppybuddy.gif"));
|
||||
frame.Add (image);
|
||||
|
||||
// Progressive
|
||||
|
@ -143,7 +144,8 @@ namespace GtkDemo
|
|||
private bool ProgressiveTimeout ()
|
||||
{
|
||||
if (imageStream == null) {
|
||||
imageStream = new BinaryReader (new StreamReader ("images/alphatest.png").BaseStream);
|
||||
Stream stream = Assembly.GetExecutingAssembly ().GetManifestResourceStream ("alphatest.png");
|
||||
imageStream = new BinaryReader (stream);
|
||||
pixbufLoader = new Gdk.PixbufLoader ();
|
||||
pixbufLoader.AreaPrepared += new EventHandler (ProgressivePreparedCallback);
|
||||
pixbufLoader.AreaUpdated += new AreaUpdatedHandler (ProgressiveUpdatedCallback);
|
||||
|
|
|
@ -32,17 +32,17 @@ namespace GtkDemo
|
|||
{
|
||||
const int FrameDelay = 50;
|
||||
const int CycleLen = 60;
|
||||
const string BackgroundName = "images/background.jpg";
|
||||
const string BackgroundName = "background.jpg";
|
||||
|
||||
string [] ImageNames = {
|
||||
"images/apple-red.png",
|
||||
"images/gnome-applets.png",
|
||||
"images/gnome-calendar.png",
|
||||
"images/gnome-foot.png",
|
||||
"images/gnome-gmush.png",
|
||||
"images/gnome-gimp.png",
|
||||
"images/gnome-gsame.png",
|
||||
"images/gnu-keys.png"
|
||||
"apple-red.png",
|
||||
"gnome-applets.png",
|
||||
"gnome-calendar.png",
|
||||
"gnome-foot.png",
|
||||
"gnome-gmush.png",
|
||||
"gnome-gimp.png",
|
||||
"gnome-gsame.png",
|
||||
"gnu-keys.png"
|
||||
};
|
||||
|
||||
// current frame
|
||||
|
@ -69,8 +69,9 @@ namespace GtkDemo
|
|||
|
||||
images = new Pixbuf[ImageNames.Length];
|
||||
|
||||
for (int i = 0; i < ImageNames.Length; i++)
|
||||
images[i] = Gdk.Pixbuf.LoadFromResource (ImageNames[i]);
|
||||
int i = 0;
|
||||
foreach (string im in ImageNames)
|
||||
images[i++] = Gdk.Pixbuf.LoadFromResource (im);
|
||||
}
|
||||
|
||||
// Expose callback for the drawing area
|
||||
|
|
|
@ -29,7 +29,7 @@ images = \
|
|||
/resource:$(srcdir)/images/gnome-foot.png,gnome-foot.png \
|
||||
/resource:$(srcdir)/images/MonoIcon.png,MonoIcon.png \
|
||||
/resource:$(srcdir)/images/gnome-calendar.png,gnome-calendar.png \
|
||||
/resource:$(srcdir)/images/gnome-gmush.png,gnome-mush.png \
|
||||
/resource:$(srcdir)/images/gnome-gmush.png,gnome-gmush.png \
|
||||
/resource:$(srcdir)/images/gnu-keys.png,gnu-keys.png \
|
||||
/resource:$(srcdir)/images/gnome-applets.png,gnome-applets.png \
|
||||
/resource:$(srcdir)/images/gnome-gsame.png,gnome-gsame.png \
|
||||
|
|
Loading…
Reference in a new issue