Move the tooltip to the left of the buddylist if there's not enough room to show it on the right.

Wed, 12 Mar 2008 20:42:59 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Wed, 12 Mar 2008 20:42:59 +0000
changeset 22579
a84da60f3748
parent 22578
41062d9c2b43
child 22611
8aa4145cd3b9

Move the tooltip to the left of the buddylist if there's not enough room to show it on the right.

ChangeLog file | annotate | diff | comparison | revisions
finch/gntblist.c file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Mar 08 01:07:04 2008 +0000
+++ b/ChangeLog	Wed Mar 12 20:42:59 2008 +0000
@@ -24,6 +24,8 @@
 	* Fix compiling with Glib older than 2.6
 	* Ensure existing conversations selected from the 'Send IM' dialog are
 	  given focus
+	* Move the tooltip on the left of the buddylist if there's not enough room
+	  on the right to show it.
 
 version 2.4.0 (02/29/2008):
 	http://developer.pidgin.im/query?status=closed&milestone=2.4.0
--- a/finch/gntblist.c	Sat Mar 08 01:07:04 2008 +0000
+++ b/finch/gntblist.c	Wed Mar 12 20:42:59 2008 +0000
@@ -1742,6 +1742,8 @@
 	gnt_text_view_set_flag(GNT_TEXT_VIEW(tv), GNT_TEXT_VIEW_NO_SCROLL);
 	gnt_box_add_widget(GNT_BOX(box), tv);
 
+	if (x + w >= getmaxx(stdscr))
+		x -= w + width + 2;
 	gnt_widget_set_position(box, x, y);
 	GNT_WIDGET_UNSET_FLAGS(box, GNT_WIDGET_CAN_TAKE_FOCUS);
 	GNT_WIDGET_SET_FLAGS(box, GNT_WIDGET_TRANSIENT);

mercurial