[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src status.c,1.54,1.55
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src status.c,1.54,1.55 |
Date: |
Mon, 17 Mar 2003 10:38:51 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv31173/src
Modified Files:
status.c
Log Message:
fix a leak
fix an unnecessary (buggy) update
Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- status.c 17 Mar 2003 15:03:10 -0000 1.54
+++ status.c 17 Mar 2003 15:38:48 -0000 1.55
@@ -797,6 +797,7 @@
static void set_status_label(eb_account *ea, int update_contact)
{
char * c = NULL, *tmp = NULL;
+ int need_tooltip_update = 0;
tmp = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
c = g_strdup_printf("%s%s%s",
@@ -826,12 +827,17 @@
else
gtk_label_set_text(GTK_LABEL(ea->status),c);
- if (update_contact && !ea->account_contact->status)
+ if (update_contact && !ea->account_contact->status) {
ea->account_contact->status = gtk_label_new(c);
- else if (update_contact)
+ need_tooltip_update = 1;
+ } else if (update_contact) {
+ char *tmp = NULL;
+ gtk_label_get(ea->account_contact->status, &tmp);
+ need_tooltip_update = strcmp(c, tmp);
gtk_label_set_text(ea->account_contact->status, c);
+ }
- if (update_contact) {
+ if (update_contact && need_tooltip_update) {
time_t t;
struct tm *mytime;
char buff[128];
@@ -840,7 +846,7 @@
time(&t);
mytime = localtime(&t);
-
+
strftime(buff, 128, "%H:%M (%b %d)", mytime);
status_line = g_strdup_printf(
_("%s since %s"),
@@ -856,6 +862,7 @@
g_free(status_line);
}
g_free(c);
+ g_free(tmp);
}
/* makes an account visible on the buddy list, making the contact visible
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src status.c,1.54,1.55,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.339,1.340 configure.in,1.334,1.335
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.340,1.341 configure.in,1.335,1.336
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.339,1.340 configure.in,1.334,1.335
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.340,1.341 configure.in,1.335,1.336
- Index(es):