From: <sa...@us...> - 2006-11-07 02:59:40
|
Revision: 17691 http://svn.sourceforge.net/gaim/?rev=17691&view=rev Author: sadrul Date: 2006-11-06 18:59:24 -0800 (Mon, 06 Nov 2006) Log Message: ----------- Change some minor stuff. This should get rid of the blinking in the buddylist (and the tooltip) when a new account signs on. This just might get rid of some crashes too. Modified Paths: -------------- trunk/console/gntblist.c trunk/console/libgnt/gntwidget.c Modified: trunk/console/gntblist.c =================================================================== --- trunk/console/gntblist.c 2006-11-07 02:53:42 UTC (rev 17690) +++ trunk/console/gntblist.c 2006-11-07 02:59:24 UTC (rev 17691) @@ -1163,7 +1163,8 @@ widget = ggblist->tree; tree = GNT_TREE(widget); - if (!gnt_widget_has_focus(ggblist->tree)) + if (!gnt_widget_has_focus(ggblist->tree) || + (ggblist->context && !GNT_WIDGET_IS_FLAG_SET(ggblist->context, GNT_WIDGET_INVISIBLE))) return; if (ggblist->tooltip) @@ -1183,8 +1184,12 @@ GaimBuddy *pr = gaim_contact_get_priority_buddy((GaimContact*)node); gboolean offline = !GAIM_BUDDY_IS_ONLINE(pr); gboolean showoffline = gaim_prefs_get_bool(PREF_ROOT "/showoffline"); + const char *alias = gaim_contact_get_alias((GaimContact*)node); + const char *name = gaim_buddy_get_name(pr); - title = g_strdup(gaim_contact_get_alias((GaimContact*)node)); + title = g_strdup(alias); + if (g_utf8_collate(alias, name)) + g_string_append_printf(str, _("Nickname: %s\n"), gaim_buddy_get_name(pr)); tooltip_for_buddy(pr, str); for (node = node->child; node; node = node->next) { if (offline) { @@ -1887,7 +1892,7 @@ } static void -send_im_select(void) +send_im_select(GntMenuItem *item, gpointer n) { GaimRequestFields *fields; GaimRequestFieldGroup *group; Modified: trunk/console/libgnt/gntwidget.c =================================================================== --- trunk/console/libgnt/gntwidget.c 2006-11-07 02:53:42 UTC (rev 17690) +++ trunk/console/libgnt/gntwidget.c 2006-11-07 02:59:24 UTC (rev 17691) @@ -303,11 +303,8 @@ void gnt_widget_show(GntWidget *widget) { - /* Draw the widget and take focus */ - /*if (GNT_WIDGET_FLAGS(widget) & GNT_WIDGET_CAN_TAKE_FOCUS) {*/ - /*gnt_widget_take_focus(widget);*/ - /*}*/ gnt_widget_draw(widget); + gnt_screen_occupy(widget); } void @@ -324,39 +321,38 @@ if (widget->window == NULL) { + int x, y, maxx, maxy, w, h; gboolean shadow = TRUE; if (!gnt_widget_has_shadow(widget)) shadow = FALSE; - widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow, - widget->priv.y, widget->priv.x); - if (widget->window == NULL) /* The size is probably too large for the screen */ - { - int x = widget->priv.x, y = widget->priv.y; - int w = widget->priv.width + shadow, h = widget->priv.height + shadow; - int maxx, maxy; /* Max-X is cool */ + x = widget->priv.x; + y = widget->priv.y; + w = widget->priv.width + shadow; + h = widget->priv.height + shadow; - getmaxyx(stdscr, maxy, maxx); + getmaxyx(stdscr, maxy, maxx); + maxy -= 1; /* room for the taskbar */ - if (x + w >= maxx) - x = MAX(0, maxx - w); - if (y + h >= maxy) - y = MAX(0, maxy - h); + x = MAX(0, x); + y = MAX(0, y); + if (x + w >= maxx) + x = MAX(0, maxx - w); + if (y + h >= maxy) + y = MAX(0, maxy - h); - w = MIN(w, maxx); - h = MIN(h, maxy); + w = MIN(w, maxx); + h = MIN(h, maxy); - widget->priv.x = x; - widget->priv.y = y; - widget->priv.width = w - shadow; - widget->priv.height = h - shadow; + widget->priv.x = x; + widget->priv.y = y; + widget->priv.width = w - shadow; + widget->priv.height = h - shadow; - widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow, - widget->priv.y, widget->priv.x); - } + widget->window = newwin(widget->priv.height + shadow, widget->priv.width + shadow, + widget->priv.y, widget->priv.x); init_widget(widget); - gnt_screen_occupy(widget); } g_signal_emit(widget, signals[SIG_DRAW], 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |