Mercurial > pidgin
diff console/libgnt/gntmain.c @ 13943:25be562aaca8
[gaim-migrate @ 16480]
New widget GntLine to use as a separator.
A partial dialog for add-account callback. Updating the dialog
as a result of selection-change in the prpl dropdown is way ickier
than I had expected it to be. It 'works' now, but quite a bit
quirky. I will try to smooth things up later, perhaps next week.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 10 Jul 2006 23:55:24 +0000 |
parents | ef0d515b9f97 |
children | 841a5ffbfee4 |
line wrap: on
line diff
--- a/console/libgnt/gntmain.c Mon Jul 10 18:08:11 2006 +0000 +++ b/console/libgnt/gntmain.c Mon Jul 10 23:55:24 2006 +0000 @@ -400,6 +400,7 @@ { mode = GNT_KP_MODE_NORMAL; changed = TRUE; + gnt_widget_draw(widget); } if (changed) @@ -471,19 +472,7 @@ if (changed) { - GntNode *node = g_hash_table_lookup(nodes, widget); - int x, y; - - gnt_widget_get_position(widget, &x, &y); - - hide_panel(node->panel); - gnt_widget_set_size(widget, width, height); - gnt_widget_set_position(widget, x, y); - gnt_widget_draw(widget); - replace_panel(node->panel, widget->window); - show_panel(node->panel); - update_panels(); - doupdate(); + gnt_screen_resize_widget(widget, width, height); } } } @@ -673,3 +662,21 @@ return ascii_only; } +void gnt_screen_resize_widget(GntWidget *widget, int width, int height) +{ + if (widget->parent == NULL) + { + GntNode *node = g_hash_table_lookup(nodes, widget); + if (!node) + return; + + hide_panel(node->panel); + gnt_widget_set_size(widget, width, height); + gnt_widget_draw(widget); + replace_panel(node->panel, widget->window); + show_panel(node->panel); + update_panels(); + doupdate(); + } +} +