comparison 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
comparison
equal deleted inserted replaced
13942:b14fdab68eac 13943:25be562aaca8
398 } 398 }
399 else if (buffer[1] == 0) 399 else if (buffer[1] == 0)
400 { 400 {
401 mode = GNT_KP_MODE_NORMAL; 401 mode = GNT_KP_MODE_NORMAL;
402 changed = TRUE; 402 changed = TRUE;
403 gnt_widget_draw(widget);
403 } 404 }
404 405
405 if (changed) 406 if (changed)
406 { 407 {
407 GntNode *node = g_hash_table_lookup(nodes, widget); 408 GntNode *node = g_hash_table_lookup(nodes, widget);
469 } 470 }
470 } 471 }
471 472
472 if (changed) 473 if (changed)
473 { 474 {
474 GntNode *node = g_hash_table_lookup(nodes, widget); 475 gnt_screen_resize_widget(widget, width, height);
475 int x, y;
476
477 gnt_widget_get_position(widget, &x, &y);
478
479 hide_panel(node->panel);
480 gnt_widget_set_size(widget, width, height);
481 gnt_widget_set_position(widget, x, y);
482 gnt_widget_draw(widget);
483 replace_panel(node->panel, widget->window);
484 show_panel(node->panel);
485 update_panels();
486 doupdate();
487 } 476 }
488 } 477 }
489 } 478 }
490 479
491 refresh(); 480 refresh();
671 gboolean gnt_ascii_only() 660 gboolean gnt_ascii_only()
672 { 661 {
673 return ascii_only; 662 return ascii_only;
674 } 663 }
675 664
665 void gnt_screen_resize_widget(GntWidget *widget, int width, int height)
666 {
667 if (widget->parent == NULL)
668 {
669 GntNode *node = g_hash_table_lookup(nodes, widget);
670 if (!node)
671 return;
672
673 hide_panel(node->panel);
674 gnt_widget_set_size(widget, width, height);
675 gnt_widget_draw(widget);
676 replace_panel(node->panel, widget->window);
677 show_panel(node->panel);
678 update_panels();
679 doupdate();
680 }
681 }
682