Index: pixmaps/16x16/apps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: pixmaps/16x16/apps/ekiga.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: pixmaps/ekiga_logo_16x16.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: pixmaps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: pixmaps/22x22/apps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: pixmaps/22x22/apps/ekiga.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: pixmaps/ekiga_logo_22x22.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: pixmaps/48x48/apps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: pixmaps/48x48/apps/ekiga.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: pixmaps/ekiga_logo_48x48.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: pixmaps/32x32/apps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: pixmaps/32x32/apps/ekiga.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: pixmaps/ekiga_logo_32x32.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = image/png
Index: pixmaps/72x72/apps/ekiga.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: pixmaps/72x72/apps/ekiga.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Index: pixmaps/Makefile.am
===================================================================
--- pixmaps/Makefile.am	(revision 5215)
+++ pixmaps/Makefile.am	(working copy)
@@ -1,6 +1,11 @@
-pixmapdir = $(datadir)/pixmaps/@PACKAGE_NAME@
+icondir = $(datadir)/icons/hicolor
 
-pixmap_DATA = @PACKAGE_NAME@-logo.png @PACKAGE_NAME@.png
+nobase_dist_icon_DATA = \
+	16x16/apps/@PACKAGE_NAME@.png \
+	22x22/apps/@PACKAGE_NAME@.png \
+	32x32/apps/@PACKAGE_NAME@.png \
+	48x48/apps/@PACKAGE_NAME@.png \
+	72x72/apps/@PACKAGE_NAME@.png
 
 
 EMOTICONS_FILES = \
@@ -33,8 +38,6 @@
 	emoticon-sad-nose-glasses.png 
 
 IMAGES_FILES= \
-	ekiga_logo_16x16.png \
-	ekiga_logo_48x48.png \
 	addressbook.png \
 	audio-volume-high.png \
 	color-brightness-contrast.png \
@@ -76,8 +79,11 @@
 
 
 IMAGES= \
-	gm_logo_small_stock_data $(srcdir)/ekiga_logo_16x16.png \
-	gm_logo_large_stock_data $(srcdir)/ekiga_logo_48x48.png \
+	gm_logo_16_stock_data $(srcdir)/16x16/apps/@PACKAGE_NAME@.png \
+	gm_logo_22_stock_data $(srcdir)/22x22/apps/@PACKAGE_NAME@.png \
+	gm_logo_32_stock_data $(srcdir)/32x32/apps/@PACKAGE_NAME@.png \
+	gm_logo_48_stock_data $(srcdir)/48x48/apps/@PACKAGE_NAME@.png \
+	gm_logo_72_stock_data $(srcdir)/72x72/apps/@PACKAGE_NAME@.png \
 	gm_addressbook_stock_data $(srcdir)/addressbook.png \
 	gm_audio_volume_high_stock_data $(srcdir)/audio-volume-high.png \
 	gm_color_brightness_contrast_stock_data $(srcdir)/color-brightness-contrast.png \
@@ -151,10 +157,26 @@
 
 noinst_DATA = inlines.h inline_emoticons.h
 
-EXTRA_DIST= $(pixmap_DATA) $(EMOTICONS_FILES) $(IMAGES_FILES) gm_both_incrusted_frame.xpm text_logo.xpm 
+EXTRA_DIST= $(EMOTICONS_FILES) $(IMAGES_FILES) gm_both_incrusted_frame.xpm 
 
-inlines.h: $(IMAGE_FILES) Makefile.am
+inlines.h: $(IMAGE_FILES) $(nobase_dist_icon_DATA) Makefile.am
 	gdk-pixbuf-csource --raw --build-list $(IMAGES) > inlines.h
 
 inline_emoticons.h: $(EMOTICONS_FILES) Makefile.am
 	gdk-pixbuf-csource --raw --build-list $(EMOTICONS) > inline_emoticons.h
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+
+uninstall-hook: update-icon-cache
+
+update-icon-cache:
+	@-if test -z "$(DESTDIR)"; then \
+		echo "Updating Gtk icon cache."; \
+		$(gtk_update_icon_cache); \
+	else \
+		echo "*** Icon cache not updated.  After (un)install, run this:"; \
+		echo "***   $(gtk_update_icon_cache)"; \
+	fi
+
Index: src/devices/fakevideoinput.cpp
===================================================================
--- src/devices/fakevideoinput.cpp	(revision 5215)
+++ src/devices/fakevideoinput.cpp	(working copy)
@@ -45,10 +45,10 @@
 #include "misc.h"
 #include "gmconf.h"
 
-#include "../pixmaps/text_logo.xpm"
-
 #include <ptlib/vconvert.h>
 
+#define DEFAULT_ICON_SIZE 72
+
 PVideoInputDevice_Picture::PVideoInputDevice_Picture ()
 {
   orig_pix = NULL;
@@ -74,6 +74,7 @@
 				 BOOL start_immediate)
 {
   gchar *image_name = NULL;
+  GdkPixbuf *icon = NULL;
     
   if (IsOpen ())
     return FALSE;
@@ -81,8 +82,21 @@
   if (name == "MovingLogo") {
   
     moving = true;
-    orig_pix = gdk_pixbuf_new_from_xpm_data ((const char **) text_logo_xpm);
+    icon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+                                     PACKAGE_NAME, DEFAULT_ICON_SIZE,
+                                     GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+    if (icon != NULL) {
     
+      /* Transparency color is white */
+      orig_pix = gdk_pixbuf_composite_color_simple (icon, DEFAULT_ICON_SIZE,
+                                                    DEFAULT_ICON_SIZE, 
+                                                    GDK_INTERP_BILINEAR,
+                                                    255, 1, 0xFFFFFFFF,
+                                                    0xFFFFFFFF);
+      g_object_unref (icon);
+      icon = NULL;
+    }
+  
     return TRUE;
   }
   else {
@@ -102,9 +116,24 @@
     orig_pix = gdk_pixbuf_new_from_file (image_name, NULL);
     g_free (image_name);
     
-    if (!orig_pix)
-      orig_pix = gdk_pixbuf_new_from_xpm_data ((const char **) text_logo_xpm);
+    if (!orig_pix) {
 
+      icon = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+                                       PACKAGE_NAME, DEFAULT_ICON_SIZE,
+                                       GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
+      if (icon != NULL) {
+
+        /* Transparency color is white */
+        orig_pix = gdk_pixbuf_composite_color_simple (icon, DEFAULT_ICON_SIZE,
+                                                      DEFAULT_ICON_SIZE, 
+                                                      GDK_INTERP_BILINEAR,
+                                                      255, 1, 0xFFFFFFFF,
+                                                      0xFFFFFFFF);
+        g_object_unref (icon);
+        icon = NULL;
+      }
+    }
+
     if (orig_pix) 
       return TRUE;
 
Index: src/endpoints/ekiga.cpp
===================================================================
--- src/endpoints/ekiga.cpp	(revision 5215)
+++ src/endpoints/ekiga.cpp	(working copy)
@@ -522,6 +522,7 @@
   gnomemeeting_stock_icons_init ();
   
   /* Build the GUI */
+  gtk_window_set_default_icon_name (GM_STOCK_LOGO);
   pc2phone_window = gm_pc2phone_window_new ();  
   prefs_window = gm_prefs_window_new ();  
   history_window = gm_history_window_new ();
Index: src/gui/tools.cpp
===================================================================
--- src/gui/tools.cpp	(revision 5215)
+++ src/gui/tools.cpp	(working copy)
@@ -286,8 +286,6 @@
   GtkWidget *vbox = NULL;
   GtkWidget *subsection = NULL;
 
-  GdkPixbuf *pixbuf = NULL;
-
   gchar *txt = NULL;
   
 
@@ -311,11 +309,6 @@
   
   gtk_window_set_title (GTK_WINDOW (window), _("PC-To-Phone Settings"));
   gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
-  pixbuf = gtk_widget_render_icon (GTK_WIDGET (window),
-				   GM_STOCK_LOGO_SMALL,
-				   GTK_ICON_SIZE_MENU, NULL);
-  gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
-  g_object_unref (pixbuf);
 
 
   /* Introduction label */
Index: src/gui/history.cpp
===================================================================
--- src/gui/history.cpp	(revision 5215)
+++ src/gui/history.cpp	(working copy)
@@ -112,7 +112,6 @@
 {
   GmHistoryWindow *hw = NULL;
   
-  GdkPixbuf *pixbuf = NULL;
   GtkWidget *window = NULL;
   GtkWidget *scr = NULL;
 
@@ -126,11 +125,6 @@
 			  g_strdup ("log_window"), g_free);
   
   gtk_window_set_title (GTK_WINDOW (window), _("General History"));
-  pixbuf = gtk_widget_render_icon (GTK_WIDGET (window),
-				   GM_STOCK_LOGO_SMALL,
-				   GTK_ICON_SIZE_MENU, NULL);
-  gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
-  g_object_unref (pixbuf);
 
   gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
   
Index: src/gui/druid.cpp
===================================================================
--- src/gui/druid.cpp	(revision 5215)
+++ src/gui/druid.cpp	(working copy)
@@ -2014,19 +2014,11 @@
   GtkWidget *window = NULL;
   GmDruidWindow *dw = NULL;
 
-  GdkPixbuf *pixbuf = NULL;
-
   
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   g_object_set_data_full (G_OBJECT (window), "window_name",
 			  g_strdup ("druid_window"), g_free); 
   
-  pixbuf = gtk_widget_render_icon (GTK_WIDGET (window),
-				   GM_STOCK_LOGO_SMALL,
-				   GTK_ICON_SIZE_MENU, NULL);
-  gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
-  g_object_unref (pixbuf);
-
   gtk_window_set_title (GTK_WINDOW (window), 
 			_("First Time Configuration Assistant"));
   gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
Index: src/gui/chat.cpp
===================================================================
--- src/gui/chat.cpp	(revision 5215)
+++ src/gui/chat.cpp	(working copy)
@@ -1310,8 +1310,6 @@
 GtkWidget *
 gm_text_chat_window_new ()
 {
-  GdkPixbuf *pixbuf = NULL;
-  
   GtkWidget *chat_window = NULL;
   GtkWidget *vbox = NULL;
   
@@ -1324,12 +1322,6 @@
   
   gtk_window_set_title (GTK_WINDOW (chat_window), _("Chat Window"));
 
-  pixbuf = gtk_widget_render_icon (GTK_WIDGET (chat_window),
-				   GM_STOCK_LOGO_SMALL,
-				   GTK_ICON_SIZE_MENU, NULL);
-  gtk_window_set_icon (GTK_WINDOW (chat_window), pixbuf);
-  g_object_unref (pixbuf);
-
   gtk_window_set_position (GTK_WINDOW (chat_window), GTK_WIN_POS_CENTER);
 
   /* Set the internal data */
Index: src/gui/callbacks.cpp
===================================================================
--- src/gui/callbacks.cpp	(revision 5215)
+++ src/gui/callbacks.cpp	(working copy)
@@ -51,6 +51,7 @@
 #include "gmdialog.h"
 #include "gmconnectbutton.h"
 #include "gmmenuaddon.h"
+#include "gmstockicons.h"
 
 #ifdef WIN32
 #include "platform/winpaths.h"
@@ -205,9 +206,7 @@
 		"documenters", documenters,
 		"translator-credits", translator_credits,
 		"comments", comments,
-#ifndef WIN32                 
-		"logo-icon-name", PACKAGE_NAME,
-#endif                
+		"logo-icon-name", GM_STOCK_LOGO,
 		"license", license,
 		"wrap-license", TRUE,
 		"website", "http://www.ekiga.org",
Index: src/gui/main.cpp
===================================================================
--- src/gui/main.cpp	(revision 5215)
+++ src/gui/main.cpp	(working copy)
@@ -70,8 +70,6 @@
 #include "base/gm-plugin-manager.h"
 #include "platform/gm-platform.h"
 
-#include "../pixmaps/text_logo.xpm"
-
 #include <gdk/gdkkeysyms.h>
 
 #ifndef DISABLE_GNOME
@@ -2858,39 +2856,17 @@
 {
   GmWindow *mw = NULL;
 
-  GdkPixbuf *text_logo_pix = NULL;
-  GdkPixbuf *pic = NULL;
-
-  int width = 0;
-  int height = 0;
-
   g_return_if_fail (main_window != NULL);
 
   mw = gm_mw_get_mw (main_window);
 
-  text_logo_pix = gdk_pixbuf_new_from_xpm_data ((const char **) text_logo_xpm);
-  width = gdk_pixbuf_get_width (text_logo_pix);
-  height = gdk_pixbuf_get_height (text_logo_pix);
-
-  pic = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
-			GM_QCIF_WIDTH, GM_QCIF_HEIGHT);
-  gdk_pixbuf_fill (pic, 0xFFFFFFFF);  
-
-  gdk_pixbuf_copy_area (text_logo_pix, 0, 0, 
-			width, height,
-			pic, 
-			((GM_QCIF_WIDTH - width) / 2),
-			(GM_QCIF_HEIGHT - height) / 2);
-
-  gtk_image_set_from_pixbuf (GTK_IMAGE (mw->main_video_image),
-			     pic);
-
+  g_object_set (G_OBJECT (mw->main_video_image),
+		"icon-name", GM_STOCK_LOGO,
+		"pixel-size", 72,
+		NULL);
+  
   gtk_widget_set_size_request (GTK_WIDGET (mw->main_video_image),
-                               gdk_pixbuf_get_width (pic),
-                               gdk_pixbuf_get_height (pic));
-
-  g_object_unref (text_logo_pix);
-  g_object_unref (pic);
+                               GM_QCIF_WIDTH, GM_QCIF_HEIGHT);
 }
 
 
@@ -3881,7 +3857,6 @@
   
   GtkWidget *main_toolbar = NULL;
   GtkWidget *uri_toolbar = NULL;
-  GdkPixbuf *pixbuf = NULL;
 
   PanelSection section = DIALPAD;
   guint status = CONTACT_ONLINE;
@@ -4051,16 +4026,7 @@
   g_signal_connect (G_OBJECT (mw->statusbar_ebox), "button-press-event",
 		    GTK_SIGNAL_FUNC (statusbar_clicked_cb), window);
  
-  pixbuf = gtk_widget_render_icon (GTK_WIDGET (window),
-				   GM_STOCK_LOGO_SMALL,
-				   GTK_ICON_SIZE_MENU, NULL);
-
-  if (pixbuf) {
-    gtk_window_set_default_icon (pixbuf);
-    g_object_unref (G_OBJECT (pixbuf));
-  }
-  
-  /* Add the window icon and title */
+  /* Add title */
   gtk_window_set_title (GTK_WINDOW (window), _("Ekiga"));
 
   gtk_widget_realize (window);
Index: lib/gui/gmstockicons.c
===================================================================
--- lib/gui/gmstockicons.c	(revision 5215)
+++ lib/gui/gmstockicons.c	(working copy)
@@ -57,10 +57,8 @@
                 const guint8 *data;
         } GmStockIcon;                
 
-	static GmStockIcon items[] =
+	static const GmStockIcon items[] =
 	{
-	  	{ GM_STOCK_LOGO_SMALL,    gm_logo_small_stock_data },
-		{ GM_STOCK_LOGO_LARGE,    gm_logo_large_stock_data },
 	        { GM_STOCK_ADDRESSBOOK, gm_addressbook_stock_data },
 	        { GM_STOCK_AUDIO_VOLUME_HIGH, gm_audio_volume_high_stock_data },
 	        { GM_STOCK_COLOR_BRIGHTNESS_CONTRAST, gm_color_brightness_contrast_stock_data },
@@ -105,6 +103,23 @@
 		{ GM_STOCK_PHONE_PICK_UP_24, gm_phone_pick_up_stock_data_24},
 	};
 
+        typedef struct 
+        {
+                char *id;
+                gint size;
+                const guint8 *data;
+        } GmThemeIcon;                
+
+	static const GmThemeIcon theme_builtins[] =
+	{
+	        { GM_STOCK_LOGO, 16, gm_logo_16_stock_data },
+	        { GM_STOCK_LOGO, 22, gm_logo_22_stock_data },
+	        { GM_STOCK_LOGO, 32, gm_logo_32_stock_data },
+	        { GM_STOCK_LOGO, 48, gm_logo_48_stock_data },
+	        { GM_STOCK_LOGO, 72, gm_logo_72_stock_data },
+	};
+
+	/* First, register honest-to-goodness custom stock icons */
 	factory = gtk_icon_factory_new ();
 	gtk_icon_factory_add_default (factory);
 
@@ -124,4 +139,18 @@
 	}
 
 	g_object_unref (G_OBJECT (factory));
+	
+	/* Now install theme builtins */
+	for (i = 0; i < (int) G_N_ELEMENTS (theme_builtins); i++)
+	{
+		GdkPixbuf *pixbuf;
+
+		pixbuf = gdk_pixbuf_new_from_inline (-1, theme_builtins[i].data,
+						     FALSE, NULL);
+
+		gtk_icon_theme_add_builtin_icon (theme_builtins[i].id,
+						 theme_builtins[i].size, pixbuf);
+
+		g_object_unref (G_OBJECT (pixbuf));
+	}
 }
Index: lib/gui/gmstockicons.h
===================================================================
--- lib/gui/gmstockicons.h	(revision 5215)
+++ lib/gui/gmstockicons.h	(working copy)
@@ -34,10 +34,14 @@
 #ifndef __GM_STOCK_ICONS_H
 #define __GM_STOCK_ICONS_H
 
+#include "../../config.h"
+
 G_BEGIN_DECLS
 
-#define GM_STOCK_LOGO_SMALL "gm_logo_small_stock"
-#define GM_STOCK_LOGO_LARGE "gm_logo_large_stock"
+/* Icon theme builtins */
+#define GM_STOCK_LOGO                       PACKAGE_NAME
+
+/* True stock icons */
 #define GM_STOCK_ADDRESSBOOK      "gm_addressbook_stock"
 #define GM_STOCK_AUDIO_VOLUME_HIGH "gm_audio_volume_high_stock"
 #define GM_STOCK_COLOR_BRIGHTNESS_CONTRAST   "gm_color_brightness_contrast_stock"
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 5215)
+++ Makefile.am	(working copy)
@@ -1,5 +1,3 @@
-icondir=$(datadir)/pixmaps
-
 ### Don't execute make in the help subdirectory if DISABLE_GNOME is set
 if DISABLE_GNOME
 SUBDIRS = man sounds pixmaps lib src po plugins
@@ -22,9 +20,6 @@
 SCHEMAS_FILE = @PACKAGE_NAME@.schemas
 
 
-### Icon
-icon_DATA = pixmaps/@PACKAGE_NAME@.png
-
 ### Win32 files
 WIN32_DIST = \
 	win32/ico/ekiga.ico					\
