Bug 291897. Fix build breakage by having GNOMEShellService depend on widget and only try to use nsIGdkPixbufImage if we're a GTK2 build. r+sr=blizzard,a=asa

This commit is contained in:
roc+@cs.cmu.edu
2005-04-26 21:32:26 +00:00
parent df66b9ba17
commit 373b848dbc
2 changed files with 7 additions and 0 deletions

View File

@@ -55,7 +55,9 @@
#include "imgIRequest.h"
#include "imgIContainer.h"
#include "nsIImage.h"
#ifdef MOZ_WIDGET_GTK2
#include "nsIGdkPixbufImage.h"
#endif
#include "nsColor.h"
#include <glib.h>
@@ -348,6 +350,9 @@ WriteImage(const nsCString& aPath, gfxIImageFrame* aImage)
if (!img)
return NS_ERROR_NOT_AVAILABLE;
#ifndef MOZ_WIDGET_GTK2
return NS_ERROR_NOT_AVAILABLE;
#else
nsCOMPtr<nsIGdkPixbufImage> pixImg(do_QueryInterface(img));
if (!pixImg)
return NS_ERROR_NOT_AVAILABLE;
@@ -361,6 +366,7 @@ WriteImage(const nsCString& aPath, gfxIImageFrame* aImage)
aImage->UnlockImageData();
g_object_unref(pixbuf);
return res ? NS_OK : NS_ERROR_FAILURE;
#endif
}
NS_IMETHODIMP