mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
port to icon cache
2002-02-09 Havoc Pennington <hp@pobox.com> * src/window.c (update_icon): port to icon cache * src/iconcache.c, src/iconcache.c: begin process of cleaning up window.c by moving the icon-reading code in here, based on the code in libwnck, which was in turn based on the earlier metacity code
This commit is contained in:

committed by
Havoc Pennington

parent
29a86695d1
commit
245c9c2d7e
@ -1,5 +1,8 @@
|
||||
|
||||
INCLUDES=@METACITY_WINDOW_DEMO_CFLAGS@ @METACITY_MESSAGE_CFLAGS@
|
||||
icondir=$(pkgdatadir)/icons
|
||||
icon_DATA=metacity-window-demo.png
|
||||
|
||||
INCLUDES=@METACITY_WINDOW_DEMO_CFLAGS@ @METACITY_MESSAGE_CFLAGS@ -DMETACITY_ICON_DIR=\"$(pkgdatadir)/icons\"
|
||||
|
||||
metacity_message_SOURCES= \
|
||||
metacity-message.c
|
||||
|
@ -153,8 +153,29 @@ set_gtk_window_type (GtkWindow *window,
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GList *list;
|
||||
GdkPixbuf *pixbuf;
|
||||
GError *err;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
|
||||
err = NULL;
|
||||
pixbuf = gdk_pixbuf_new_from_file (METACITY_ICON_DIR"/metacity-window-demo.png",
|
||||
&err);
|
||||
if (pixbuf)
|
||||
{
|
||||
list = g_list_prepend (NULL, pixbuf);
|
||||
|
||||
gtk_window_set_default_icon_list (list);
|
||||
g_list_free (list);
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_printerr ("Could not load icon: %s\n", err->message);
|
||||
g_error_free (err);
|
||||
}
|
||||
|
||||
do_appwindow ();
|
||||
|
||||
gtk_main ();
|
||||
|
BIN
src/tools/metacity-window-demo.png
Normal file
BIN
src/tools/metacity-window-demo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
Reference in New Issue
Block a user