ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src status.c,1.52,1.53


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src status.c,1.52,1.53
Date: Mon, 17 Mar 2003 09:44:58 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv14512/src

Modified Files:
        status.c 
Log Message:
move status parentheses from modules to core


Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- status.c    16 Mar 2003 12:57:27 -0000      1.52
+++ status.c    17 Mar 2003 14:44:56 -0000      1.53
@@ -796,7 +796,14 @@
 
 static void set_status_label(eb_account *ea, int update_contact)
 {
-       char * c = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
+       char * c = NULL, *tmp = NULL;
+       
+       tmp = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
+       c = g_strdup_printf("%s%s%s",
+                       strlen(tmp)?"(":"",
+                       tmp,
+                       strlen(tmp)?")":"");
+       
        while (strchr(c,'\n') != NULL) {
                char *t = strchr(c,'\n');
                *t = ' ';
@@ -824,6 +831,17 @@
        else if (update_contact)
                gtk_label_set_text(ea->account_contact->status, c);
        
+       /*if (update_contact) {
+               time_t mytime = time(NULL);
+               char *status_line = g_strdup_printf(
+                               "%s since %s",
+                               
+               gtk_tooltips_set_tip(GTK_TOOLTIPS(status_tips), 
+                       ea->account_contact->list_item,
+                       RUN_SERVICE(ea)->get_status_string(ea),
+                       _("status info here"));
+
+       }*/
        g_free(c);
 }
        
@@ -1112,7 +1130,7 @@
                if(width+width3> width2)
                        
gtk_widget_set_usize(contact_window,width+width3+2,height2);
        }
-       
+               
 }
 
 /* called by a service module when a buddy's status changes
@@ -1128,11 +1146,15 @@
 /* update the status info (pixmap and state) of an account */
 void buddy_update_status(eb_account * ea)
 {
-       char *c = NULL;
+       char *c = NULL, *tmp = NULL;
        if (!ea || !ea->list_item)
                return;
        
-       c = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
+       tmp = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
+       c = g_strdup_printf("%s%s%s",
+                       strlen(tmp)?"(":"",
+                       tmp,
+                       strlen(tmp)?")":"");
        
        set_status_label(ea, FALSE);
        eb_update_status(ea, c);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]