mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-02 12:41:07 +00:00
fix my brokenness
svn path=/trunk/gtk-sharp/; revision=32943
This commit is contained in:
parent
c3d54388e2
commit
780218b349
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using Gdk;
|
using Gdk;
|
||||||
|
@ -61,7 +62,7 @@ namespace GtkDemo
|
||||||
alignment.Add (frame);
|
alignment.Add (frame);
|
||||||
vbox.PackStart (alignment, false, false, 0);
|
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);
|
frame.Add (image);
|
||||||
|
|
||||||
// Animation
|
// Animation
|
||||||
|
@ -76,7 +77,7 @@ namespace GtkDemo
|
||||||
alignment.Add (frame);
|
alignment.Add (frame);
|
||||||
vbox.PackStart (alignment, false, false, 0);
|
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);
|
frame.Add (image);
|
||||||
|
|
||||||
// Progressive
|
// Progressive
|
||||||
|
@ -143,7 +144,8 @@ namespace GtkDemo
|
||||||
private bool ProgressiveTimeout ()
|
private bool ProgressiveTimeout ()
|
||||||
{
|
{
|
||||||
if (imageStream == null) {
|
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 = new Gdk.PixbufLoader ();
|
||||||
pixbufLoader.AreaPrepared += new EventHandler (ProgressivePreparedCallback);
|
pixbufLoader.AreaPrepared += new EventHandler (ProgressivePreparedCallback);
|
||||||
pixbufLoader.AreaUpdated += new AreaUpdatedHandler (ProgressiveUpdatedCallback);
|
pixbufLoader.AreaUpdated += new AreaUpdatedHandler (ProgressiveUpdatedCallback);
|
||||||
|
|
|
@ -32,17 +32,17 @@ namespace GtkDemo
|
||||||
{
|
{
|
||||||
const int FrameDelay = 50;
|
const int FrameDelay = 50;
|
||||||
const int CycleLen = 60;
|
const int CycleLen = 60;
|
||||||
const string BackgroundName = "images/background.jpg";
|
const string BackgroundName = "background.jpg";
|
||||||
|
|
||||||
string [] ImageNames = {
|
string [] ImageNames = {
|
||||||
"images/apple-red.png",
|
"apple-red.png",
|
||||||
"images/gnome-applets.png",
|
"gnome-applets.png",
|
||||||
"images/gnome-calendar.png",
|
"gnome-calendar.png",
|
||||||
"images/gnome-foot.png",
|
"gnome-foot.png",
|
||||||
"images/gnome-gmush.png",
|
"gnome-gmush.png",
|
||||||
"images/gnome-gimp.png",
|
"gnome-gimp.png",
|
||||||
"images/gnome-gsame.png",
|
"gnome-gsame.png",
|
||||||
"images/gnu-keys.png"
|
"gnu-keys.png"
|
||||||
};
|
};
|
||||||
|
|
||||||
// current frame
|
// current frame
|
||||||
|
@ -69,8 +69,9 @@ namespace GtkDemo
|
||||||
|
|
||||||
images = new Pixbuf[ImageNames.Length];
|
images = new Pixbuf[ImageNames.Length];
|
||||||
|
|
||||||
for (int i = 0; i < ImageNames.Length; i++)
|
int i = 0;
|
||||||
images[i] = Gdk.Pixbuf.LoadFromResource (ImageNames[i]);
|
foreach (string im in ImageNames)
|
||||||
|
images[i++] = Gdk.Pixbuf.LoadFromResource (im);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose callback for the drawing area
|
// Expose callback for the drawing area
|
||||||
|
|
|
@ -29,7 +29,7 @@ images = \
|
||||||
/resource:$(srcdir)/images/gnome-foot.png,gnome-foot.png \
|
/resource:$(srcdir)/images/gnome-foot.png,gnome-foot.png \
|
||||||
/resource:$(srcdir)/images/MonoIcon.png,MonoIcon.png \
|
/resource:$(srcdir)/images/MonoIcon.png,MonoIcon.png \
|
||||||
/resource:$(srcdir)/images/gnome-calendar.png,gnome-calendar.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/gnu-keys.png,gnu-keys.png \
|
||||||
/resource:$(srcdir)/images/gnome-applets.png,gnome-applets.png \
|
/resource:$(srcdir)/images/gnome-applets.png,gnome-applets.png \
|
||||||
/resource:$(srcdir)/images/gnome-gsame.png,gnome-gsame.png \
|
/resource:$(srcdir)/images/gnome-gsame.png,gnome-gsame.png \
|
||||||
|
|
Loading…
Reference in a new issue