void settitle(void) { char bstr[128]; if (edp) { set_lang(syncolors ? filename : ".0"); upd=1; lmax=0; } SetWindowText(ewnd,format_status(bstr,0)); }
static void tgprpl_tooltip_text (PurpleBuddy * buddy, PurpleNotifyUserInfo * info, gboolean full) { debug ("tgprpl_tooltip_text()\n", buddy->name); tgl_peer_id_t *peer = purple_buddy_get_protocol_data(buddy); if (!peer) { purple_notify_user_info_add_pair_plaintext(info, "Status", "Offline"); return; } tgl_peer_t *P = tgl_peer_get (get_conn_from_buddy (buddy)->TLS, *peer); if (!P) { warning ("tgprpl_tooltip_text: warning peer with id %d not found in tree.\n", peer->id); return; } purple_notify_user_info_add_pair_plaintext (info, "Status", format_status(&P->user.status)); purple_notify_user_info_add_pair_plaintext (info, "Last seen: ", format_time(P->user.status.when)); }
/*----------------------------------------------------------------------------*/ void paint_window(HWND hwnd) { PAINTSTRUCT ps ; HFONT hfnt0; HDC hdc; int i,k,n,y,x; //int mm,yy; char bstr[256]; RECT rw, r; SIZE sz; #define MEMDC #ifdef MEMDC HBITMAP bm0,bm; HDC fhdc ; #endif #ifdef MEMDC fhdc = BeginPaint (hwnd, &ps); hdc = CreateCompatibleDC(fhdc); bm = CreateCompatibleBitmap(fhdc,cwx+FRM,cwy+FRM); bm0 = (HBITMAP)SelectObject(hdc,bm); #else hdc = BeginPaint(hwnd,&ps); #endif //goto pe; //fillpaint(&ps.rcPaint, Cbgd, hdc); GetClientRect(hwnd, &rw); paint_back(hdc, &rw, &r); BitBltRect(hdc, hdc_back, &ps.rcPaint); hfnt0 = (HFONT)SelectObject(hdc,hfnt_n); if (0!=synhilite) { memmove (My_Colors, darkcolors ? My_Colors_d : My_Colors_l, sizeof(My_Colors)); } My_Colors[0] = (COLORREF)-1; My_Colors[1] = mStyle.MenuFrame.TextColor; My_Colors[3] = mStyle.MenuHilite.TextColor; if (mStyle.MenuHilite.parentRelative) My_Colors[2] = grey_value (My_Colors[3]) > 128 ? 0x333333 : 0xeeeeee; else My_Colors[2] = mixcolors(&mStyle.MenuHilite); if (edp) { i=ps.rcPaint.top; k=ps.rcPaint.bottom; n=ps.rcPaint.right; i=(i-zy0)/zy; k=(k-zy0+zy-1)/zy; n=(n-zx0+zx-1)/zx; if (i<0) i=0; if (k<0) k=0; if (k>i && n>0) printpage(hdc,n,i,k); BitBlt(hdc, 0, rw.bottom-FRM, rw.right, FRM, hdc_back, 0, rw.bottom-FRM, SRCCOPY); BitBlt(hdc, rw.right-FRM, 0, FRM, rw.bottom, hdc_back, rw.right-FRM, 0, SRCCOPY); } SetTextColor (hdc, mStyle.MenuTitle.TextColor ); SetBkMode (hdc, TRANSPARENT); //SelectObject (hdc, hfnt_sb); SelectObject (hdc, fnt2); format_status(bstr,1); DrawText(hdc, bstr, strlen(bstr), &r, //mStyle.MenuTitle.justify|DT_VCENTER|DT_SINGLELINE DT_LEFT|DT_VCENTER|DT_SINGLELINE ); if (edp==NULL) goto paint_end; if (infomsg[0]) { SetBkColor (hdc, My_Colors[2]); SetTextColor (hdc, My_Colors[3]); SetBkMode (hdc,OPAQUE); SelectObject (hdc, fnt1); sprintf(bstr," %s ",infomsg); n=strlen(bstr); GetTextExtentPoint32 (hdc, bstr, n, &sz); y=cwy-sz.cy; x=cwx-sz.cx; if (x<0) x = 0; TextOut(hdc, x, y, bstr, n); } { StyleItem *pSI = &MenuInfo.Scroller; get_vscr_rect(&rw); MakeGradient_s(hdc, rw, pSI, pSI->bordered ? pSI->borderWidth : 0); } #if 0 if (lmax==0 && yy>=imin(tlin-plin,pgy) && mm>(pgx<50?pgx:pgx*6/5) ) lmax=mm; #endif paint_end: SelectObject (hdc, hfnt0); #ifdef MEMDC BitBltRect(fhdc, hdc, &ps.rcPaint); //BitBlt(fhdc,0,0,cwx+FRM,cwy+FRM,hdc,0,0,SRCCOPY); SelectObject (hdc, bm0); DeleteDC(hdc); DeleteObject (bm); #endif EndPaint (hwnd, &ps) ; if (edp && 0==scroll_lock && caret==1) ShowCaret(hwnd), caret=3; }