Ticket #48: MattsModsMin.diff

File MattsModsMin.diff, 2.3 KB (added by matt, 3 years ago)

Patch file for my changes

  • trunk/src/session.c

     
    297297                                          const char *info) 
    298298{ 
    299299        PurpleConnection *gc; 
     300        PurpleConnectionError reason; 
    300301        char *msg; 
    301302 
    302303        gc = purple_account_get_connection(session->account); 
     
    314315//                      msg = g_strdup(_("Error parsing HTTP.")); 
    315316//                      break; 
    316317                case NATEON_ERROR_SIGN_OTHER: 
     318                        reason = PURPLE_CONNECTION_ERROR_NAME_IN_USE; 
    317319                        gc->wants_to_die = TRUE; 
    318320                        msg = g_strdup(_("You have signed on from another location.")); 
    319321                        break; 
     
    327329//                                                       "temporarily.")); 
    328330//                      break; 
    329331                case NATEON_ERROR_AUTH: 
     332                        //reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; //TODO: I don't know how to test this, so will comment it out. Matt 
    330333                        msg = g_strdup_printf(_("Unable to authenticate: %s"), 
    331334                                                                  (info == NULL ) ? 
    332335                                                                  _("Unknown error") : info); 
     
    342345        } 
    343346 
    344347        nateon_session_disconnect(session); 
    345  
    346         purple_connection_error(gc, msg); 
    347  
     348        if (reason != NULL) 
     349        { 
     350                purple_connection_error_reason(gc, reason, msg); 
     351        } 
     352        else 
     353        { 
     354                purple_connection_error(gc, msg); 
     355        } 
    348356        g_free(msg); 
    349357} 
    350358 
  • trunk/src/nateon.c

     
    528528        data->gc = gc; 
    529529        data->account = buddy->name; 
    530530 
    531         purple_request_input(gc, NULL, buddy->name, NULL, 
     531        purple_request_input(gc, _("Send Memo"), buddy->name, NULL, 
    532532                                           NULL, TRUE, FALSE, NULL, 
    533533                                           _("_Send"), G_CALLBACK(send_memo_cb), 
    534534                                           _("Close"), G_CALLBACK(close_memo_cb), 
     
    699699        /* Can't send more than one file at same time */ 
    700700        session = gc->proto_data; 
    701701        ret = TRUE; 
    702         for (l = session->xfers; l != NULL; l = l->next) 
     702 
     703        if (session != NULL) 
    703704        { 
    704                 NateonXfer *xfer; 
    705                 xfer = l->data; 
    706                 if (purple_xfer_get_type(xfer->prpl_xfer) == PURPLE_XFER_SEND && 
    707                                 !strcmp(xfer->who, who)) 
     705                for (l = session->xfers; l != NULL; l = l->next) 
    708706                { 
    709                         ret = FALSE; 
    710                         break; 
     707                        NateonXfer *xfer; 
     708                        xfer = l->data; 
     709                        if (purple_xfer_get_type(xfer->prpl_xfer) == PURPLE_XFER_SEND && 
     710                                        !strcmp(xfer->who, who)) 
     711                        { 
     712                                ret = FALSE; 
     713                                break; 
     714                        } 
    711715                } 
    712716        } 
    713  
    714717        return ret; 
    715718}