comparison src/buddy.c @ 2592:f194dd8250d4

[gaim-migrate @ 2605] hi committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 24 Oct 2001 01:42:48 +0000
parents cfb8c88d290e
children b2800bca74fe
comparison
equal deleted inserted replaced
2591:b771cbe7e161 2592:f194dd8250d4
1918 /* this also updates the tooltip since that has idle time in it */ 1918 /* this also updates the tooltip since that has idle time in it */
1919 char idlet[16], warnl[16]; 1919 char idlet[16], warnl[16];
1920 time_t t; 1920 time_t t;
1921 int ihrs, imin; 1921 int ihrs, imin;
1922 struct buddy *b; 1922 struct buddy *b;
1923 GtkStyle *style;
1923 1924
1924 char infotip[2048]; 1925 char infotip[2048];
1925 char warn[256]; 1926 char warn[256];
1926 char caps[256]; 1927 char caps[256];
1927 char *sotime = NULL, *itime; 1928 char *sotime = NULL, *itime;
1945 gtk_label_set(GTK_LABEL(bs->idle), idlet); 1946 gtk_label_set(GTK_LABEL(bs->idle), idlet);
1946 else 1947 else
1947 gtk_label_set(GTK_LABEL(bs->idle), ""); 1948 gtk_label_set(GTK_LABEL(bs->idle), "");
1948 if (blist_options & OPT_BLIST_SHOW_IDLETIME) 1949 if (blist_options & OPT_BLIST_SHOW_IDLETIME)
1949 gtk_widget_show(bs->idle); 1950 gtk_widget_show(bs->idle);
1951
1952 style = gtk_style_new();
1953 gdk_font_unref(style->font);
1954 style->font = gdk_font_ref(GTK_WIDGET(bs->label)->style->font);
1955 if ((blist_options & OPT_BLIST_GREY_IDLERS) && (b->idle) && (t - b->idle >= 1200)) {
1956 style->fg[GTK_STATE_NORMAL].red =
1957 (style->fg[GTK_STATE_NORMAL].red / 3) * 2 + (style->bg[GTK_STATE_NORMAL].red / 3);
1958 style->fg[GTK_STATE_NORMAL].green =
1959 (style->fg[GTK_STATE_NORMAL].green / 3) * 2 + (style->bg[GTK_STATE_NORMAL].green / 3);
1960 style->fg[GTK_STATE_NORMAL].blue =
1961 (style->fg[GTK_STATE_NORMAL].blue / 3) * 2 + (style->bg[GTK_STATE_NORMAL].blue / 3);
1962 }
1963 gtk_widget_set_style(bs->label, style);
1964 gtk_style_unref(style);
1950 1965
1951 /* now we do the tooltip */ 1966 /* now we do the tooltip */
1952 if (b->signon) { 1967 if (b->signon) {
1953 char *stime = sec_to_text(t - b->signon + 1968 char *stime = sec_to_text(t - b->signon +
1954 ((struct gaim_connection *)bs->connlist->data)-> 1969 ((struct gaim_connection *)bs->connlist->data)->