Index: charpick.c
===================================================================
--- charpick.c	(revision 10191)
+++ charpick.c	(working copy)
@@ -573,7 +573,40 @@
   return;
 }
 
+static void
+change_background (PanelApplet               *applet,
+		   PanelAppletBackgroundType  type,
+		   GdkColor                  *colour,
+		   GdkPixmap                 *pixmap,
+		   gpointer                  *data)
+{
+    GtkRcStyle *rc_style;
+    GtkStyle *style;
 
+    /* reset style */
+    gtk_widget_set_style (GTK_WIDGET (applet), NULL);
+    rc_style = gtk_rc_style_new ();
+    gtk_widget_modify_style (GTK_WIDGET (applet), rc_style);
+    gtk_rc_style_unref (rc_style);
+
+    switch (type) {
+    case PANEL_NO_BACKGROUND:
+	break;
+    case PANEL_COLOR_BACKGROUND:
+	gtk_widget_modify_bg (GTK_WIDGET (applet),
+			      GTK_STATE_NORMAL, colour);
+	break;
+    case PANEL_PIXMAP_BACKGROUND:
+	style = gtk_style_copy (GTK_WIDGET (applet)->style);
+	if (style->bg_pixmap[GTK_STATE_NORMAL])
+	    g_object_unref (style->bg_pixmap[GTK_STATE_NORMAL]);
+	style->bg_pixmap[GTK_STATE_NORMAL] = g_object_ref (pixmap);
+	gtk_widget_set_style (GTK_WIDGET (applet), style);
+	g_object_unref (style);
+	break;
+    }
+}
+
 static void
 about (BonoboUIComponent *uic,
        charpick_data     *curr_data,
@@ -809,10 +842,13 @@
 
   g_signal_connect (G_OBJECT (applet), "size_allocate",
 		    G_CALLBACK (applet_size_allocate), curr_data);
-		    
+
   g_signal_connect (G_OBJECT (applet), "destroy",
   		    G_CALLBACK (applet_destroy), curr_data);
-  
+
+  g_signal_connect (G_OBJECT (applet), "change_background",
+		    G_CALLBACK (change_background), curr_data);
+
   gtk_widget_show_all (GTK_WIDGET (applet));
   
   panel_applet_setup_menu_from_file (PANEL_APPLET (applet),
@@ -848,7 +884,7 @@
     
 	if (!strcmp (iid, "OAFIID:GNOME_CharpickerApplet"))
 		retval = charpicker_applet_fill (applet); 
-    
+
 	return retval;
 }
 
