comparison src/buddy.c @ 1496:d33bf6548543

[gaim-migrate @ 1506] hrm. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 22 Feb 2001 00:42:55 +0000
parents 1d0fc2622b29
children de0b946e86a4
comparison
equal deleted inserted replaced
1495:3d1c4e5f375b 1496:d33bf6548543
1867 gtk_label_set(GTK_LABEL(bs->idle), ""); 1867 gtk_label_set(GTK_LABEL(bs->idle), "");
1868 if (display_options & OPT_DISP_SHOW_IDLETIME) 1868 if (display_options & OPT_DISP_SHOW_IDLETIME)
1869 gtk_widget_show(bs->idle); 1869 gtk_widget_show(bs->idle);
1870 1870
1871 /* now we do the tooltip */ 1871 /* now we do the tooltip */
1872 sotime = sec_to_text(t - b->signon + 1872 if (b->signon) {
1873 ((struct gaim_connection *)bs->connlist->data)->correction_time); 1873 char *stime = sec_to_text(t - b->signon +
1874 ((struct gaim_connection *)bs->connlist->data)->correction_time);
1875 sotime = g_strdup_printf(_("Logged in: %s\n"), stime);
1876 g_free(stime);
1877 }
1874 1878
1875 if (b->idle) 1879 if (b->idle)
1876 itime = sec_to_text(t - b->idle); 1880 itime = sec_to_text(t - b->idle);
1877 else { 1881 else {
1878 itime = g_malloc(1); itime[0] = 0; 1882 itime = g_malloc(1); itime[0] = 0;
1894 g_snprintf(caps, sizeof caps, _("Capabilities: %s\n"), caps_string(b->caps)); 1898 g_snprintf(caps, sizeof caps, _("Capabilities: %s\n"), caps_string(b->caps));
1895 else 1899 else
1896 caps[0] = '\0'; 1900 caps[0] = '\0';
1897 1901
1898 g_snprintf(infotip, sizeof infotip, _("Alias: %s \nScreen Name: %s\n" 1902 g_snprintf(infotip, sizeof infotip, _("Alias: %s \nScreen Name: %s\n"
1899 "Logged in: %s\n%s%s%s%s%s"), 1903 "%s%s%s%s%s%s"),
1900 b->show, b->name, sotime, warn, 1904 b->show, b->name,
1905 (b->signon ? sotime : ""), warn,
1901 (b->idle ? _("Idle: ") : ""), itime, 1906 (b->idle ? _("Idle: ") : ""), itime,
1902 (b->idle ? "\n" : ""), caps); 1907 (b->idle ? "\n" : ""), caps);
1903 1908
1904 gtk_tooltips_set_tip(tips, GTK_WIDGET(bs->item), infotip, ""); 1909 gtk_tooltips_set_tip(tips, GTK_WIDGET(bs->item), infotip, "");
1905 1910
1906 g_free(sotime); 1911 if (b->signon)
1912 g_free(sotime);
1907 g_free(itime); 1913 g_free(itime);
1908 } 1914 }
1909 1915
1910 void update_idle_times() { 1916 void update_idle_times() {
1911 GSList *grp = shows; 1917 GSList *grp = shows;