Revision e9973f012677001d8985f127d5fe0922e4bc3a54

evands at pidgin.im evands at pidgin.im
Tue Mar 27 00:39:40 EDT 2007


o     -----------------------------------------------------------------
|\    Revision: e9973f012677001d8985f127d5fe0922e4bc3a54
| |   Ancestor: 94ae02f3a29e8da49d90cf447907e2c07735c9cd
| |   Ancestor: eba6bc129722d75a6ff3126b9c9834aadf296a63
| |   Author: evands at pidgin.im
| |   Date: 2007-03-27T04:34:02
| |   Branch: im.pidgin.pidgin
| |   
| |   Modified files:
| |           finch/libgnt/gntbox.c finch/libgnt/gntwidget.c
| |           libpurple/nat-pmp.c
| |   
| |   ChangeLog: 
| |   
| |   merge of '94ae02f3a29e8da49d90cf447907e2c07735c9cd'
| |        and 'eba6bc129722d75a6ff3126b9c9834aadf296a63'
| |   
| |   ============================================================
| |   --- libpurple/nat-pmp.c	1b6d5102afaebd88f9a17983cdc37b21c36ac1e2
| |   +++ libpurple/nat-pmp.c	0cc6b65d22e43ee71a150d303771e55a580a794a
| |   @@ -49,7 +49,7 @@
| |    #include <sys/types.h>
| |    #include <net/if.h>
| |    
| |   -#ifdef NET_RT_DUMP2
| |   +#ifdef NET_RT_DUMP
| |    
| |    #define PMP_DEBUG	1
| |    
| |   @@ -148,7 +148,7 @@ default_gw()
| |    	int mib[6];
| |        size_t needed;
| |        char *buf, *next, *lim;
| |   -    struct rt_msghdr2 *rtm;
| |   +    struct rt_msghdr *rtm;
| |        struct sockaddr *sa;
| |    	struct sockaddr_in *sin = NULL;
| |    	gboolean found = FALSE;
| |   @@ -157,7 +157,7 @@ default_gw()
| |        mib[1] = PF_ROUTE; /* entire routing table or a subset of it */
| |        mib[2] = 0; /* protocol number - always 0 */
| |        mib[3] = 0; /* address family - 0 for all addres families */
| |   -    mib[4] = NET_RT_DUMP2;
| |   +    mib[4] = NET_RT_DUMP;
| |        mib[5] = 0;
| |    
| |    	/* Determine the buffer side needed to get the full routing table */
| |   @@ -184,7 +184,7 @@ default_gw()
| |    
| |        for (next = buf; next < lim; next += rtm->rtm_msglen) 
| |    	{
| |   -		rtm = (struct rt_msghdr2 *)next;
| |   +		rtm = (struct rt_msghdr *)next;
| |    		sa = (struct sockaddr *)(rtm + 1);
| |    		
| |    		if (sa->sa_family == AF_INET) 
| |   @@ -458,7 +458,7 @@ purple_pmp_destroy_map(PurplePmpType typ
| |    
| |    	return success;
| |    }
| |   -#else /* #ifdef NET_RT_DUMP2 */
| |   +#else /* #ifdef NET_RT_DUMP */
| |    char *
| |    purple_pmp_get_public_ip()
| |    {
| |   @@ -476,4 +476,4 @@ purple_pmp_destroy_map(PurplePmpType typ
| |    {
| |    	return FALSE;
| |    }
| |   +#endif /* #ifndef NET_RT_DUMP */
| |   -#endif /* #ifndef NET_RT_DUMP2 */
| |   ============================================================
| |   --- finch/libgnt/gntbox.c	8d537d98512519f9b3043f2a0cacd240d7e127cb
| |   +++ finch/libgnt/gntbox.c	dc9cc0d4b8f61eafc7517066238e9d5d8e527a4a
| |   @@ -352,11 +352,6 @@ gnt_box_confirm_size(GntWidget *widget, 
| |    	GntBox *box = GNT_BOX(widget);
| |    	int wchange, hchange;
| |    
| |   -	if (widget->priv.width != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
| |   -		return FALSE;
| |   -	if (widget->priv.height != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
| |   -		return FALSE;
| |   -
| |    	if (!box->list)
| |    		return TRUE;
| |    
| |   @@ -387,13 +382,21 @@ gnt_box_confirm_size(GntWidget *widget, 
| |    				gnt_widget_get_size(GNT_WIDGET(i->data), &tw, &th);
| |    				if (box->vertical)
| |    				{
| |   -					if (!gnt_widget_confirm_size(i->data, tw - wchange, th))
| |   -						return FALSE;
| |   +					if (!gnt_widget_confirm_size(i->data, tw - wchange, th)) {
| |   +						/* If we are decreasing the size and the widget is going
| |   +						 * to be too large to fit into the box, then do not allow
| |   +						 * resizing. */
| |   +						if (wchange > 0 && tw >= widget->priv.width)
| |   +							return FALSE;
| |   +					}
| |    				}
| |    				else
| |    				{
| |   -					if (!gnt_widget_confirm_size(i->data, tw, th - hchange))
| |   +					if (!gnt_widget_confirm_size(i->data, tw, th - hchange)) {
| |   +						if (hchange > 0 && th >= widget->priv.height)
| |   +							return FALSE;
| |    						return FALSE;
| |   +					}
| |    				}
| |    			}
| |    #if 0
| |   @@ -562,17 +565,6 @@ void gnt_box_add_widget(GntBox *b, GntWi
| |    {
| |    	b->list = g_list_append(b->list, widget);
| |    	widget->parent = GNT_WIDGET(b);
| |   -
| |   -	if (b->vertical)
| |   -	{
| |   -		if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
| |   -			GNT_WIDGET_UNSET_FLAGS(GNT_WIDGET(b), GNT_WIDGET_GROW_X);
| |   -	}
| |   -	else
| |   -	{
| |   -		if (!GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
| |   -			GNT_WIDGET_UNSET_FLAGS(GNT_WIDGET(b), GNT_WIDGET_GROW_Y);
| |   -	}
| |    }
| |    
| |    void gnt_box_set_title(GntBox *b, const char *title)
| |   ============================================================
| |   --- finch/libgnt/gntwidget.c	858cfe29a2cd8af5f1802b83ae7dc32bdc6eefee
| |   +++ finch/libgnt/gntwidget.c	decb2af4f62f04ce59969945c68c9bd9ca1bcf0e
| |   @@ -75,11 +75,13 @@ gnt_widget_dummy_confirm_size(GntWidget 
| |    static gboolean
| |    gnt_widget_dummy_confirm_size(GntWidget *widget, int width, int height)
| |    {
| |   +	gboolean shadow;
| |    	if (width < widget->priv.minw || height < widget->priv.minh)
| |    		return FALSE;
| |   -	if (widget->priv.width != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
| |   +	shadow = gnt_widget_has_shadow(widget);
| |   +	if (widget->priv.width + shadow != width && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X))
| |    		return FALSE;
| |   -	if (widget->priv.height != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
| |   +	if (widget->priv.height + shadow != height && !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y))
| |    		return FALSE;
| |    	return TRUE;
| |    }

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from e9973f012677001d8985f127d5fe0922e4bc3a54


More information about the Commits mailing list