Quick hack to the panel.




This is just a diff for a quick hack that we just tried in the panel,
per the suggestion of somebody today in the list (sorry, dont remember
the name) we got very cool results :-).  Thanks to Federico for
remembering all of Imlib's parameters by hearth.

Just replace with the name of the image you want (we will add
something configurable, nice, and in dialog boxes for this later)

Miguel.

Index: panel-widget.c
===================================================================
RCS file: /debian/home/gnomecvs/gnome-core/panel/panel-widget.c,v
retrieving revision 1.68
diff -u -u -r1.68 panel-widget.c
--- panel-widget.c	1998/04/20 08:39:53	1.68
+++ panel-widget.c	1998/04/22 06:17:43
@@ -1390,13 +1390,31 @@
 	gtk_container_add(GTK_CONTAINER(panel),panel->table);
 	gtk_widget_show(panel->table);
 
+	gtk_widget_push_visual (gdk_imlib_get_visual ());
+	gtk_widget_push_colormap (gdk_imlib_get_colormap ());
 	panel->fixed = gtk_fixed_new();
+	gtk_widget_pop_colormap ();
+	gtk_widget_pop_visual ();
+	
 	gtk_table_attach(GTK_TABLE(panel->table),panel->fixed,1,2,1,2,
 			 GTK_FILL|GTK_EXPAND|GTK_SHRINK,
 			 GTK_FILL|GTK_EXPAND|GTK_SHRINK,
 			 0,0);
 	gtk_widget_show(panel->fixed);
-
+	gtk_widget_realize (panel->fixed);
+	
+	{
+		GdkImlibImage *im;
+		GdkPixmap *p;
+		
+		im = gdk_imlib_load_image ("/z/miguel/capture10.jpg");
+		gdk_imlib_render (im, im->rgb_width, im->rgb_height);
+		p = gdk_imlib_move_image (im);
+		gdk_window_set_back_pixmap (panel->fixed->window, p, 0);
+		gdk_imlib_free_pixmap (p);
+		gdk_imlib_destroy_image (im);
+	}
+	
 	/*we add all the hide buttons to the table here*/
 	/*EAST*/
 	panel->hidebutton_e=gtk_button_new();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]