That way, we don't have to make it transparent in all the demos.
gnu-keys.png \
gtk-logo-24.png \
gtk-logo-48.png \
- gtk-logo-rgb.gif \
+ gtk-logo-old.png \
css_accordion.css \
css_basics.css \
css_multiplebgs.css \
about_cb (GtkAction *action,
GtkWidget *window)
{
- GdkPixbuf *pixbuf, *transparent;
+ GdkPixbuf *pixbuf;
const gchar *authors[] = {
"Peter Mattis",
NULL
};
- pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-rgb.gif", NULL);
+ pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-old.png", NULL);
/* We asser the existence of the pixbuf as we load it from a custom resource. */
g_assert (pixbuf);
- transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
- g_object_unref (pixbuf);
gtk_show_about_dialog (GTK_WINDOW (window),
"program-name", "GTK+ Code Demos",
"comments", "Program to demonstrate GTK+ functions.",
"authors", authors,
"documenters", documentors,
- "logo", transparent,
+ "logo", pixbuf,
"title", "About GTK+ Code Demos",
NULL);
- g_object_unref (transparent);
+ g_object_unref (pixbuf);
}
typedef struct
GdkPixbuf *pixbuf;
GtkIconFactory *factory;
GtkIconSet *icon_set;
- GdkPixbuf *transparent;
static GtkStockItem items[] = {
{ "demo-gtk-logo",
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
- pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-rgb.gif", NULL);
+ pixbuf = gdk_pixbuf_new_from_resource ("/appwindow/gtk-logo-old.png", NULL);
/* We assert the existence of the pixbuf as we load it from a custom resource. */
g_assert (pixbuf);
- /* The gtk-logo-rgb icon has a white background, make it transparent */
- transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
-
- icon_set = gtk_icon_set_new_from_pixbuf (transparent);
+ icon_set = gtk_icon_set_new_from_pixbuf (pixbuf);
gtk_icon_factory_add (factory, "demo-gtk-logo", icon_set);
gtk_icon_set_unref (icon_set);
g_object_unref (pixbuf);
- g_object_unref (transparent);
/* Drop our reference to the factory, GTK will hold a reference. */
g_object_unref (factory);
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/">
- <file>gtk-logo-rgb.gif</file>
+ <file>gtk-logo-old.png</file>
</gresource>
<gresource prefix="/application">
<file preprocess="to-pixdata">gtk-logo-24.png</file>
<file preprocess="xml-stripblanks">menus.ui</file>
</gresource>
<gresource prefix="/appwindow">
- <file preprocess="to-pixdata">gtk-logo-rgb.gif</file>
+ <file preprocess="to-pixdata">gtk-logo-old.png</file>
</gresource>
<gresource prefix="/builder">
<file>demo.ui</file>
<gresource prefix="/images">
<file>alphatest.png</file>
<file>floppybuddy.gif</file>
- <file>gtk-logo-rgb.gif</file>
+ <file>gtk-logo-old.png</file>
</gresource>
<gresource prefix="/pixbufs">
<file>apple-red.png</file>
</gresource>
<gresource prefix="/textview">
<file>floppybuddy.gif</file>
- <file>gtk-logo-rgb.gif</file>
+ <file>gtk-logo-old.png</file>
</gresource>
</gresources>
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
- pixbuf = gdk_pixbuf_new_from_resource ("/images/gtk-logo-rgb.gif", NULL);
+ pixbuf = gdk_pixbuf_new_from_resource ("/images/gtk-logo-old.png", NULL);
/* The image loading must work, we ensure that the resources are valid. */
g_assert (pixbuf);
static void
setup_default_icon (void)
{
- GdkPixbuf *pixbuf, *transparent;
+ GdkPixbuf *pixbuf;
- pixbuf = gdk_pixbuf_new_from_resource ("/gtk-logo-rgb.gif", NULL);
+ pixbuf = gdk_pixbuf_new_from_resource ("/gtk-logo-old.png", NULL);
/* We load a resource, so we can guarantee that loading it is successful */
g_assert (pixbuf);
- /* The gtk-logo-rgb icon has a white background, make it transparent */
- transparent = gdk_pixbuf_add_alpha (pixbuf, TRUE, 0xff, 0xff, 0xff);
-
- gtk_window_set_default_icon (transparent);
+ gtk_window_set_default_icon (pixbuf);
g_object_unref (pixbuf);
- g_object_unref (transparent);
}
int
GdkPixbuf *pixbuf;
GdkPixbuf *scaled;
- pixbuf = gdk_pixbuf_new_from_resource ("/textview/gtk-logo-rgb.gif", NULL);
+ pixbuf = gdk_pixbuf_new_from_resource ("/textview/gtk-logo-old.png", NULL);
g_assert (pixbuf);
scaled = gdk_pixbuf_scale_simple (pixbuf, 32, 32, GDK_INTERP_BILINEAR);