ayttm-commits
[Top][All Lists]
Advanced

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

[Ayttm-commits] CVS: ayttm/src chat_room.c,1.19,1.20 chat_room.h,1.5,1.6


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src chat_room.c,1.19,1.20 chat_room.h,1.5,1.6 chat_window.c,1.20,1.21 chat_window.h,1.4,1.5 console_session.c,1.2,1.3 util.c,1.7,1.8
Date: Sun, 12 Jan 2003 23:58:35 -0500

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

Modified Files:
        chat_room.c chat_room.h chat_window.c chat_window.h 
        console_session.c util.c 
Log Message:
s/perfered/preferred


Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- chat_room.c 12 Jan 2003 15:29:31 -0000      1.19
+++ chat_room.c 13 Jan 2003 04:58:32 -0000      1.20
@@ -81,6 +81,27 @@
        gtk_editable_delete_text(GTK_EDITABLE (ecr->entry), 0, -1);
 }
 
+/*static void send_typing_status(eb_chat_room *cr)
+{
+       time_t now=time(NULL);
+       GList *others;
+
+       if(!iGetLocalPref("do_send_typing_notify"))
+               return;
+
+       if(now>=cr->next_typing_send &&
+          RUN_SERVICE(cr->chat_room_account)->send_typing!=NULL) {
+               int next;
+               for (others = cr->fellows; others && others->data; others = 
others->next) {
+                       eb_chat_room_buddy *buddy = (eb_chat_room_buddy 
*)others->data;
+                       eb_account *remote_account = 
find_account_by_handle(buddy->handle, cr->service_id);
+                       next = RUN_SERVICE(cr->chat_room_account)->send_typing(
+                                       cr->chat_room_account, remote_account);
+               }
+               cr->next_typing_send = now+next;
+       }
+}*/
+
 static gboolean cr_key_press(GtkWidget *widget, GdkEventKey *event, gpointer 
data)
 {
   eb_chat_room *cr = (eb_chat_room *)data;
@@ -168,7 +189,7 @@
 
   if(!modifiers)
   {
-   // send_typing_status(cr);
+    //send_typing_status(cr);
   }
 
   return gtk_false();

Index: chat_room.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- chat_room.h 12 Jan 2003 12:55:29 -0000      1.5
+++ chat_room.h 13 Jan 2003 04:58:32 -0000      1.6
@@ -65,7 +65,7 @@
        GtkWidget * invite_window;
        GtkWidget * invite_buddy;
        GtkWidget * invite_message;
-
+       time_t next_typing_send; 
 
 } eb_chat_room;
 

Index: chat_window.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- chat_window.c       12 Jan 2003 22:28:11 -0000      1.20
+++ chat_window.c       13 Jan 2003 04:58:32 -0000      1.21
@@ -385,28 +385,28 @@
   chat_window * cw = userdata;
 
   /* if something wierd is going on and the unknown contact has multiple
-   * accounts, find use the perfered account
+   * accounts, find use the preferred account
    */
 
-  cw->perfered = find_suitable_remote_account(cw->perfered, cw->contact);
+  cw->preferred = find_suitable_remote_account(cw->preferred, cw->contact);
 
   /* if in the weird case that the unknown user has gone offline
    * just use the first account you see
    */
         
-  if(!cw->perfered)
-    cw->perfered = cw->contact->accounts->data;
+  if(!cw->preferred)
+    cw->preferred = cw->contact->accounts->data;
 
   /* if that fails, something is seriously wrong
    * bail out while you can
    */
 
-  if(!cw->perfered)
+  if(!cw->preferred)
     return;
 
   /* now that we have a valid account, pop up the window already :) */
 
-  add_unknown_account_window_new(cw->perfered);
+  add_unknown_account_window_new(cw->preferred);
 }
 
 void send_message(GtkWidget *widget, gpointer d)
@@ -430,16 +430,16 @@
   GET_CHAT_WINDOW(data);
 
   /*determine what is the best account to send to*/
-  data->perfered= find_suitable_remote_account(data->perfered, data->contact);
+  data->preferred= find_suitable_remote_account(data->preferred, 
data->contact);
   
 
-  if(!data->perfered)
+  if(!data->preferred)
     {
       /*Eventually this will need to become a dialog box that pops up*/
 
       if(data->contact->send_offline && can_offline_message(data->contact))
        {
-         data->perfered = can_offline_message(data->contact);
+         data->preferred = can_offline_message(data->contact);
        }
       else
        {
@@ -450,7 +450,7 @@
        }
     }
 
-  if(data->local_user && data->local_user->service_id != 
data->perfered->service_id)
+  if(data->local_user && data->local_user->service_id != 
data->preferred->service_id)
     {
       data->local_user = NULL;
     }
@@ -465,7 +465,7 @@
   if(!data->local_user)
   {
        data->local_user =
-                       find_suitable_local_account(data->local_user, 
data->perfered->service_id); 
+                       find_suitable_local_account(data->local_user, 
data->preferred->service_id); 
   }
 
   if(!data->local_user) {
@@ -515,7 +515,7 @@
 
     ifilter=(gchar *(*)(eb_local_account *, eb_account *, struct contact *, 
gchar *))filter_walk->data;
 
-    text=ifilter(data->local_user, data->perfered, data->contact, text);
+    text=ifilter(data->local_user, data->preferred, data->contact, text);
     
     if(text==NULL) { return; } // Urgh, no cleanup, but it does it on 
strlen(text)==0 too
 
@@ -531,18 +531,18 @@
   g_free(o_text);
   
 #ifdef HAVE_ICONV_H
-       if(!eb_services[data->perfered->service_id].can_iconvert)
+       if(!eb_services[data->preferred->service_id].can_iconvert)
            {
                RUN_SERVICE(data->local_user)->send_im(
                                                        data->local_user,
-                                                       data->perfered,
+                                                       data->preferred,
                                                        text);
            }
            else
            {
                RUN_SERVICE(data->local_user)->send_im(
                                                        data->local_user,
-                                                       data->perfered,
+                                                       data->preferred,
                                         recode_if_needed(text, recode_buff, 
RECODE_TO_REMOTE) );
            }
   /* seems like variable 'text' is not used any more down
@@ -550,7 +550,7 @@
 #else
   RUN_SERVICE(data->local_user)->send_im(
                                         data->local_user,
-                                        data->perfered,
+                                        data->preferred,
                                         text);
 #endif
   serv_touch_idle();
@@ -660,7 +660,7 @@
       return;
     }
 
-  ea = find_suitable_remote_account(data->perfered,
+  ea = find_suitable_remote_account(data->preferred,
                                    data->contact);
 
   eb_do_send_file(ea);
@@ -766,20 +766,20 @@
       chat_window_account *cwa=NULL;
     
      /* Do we have a preferred remote account, no, get one */ 
-     if(!cw->perfered) {
-           cw->perfered = find_suitable_remote_account(NULL, cw->contact);
-           if(!cw->perfered) /* The remote user is not online */
+     if(!cw->preferred) {
+           cw->preferred = find_suitable_remote_account(NULL, cw->contact);
+           if(!cw->preferred) /* The remote user is not online */
                    return(NULL);
       }
-      handle=cw->perfered->handle;
+      handle=cw->preferred->handle;
       eb_debug(DBG_CORE, "Setting menu item with label: %s\n", handle);
       /* Check to see if we have at least 2 local accounts suitable for the 
remote account */
-      first_act = find_local_account_for_remote(cw->perfered, TRUE);
+      first_act = find_local_account_for_remote(cw->preferred, TRUE);
       subsequent_act = find_local_account_for_remote(NULL, TRUE);
       if(!first_act || !subsequent_act)
              return(NULL);
 
-      first_act = find_local_account_for_remote(cw->perfered, TRUE);
+      first_act = find_local_account_for_remote(cw->preferred, TRUE);
 
       /* Start building the menu */
       label = gtk_menu_item_new_with_label(_("Change Local Account"));
@@ -951,19 +951,19 @@
 
   if(now>=cw->next_typing_send)
   {
-    if(!cw->perfered) {
+    if(!cw->preferred) {
        if(!cw->contact)
           return;
-    cw->perfered = find_suitable_remote_account(NULL, cw->contact);
-    if(!cw->perfered) /* The remote user is not online */
+    cw->preferred = find_suitable_remote_account(NULL, cw->contact);
+    if(!cw->preferred) /* The remote user is not online */
        return;
     }
-    cw->local_user=find_suitable_local_account(cw->local_user, 
cw->perfered->service_id);
+    cw->local_user=find_suitable_local_account(cw->local_user, 
cw->preferred->service_id);
     if(cw->local_user==NULL) { return; }
 
     if(RUN_SERVICE(cw->local_user)->send_typing!=NULL)
     {
-      cw->next_typing_send=now + 
RUN_SERVICE(cw->local_user)->send_typing(cw->local_user, cw->perfered);
+      cw->next_typing_send=now + 
RUN_SERVICE(cw->local_user)->send_typing(cw->local_user, cw->preferred);
     }
   }
 }
@@ -1082,7 +1082,7 @@
        }
     }
 
-  if(cw->perfered==NULL || modifiers)
+  if(cw->preferred==NULL || modifiers)
   { return gtk_false(); }
 
   if(!modifiers)
@@ -1256,7 +1256,7 @@
   cw = g_new0(chat_window,1);
   cw->contact = remote;
   cw->away_msg_sent = 0;
-  cw->perfered = NULL;
+  cw->preferred = NULL;
   cw->local_user = NULL;
 
   vbox = gtk_vbox_new(FALSE,0);        
@@ -1891,7 +1891,7 @@
 
   /*also specify that if possible, try to use the same account they used
     to last talk to us with */
-  remote_contact->chatwindow->perfered = remote;
+  remote_contact->chatwindow->preferred = remote;
 
   if (remote_contact->chatwindow->notebook != NULL) {
     /* no more icons in the tabs */
@@ -2110,7 +2110,7 @@
     gtk_widget_grab_focus(remote_contact->chatwindow->entry);
   }
        
-  remote_contact->chatwindow->perfered = remote_account;
+  remote_contact->chatwindow->preferred = remote_account;
 }
        
 void eb_log_status_changed(eb_account *ea, gchar *status)
@@ -2377,13 +2377,13 @@
       if (cw && cw->notebook != NULL
          && cw->contact != NULL
          && cw->local_user != NULL
-         && cw->perfered != NULL
+         && cw->preferred != NULL
          && GET_SERVICE (cw->local_user).name != NULL)
        {
          g_snprintf (buff, BUF_SIZE, "%s%s (%s <=> %s via %s)",
                      new_message == TRUE ? "* " : "",
                      cw->contact->nick, cw->local_user->alias,
-                     cw->perfered->handle,
+                     cw->preferred->handle,
                      GET_SERVICE (cw->local_user).name);
 
        gtk_window_set_title (GTK_WINDOW (cw->contact->chatwindow->window),
@@ -2407,13 +2407,13 @@
   if (!tabbedChat
       && cw != NULL
       && cw->contact != NULL
-      && cw->perfered != NULL
+      && cw->preferred != NULL
       && cw->local_user != NULL && GET_SERVICE (cw->local_user).name != NULL)
     {
       g_snprintf (buff, BUF_SIZE, "%s%s (%s <=> %s via %s)",
                  new_message == TRUE ? "* " : "",
                  cw->contact->nick, cw->local_user->alias,
-                 cw->perfered->handle, GET_SERVICE (cw->local_user).name);
+                 cw->preferred->handle, GET_SERVICE (cw->local_user).name);
 
       gtk_window_set_title (GTK_WINDOW (cw->contact->chatwindow->window),
                            buff);
@@ -2425,13 +2425,13 @@
       if (cw && cw->notebook != NULL
          && cw->contact != NULL
          && cw->local_user != NULL
-         && cw->perfered != NULL
+         && cw->preferred != NULL
          && GET_SERVICE (cw->local_user).name != NULL)
        {
          g_snprintf (buff, BUF_SIZE, "%s%s (%s <=> %s via %s)",
                      new_message == TRUE ? "* " : "",
                      cw->contact->nick, cw->local_user->alias,
-                     cw->perfered->handle,
+                     cw->preferred->handle,
                      GET_SERVICE (cw->local_user).name);
 
        gtk_window_set_title (GTK_WINDOW (cw->contact->chatwindow->window),

Index: chat_window.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_window.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- chat_window.h       12 Jan 2003 16:58:56 -0000      1.4
+++ chat_window.h       13 Jan 2003 04:58:32 -0000      1.5
@@ -56,7 +56,7 @@
        gboolean receive_enabled;
 
        struct contact * contact;
-       eb_account * perfered; /*for sanity reasons, try using the
+       eb_account * preferred; /*for sanity reasons, try using the
                           most recently used account first */
        eb_local_account * local_user;
        FILE * fp;

Index: console_session.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/console_session.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- console_session.c   2 Jan 2003 11:16:44 -0000       1.2
+++ console_session.c   13 Jan 2003 04:58:32 -0000      1.3
@@ -55,10 +55,10 @@
                        return;
                }
                eb_chat_window_display_contact(remote_contact);
-               remote_contact->chatwindow->perfered= 
-                               
find_suitable_remote_account(remote_contact->chatwindow->perfered, 
+               remote_contact->chatwindow->preferred= 
+                               
find_suitable_remote_account(remote_contact->chatwindow->preferred, 
                                                                                
        remote_contact->chatwindow->contact);
-               if(!remote_contact->chatwindow->perfered)
+               if(!remote_contact->chatwindow->preferred)
                {
                        ret = -2;
                        write(source, &ret, sizeof(int));

Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- util.c      11 Jan 2003 14:52:16 -0000      1.7
+++ util.c      13 Jan 2003 04:58:32 -0000      1.8
@@ -905,10 +905,10 @@
         for(l2 = ((grouplist*)l1->data)->members; l2; l2=l2->next )
         {
            con=(struct contact *)l2->data;
-           if(con->chatwindow && con->chatwindow->perfered && 
(con->chatwindow->perfered->service_id==type))
+           if(con->chatwindow && con->chatwindow->preferred && 
(con->chatwindow->preferred->service_id==type))
            {
-               eb_debug(DBG_MOD, "Setting the perfered service to NULL for 
%s\n", con->nick);
-               con->chatwindow->perfered=NULL;
+               eb_debug(DBG_MOD, "Setting the preferred service to NULL for 
%s\n", con->nick);
+               con->chatwindow->preferred=NULL;
            }
             for(l3 = con->accounts; l3; l3=l3->next)
             {





reply via email to

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