comparison finch/gntblist.c @ 22474:8445ea581a6e

Move the tooltip to the left of the buddylist if there's not enough room to show it on the right.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 12 Mar 2008 20:42:59 +0000
parents b0b8c94118c8
children dd8cdf1d8b19
comparison
equal deleted inserted replaced
22442:49976f4b5005 22474:8445ea581a6e
1740 tv = gnt_text_view_new(); 1740 tv = gnt_text_view_new();
1741 gnt_widget_set_size(tv, w + 1, h); 1741 gnt_widget_set_size(tv, w + 1, h);
1742 gnt_text_view_set_flag(GNT_TEXT_VIEW(tv), GNT_TEXT_VIEW_NO_SCROLL); 1742 gnt_text_view_set_flag(GNT_TEXT_VIEW(tv), GNT_TEXT_VIEW_NO_SCROLL);
1743 gnt_box_add_widget(GNT_BOX(box), tv); 1743 gnt_box_add_widget(GNT_BOX(box), tv);
1744 1744
1745 if (x + w >= getmaxx(stdscr))
1746 x -= w + width + 2;
1745 gnt_widget_set_position(box, x, y); 1747 gnt_widget_set_position(box, x, y);
1746 GNT_WIDGET_UNSET_FLAGS(box, GNT_WIDGET_CAN_TAKE_FOCUS); 1748 GNT_WIDGET_UNSET_FLAGS(box, GNT_WIDGET_CAN_TAKE_FOCUS);
1747 GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_TRANSIENT); 1749 GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_TRANSIENT);
1748 gnt_widget_draw(box); 1750 gnt_widget_draw(box);
1749 1751