ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/src message_parse.c,1.16,1.17 status.c,1.46,


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src message_parse.c,1.16,1.17 status.c,1.46,1.47 util.c,1.46,1.47
Date: Wed, 12 Feb 2003 05:12:03 -0500

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

Modified Files:
        message_parse.c status.c util.c 
Log Message:
- src/message_parse.c
revert last commit (bug wasn't here)
- src/status.c
fix bug introduced in -125
- src/util.c
fix segfault if dummy_group doesn't exist



Index: message_parse.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/message_parse.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- message_parse.c     12 Feb 2003 09:54:02 -0000      1.16
+++ message_parse.c     12 Feb 2003 10:12:00 -0000      1.17
@@ -464,17 +464,9 @@
        free(buff);
 }
 
-static int eb_reset_status(gpointer data) {
-       eb_account *remote = (eb_account *)data;
-       eb_chat_window_display_status(remote, NULL);
-       eb_chat_room_display_status(remote, NULL);
-       return 0;       
-}
-
 void eb_update_status( eb_account * remote,
                        char * message )
 {
         eb_chat_window_display_status( remote, message );
        eb_chat_room_display_status(remote, message);
-       eb_timeout_add(30*1000, (void *) eb_reset_status, remote);
 }

Index: status.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/status.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- status.c    9 Feb 2003 09:58:04 -0000       1.46
+++ status.c    12 Feb 2003 10:12:00 -0000      1.47
@@ -270,6 +270,7 @@
        }  
 }
 
+/* FIXME: use gtk_label_set_text() */
 static void update_status_message(gchar * message )
 {
        if(status_bar) {
@@ -796,7 +797,7 @@
        gtk_widget_show(eg->list_item);
 }
 
-static void set_status_label(eb_account *ea)
+static void set_status_label(eb_account *ea, int update_contact)
 {
        char * c = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
        while (strchr(c,'\n') != NULL) {
@@ -821,6 +822,11 @@
        else
                gtk_label_set_text(GTK_LABEL(ea->status),c);
        
+       if (update_contact && !ea->account_contact->status)
+               ea->account_contact->status = gtk_label_new(c);
+       else if (update_contact)
+               gtk_label_set_text(ea->account_contact->status, c);
+       
        g_free(c);
 }
        
@@ -840,7 +846,7 @@
        box = gtk_hbox_new(FALSE, 1);
        ea->pix = gtk_pixmap_new(iconblank_pm, iconblank_bm);
        label = gtk_label_new(ea->handle);
-       set_status_label(ea);
+       set_status_label(ea, FALSE);
 
        gtk_box_pack_start(GTK_BOX(box), ea->pix, FALSE, FALSE, 1);
        gtk_widget_show(ea->pix);
@@ -1082,7 +1088,7 @@
        if (!ea)
                return;
 
-       set_status_label(ea);
+       set_status_label(ea, TRUE);
        
        gtk_label_set_text(GTK_LABEL(ec->label), ec->nick);
 
@@ -1129,11 +1135,17 @@
 {
        GdkPixmap * pm;
        GdkBitmap * bm;
+       char *c = NULL;
        if (!ea || !ea->list_item)
                return;
        
-       set_status_label(ea);
-
+       c = g_strndup(RUN_SERVICE(ea)->get_status_string(ea), 20);
+       
+       set_status_label(ea, FALSE);
+       eb_update_status(ea, c);
+       
+       g_free(c);
+       
        /* update the icon if another timeout isn't about to change it */
        if (ea->icon_handler == -1) {
                
gtkut_set_pixmap_from_xpm(RUN_SERVICE(ea)->get_status_pixmap(ea), 
GTK_PIXMAP(ea->pix));

Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- util.c      11 Feb 2003 06:21:59 -0000      1.46
+++ util.c      12 Feb 2003 10:12:00 -0000      1.47
@@ -1086,6 +1086,9 @@
 {
        LList *l, *l2;
 
+       if (!dummy_group) 
+               return;
+       
        for(l = dummy_group->members; l; l=l->next) {
                struct contact * c = l->data;
                for(l2 = c->accounts; l2; l2=l2->next) {





reply via email to

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