All pastes #44096 Raw Edit

kikidonk

public text v1 · immutable
#44096 ·published 2006-03-01 14:14 UTC
rendered paste body
--- ../gnome/epiphany/lib/widgets/ephy-icon-entry.c	2005-08-07 22:31:32.000000000 +0200+++ deskbar/iconentry/ephy-icon-entry.c	2005-11-04 16:16:03.000000000 +0100@@ -24,10 +24,12 @@  *  See the ChangeLog in the gtk+ distribution files for a list of changes.  *  These files are distributed with GTK+ at ftp://ftp.gtk.org/pub/gtk/.   *- *  $Id: ephy-icon-entry.c,v 1.4 2005/08/07 20:31:32 chpe Exp $+ *  $Id: ephy-icon-entry.c,v 1.3 2005/11/04 15:16:03 rslinckx Exp $  */ +#ifndef COMPILING_TESTICONENTRY #include "config.h"+#endif  #include "ephy-icon-entry.h" @@ -144,6 +146,8 @@  	GTK_WIDGET_UNSET_FLAGS (widget, GTK_NO_WINDOW); +	gtk_container_set_border_width (GTK_CONTAINER (entry), 0);+ 	priv->hbox = gtk_hbox_new (FALSE, /* FIXME */ 0); 	gtk_container_add (GTK_CONTAINER (entry), priv->hbox); @@ -228,6 +232,7 @@ 	GtkContainer *container = GTK_CONTAINER (widget); 	GtkBin *bin = GTK_BIN (widget); 	GtkAllocation child_allocation;+	GtkRequisition requisition; 	int xborder, yborder;  	widget->allocation = *allocation;@@ -248,11 +253,22 @@ 					child_allocation.height); 	}   +	gtk_widget_get_child_requisition (widget, &requisition);+ 	child_allocation.x = container->border_width + xborder;-	child_allocation.y = container->border_width + yborder;+	child_allocation.y = container->border_width + yborder +			     + (widget->allocation.height - requisition.height) / 2; 	child_allocation.width = MAX (allocation->width - (container->border_width + xborder) * 2, 0); 	child_allocation.height = MAX (allocation->height - (container->border_width + yborder) * 2, 0); +	/* We have to set the size requisition on the GtkEntry explicitly,+	 * since otherwise it'll end up too tall if someone uses+	 * gtk_widget_set_size_request on this EphyIconEntry,+	 * because gtk_entry_size_allocate checks its size with+	 * gtk_widget_get_child_requisition.+	 */+	gtk_widget_set_size_request (entry->entry, -1, child_allocation.height);+ 	gtk_widget_size_allocate (bin->child, &child_allocation); }