# HG changeset patch # User Sadrul Habib Chowdhury # Date 1162963358 0 # Node ID 94c69d2efae5b3974a25921c3a9c3ef376061b6d # Parent d7732681329bfb32e90dd1bae4027993bead6955 [gaim-migrate @ 17704] Fix some weird cases where the widgets are packed incorrectly in a box. committer: Tailor Script diff -r d7732681329b -r 94c69d2efae5 console/libgnt/gntwidget.c --- a/console/libgnt/gntwidget.c Wed Nov 08 05:19:21 2006 +0000 +++ b/console/libgnt/gntwidget.c Wed Nov 08 05:22:38 2006 +0000 @@ -322,6 +322,7 @@ if (widget->window == NULL) { int x, y, maxx, maxy, w, h; + int oldw, oldh; gboolean shadow = TRUE; if (!gnt_widget_has_shadow(widget)) @@ -329,8 +330,8 @@ x = widget->priv.x; y = widget->priv.y; - w = widget->priv.width + shadow; - h = widget->priv.height + shadow; + w = oldw = widget->priv.width + shadow; + h = oldh = widget->priv.height + shadow; getmaxyx(stdscr, maxy, maxx); maxy -= 1; /* room for the taskbar */ @@ -347,8 +348,11 @@ widget->priv.x = x; widget->priv.y = y; - widget->priv.width = w - shadow; - widget->priv.height = h - shadow; + if (w != oldw || h != oldh) { + widget->priv.width = w - shadow; + widget->priv.height = h - shadow; + g_signal_emit(widget, signals[SIG_SIZE_CHANGED], 0, oldw, oldh); + } widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow, widget->priv.y, widget->priv.x);