[banshee] Revert "[PixbufImageSurface] Use factory to handle null pb"
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Subject: [banshee] Revert "[PixbufImageSurface] Use factory to handle null pb"
- Date: Fri, 29 May 2009 23:26:43 -0400 (EDT)
commit ea005e19cb6bde249389fae9e4132cb0569d86b0
Author: Aaron Bockover <abockover novell com>
Date: Fri May 29 23:24:58 2009 -0400
Revert "[PixbufImageSurface] Use factory to handle null pb"
This was an API break for no apparent good reason. The input
data should be verified before creating a PixbufImageSurface,
which could throw during the blitting anyway.
This reverts commit 07edaeff263b2c74d38758d48ac0102e987c1f1b.
---
.../Muinshee/Muinshee/MuinsheeTrackInfoDisplay.cs | 2 +-
.../Banshee.Collection.Gui/ArtworkManager.cs | 2 +-
.../Banshee.Collection.Gui/ColumnCellAlbum.cs | 2 +-
.../Banshee.Gui.Widgets/TrackInfoDisplay.cs | 4 ++--
.../Banshee.Podcasting.Gui/ColumnCellPodcast.cs | 2 +-
.../Hyena.Gui/Hyena.Gui/PixbufImageSurface.cs | 18 ++----------------
6 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/src/Clients/Muinshee/Muinshee/MuinsheeTrackInfoDisplay.cs b/src/Clients/Muinshee/Muinshee/MuinsheeTrackInfoDisplay.cs
index 42286bc..7b1034d 100644
--- a/src/Clients/Muinshee/Muinshee/MuinsheeTrackInfoDisplay.cs
+++ b/src/Clients/Muinshee/Muinshee/MuinsheeTrackInfoDisplay.cs
@@ -48,7 +48,7 @@ namespace Muinshee
protected override void RenderIdle (Cairo.Context cr)
{
- idle_album = idle_album ?? PixbufImageSurface.Create (Banshee.Gui.IconThemeUtils.LoadIcon (
+ idle_album = idle_album ?? new PixbufImageSurface (Banshee.Gui.IconThemeUtils.LoadIcon (
ArtworkSizeRequest, "media-optical"), true);
ArtworkRenderer.RenderThumbnail (cr, idle_album, false, Allocation.X, Allocation.Y,
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
index 9bd828e..0c2941a 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ArtworkManager.cs
@@ -125,7 +125,7 @@ namespace Banshee.Collection.Gui
}
try {
- surface = PixbufImageSurface.Create (pixbuf);
+ surface = new PixbufImageSurface (pixbuf);
if (surface == null) {
return null;
}
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
index f8d43ca..99186a3 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellAlbum.cs
@@ -45,7 +45,7 @@ namespace Banshee.Collection.Gui
private static int image_size = 48;
private static ImageSurface default_cover_image
- = PixbufImageSurface.Create (IconThemeUtils.LoadIcon (image_size, "media-optical", "browser-album-cover"));
+ = new PixbufImageSurface (IconThemeUtils.LoadIcon (image_size, "media-optical", "browser-album-cover"));
private ArtworkManager artwork_manager;
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
index 555c7ae..4633a19 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
@@ -66,13 +66,13 @@ namespace Banshee.Gui.Widgets
private ImageSurface missing_audio_image;
protected ImageSurface MissingAudioImage {
get { return missing_audio_image ?? (missing_audio_image
- = PixbufImageSurface.Create (IconThemeUtils.LoadIcon (MissingIconSizeRequest, "audio-x-generic"), true)); }
+ = new PixbufImageSurface (IconThemeUtils.LoadIcon (MissingIconSizeRequest, "audio-x-generic"), true)); }
}
private ImageSurface missing_video_image;
protected ImageSurface MissingVideoImage {
get { return missing_video_image ?? (missing_video_image
- = PixbufImageSurface.Create (IconThemeUtils.LoadIcon (MissingIconSizeRequest, "video-x-generic"), true)); }
+ = new PixbufImageSurface (IconThemeUtils.LoadIcon (MissingIconSizeRequest, "video-x-generic"), true)); }
}
private Cairo.Color background_color;
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs
index af13ce2..a3bcd45 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/ColumnCellPodcast.cs
@@ -51,7 +51,7 @@ namespace Banshee.Podcasting.Gui
// TODO replace this w/ new icon installation etc
private static ImageSurface default_cover_image
- = PixbufImageSurface.Create (IconThemeUtils.LoadIcon (image_size, "podcast"));
+ = new PixbufImageSurface (IconThemeUtils.LoadIcon (image_size, "podcast"));
private ArtworkManager artwork_manager;
diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui/PixbufImageSurface.cs b/src/Libraries/Hyena.Gui/Hyena.Gui/PixbufImageSurface.cs
index 6aead35..a8895df 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui/PixbufImageSurface.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Gui/PixbufImageSurface.cs
@@ -50,28 +50,14 @@ namespace Hyena.Gui
{
destroy_func = new cairo_destroy_func_t (DestroyPixelData);
}
-
- public static PixbufImageSurface Create (Gdk.Pixbuf pixbuf)
- {
- return Create (pixbuf, false);
- }
-
- public static PixbufImageSurface Create (Gdk.Pixbuf pixbuf, bool disposePixbuf)
- {
- if (pixbuf == null || pixbuf.Handle == IntPtr.Zero) {
- return null;
- }
-
- return new PixbufImageSurface (pixbuf, disposePixbuf);
- }
private IntPtr data;
- private PixbufImageSurface (Gdk.Pixbuf pixbuf) : this (pixbuf, false)
+ public PixbufImageSurface (Gdk.Pixbuf pixbuf) : this (pixbuf, false)
{
}
- private PixbufImageSurface (Gdk.Pixbuf pixbuf, bool disposePixbuf) : this (disposePixbuf ? pixbuf : null,
+ public PixbufImageSurface (Gdk.Pixbuf pixbuf, bool disposePixbuf) : this (disposePixbuf ? pixbuf : null,
pixbuf.Width, pixbuf.Height, pixbuf.NChannels, pixbuf.Rowstride, pixbuf.Pixels)
{
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]