Version 15.64.14

This commit is contained in:
Antonio Cañas Vargas 2015-12-13 20:46:46 +01:00
parent 52d9ebe3c3
commit 5fa5e515ed
7 changed files with 25 additions and 15 deletions

View File

@ -63,27 +63,35 @@ extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
/***************************** Internal prototypes ***************************/
/*****************************************************************************/
static void QR_PutParamQRString (void);
static void QR_ImageQRCode (const char *QRString);
/*****************************************************************************/
/***************** Put a link to a print view of a QR code *******************/
/*****************************************************************************/
void QR_PutLinkToPrintQRCode (struct UsrData *UsrDat,bool PrintText)
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText)
{
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_QR_code;
/***** Link to print QR *****/
Gbl.Usrs.NicknameForQR = Nickname;
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,"qr64x64.gif",
Txt_QR_code,PrintText ? Txt_QR_code :
NULL);
}
/*****************************************************************************/
/************************* Put parameter QR string ***************************/
/*****************************************************************************/
static void QR_PutParamQRString (void)
{
char NicknameWithArroba[Nck_MAX_BYTES_NICKNAME_WITH_ARROBA+1];
/***** Link to print view *****/
Act_FormStart (ActPrnUsrQR);
sprintf (NicknameWithArroba,"@%s",UsrDat->Nickname);
sprintf (NicknameWithArroba,"@%s",Gbl.Usrs.NicknameForQR);
Par_PutHiddenParamString ("QRString",NicknameWithArroba);
Act_LinkFormSubmit (Txt_QR_code,The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("qr64x64.gif",Txt_QR_code,PrintText ? Txt_QR_code :
NULL);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
}
/*****************************************************************************/

View File

@ -39,7 +39,7 @@
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void QR_PutLinkToPrintQRCode (struct UsrData *UsrDat,bool PrintText);
void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText);
void QR_PrintQRCode (void);
void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);

View File

@ -163,7 +163,7 @@ void Att_SeeAttEvents (void)
/* Put link to my QR code */
if (Gbl.Usrs.Me.UsrDat.Nickname[0])
QR_PutLinkToPrintQRCode (&Gbl.Usrs.Me.UsrDat,true);
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,true);
fprintf (Gbl.F.Out,"</div>");

View File

@ -117,12 +117,13 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.64.13 (2015/12/13)"
#define Log_PLATFORM_VERSION "SWAD 15.64.14 (2015/12/13)"
#define CSS_FILE "swad15.64.5.css"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 15.64.14: Dec 13, 2015 Code refactoring in contextual links. (187037 lines)
Version 15.64.13: Dec 13, 2015 Code refactoring in contextual links. (187031 lines)
Version 15.64.12: Dec 13, 2015 Code refactoring in contextual links. (187061 lines)
Version 15.64.11: Dec 13, 2015 Code refactoring in contextual links. (187056 lines)

View File

@ -381,6 +381,7 @@ struct Globals
} Connected;
char FileNamePhoto[NAME_MAX+1]; // File name (with no path and no .jpg) of the temporary file with the selected face
bool Error; // To signal that an error has happened
const char *NicknameForQR; // Used as parameter in contextual links
} Usrs;
struct
{

View File

@ -250,7 +250,7 @@ void Nck_ShowFormChangeUsrNickname (void)
/* Link to QR code */
if (NumNick == 1 && Gbl.Usrs.Me.UsrDat.Nickname[0])
QR_PutLinkToPrintQRCode (&Gbl.Usrs.Me.UsrDat,false);
QR_PutLinkToPrintQRCode (Gbl.Usrs.Me.UsrDat.Nickname,false);
fprintf (Gbl.F.Out,"</div>");

View File

@ -2406,7 +2406,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
Act_FormEnd ();
/* Link to QR code */
QR_PutLinkToPrintQRCode (UsrDat,false);
QR_PutLinkToPrintQRCode (UsrDat->Nickname,false);
}
}
fprintf (Gbl.F.Out,"</div>"