From e4b19ea48b974654e684207283e028556f002ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 22 Jul 2015 19:59:28 +0200 Subject: [PATCH] Version 14.119 --- swad_ID.c | 12 +- swad_announcement.c | 6 +- swad_banner.c | 7 +- swad_centre.c | 7 +- swad_changelog.h | 3 +- swad_country.c | 7 +- swad_course.c | 8 +- swad_degree.c | 14 +- swad_department.c | 7 +- swad_file_browser.c | 36 +--- swad_forum.c | 14 +- swad_group.c | 14 +- swad_holiday.c | 7 +- swad_institution.c | 7 +- swad_layout.c | 42 ++++- swad_layout.h | 5 +- swad_link.c | 7 +- swad_mail.c | 19 +- swad_message.c | 8 +- swad_nickname.c | 12 +- swad_notice.c | 8 +- swad_place.c | 7 +- swad_plugin.c | 7 +- swad_record.c | 7 +- swad_survey.c | 7 +- swad_syllabus.c | 9 +- swad_test.c | 7 +- swad_text.c | 441 -------------------------------------------- 28 files changed, 92 insertions(+), 643 deletions(-) diff --git a/swad_ID.c b/swad_ID.c index 94a33fb1a..3f2c274e2 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -418,7 +418,6 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_ID; - extern const char *Txt_Remove_ID_X; extern const char *Txt_ID_X_confirmed; extern const char *Txt_Another_ID; extern const char *Txt_Add_this_ID; @@ -458,16 +457,9 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe) Act_FormStart (ActRemIDOth); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); } - sprintf (Gbl.Title,Txt_Remove_ID_X, + fprintf (Gbl.F.Out,"", UsrDat->IDs.List[NumID].ID); - fprintf (Gbl.F.Out,"" - "", - UsrDat->IDs.List[NumID].ID, - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconRemove (); Act_FormEnd (); } } diff --git a/swad_announcement.c b/swad_announcement.c index e33015d0d..4c3a36005 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -251,7 +251,8 @@ static void Ann_ShowAnnouncement (long AnnCod,const char *Subject,const char *Co " class=\"ICON16x16\" />" " %s", Gbl.Prefs.IconsURL, - Txt_Remove,Txt_Remove, + Txt_Remove, + Txt_Remove, Txt_Remove); Act_FormEnd (); } @@ -266,7 +267,8 @@ static void Ann_ShowAnnouncement (long AnnCod,const char *Subject,const char *Co " class=\"ICON16x16\" />" " %s", Gbl.Prefs.IconsURL, - Txt_Do_not_show_again,Txt_Do_not_show_again, + Txt_Do_not_show_again, + Txt_Do_not_show_again, Txt_Do_not_show_again); Act_FormEnd (); } diff --git a/swad_banner.c b/swad_banner.c index 3c3a33e9c..9e5ebd4af 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -299,7 +299,6 @@ void Ban_FreeListBanners (void) static void Ban_ListBannersForEdition (void) { extern const char *Txt_Banners; - extern const char *Txt_Remove_banner; extern const char *Txt_Show; extern const char *Txt_Hide; unsigned NumBan; @@ -322,11 +321,7 @@ static void Ban_ListBannersForEdition (void) ""); Act_FormStart (ActRemBan); Ban_PutParamBanCod (Ban->BanCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_banner, - Txt_Remove_banner); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_centre.c b/swad_centre.c index b61fbd4a8..76990033c 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -1138,7 +1138,6 @@ void Ctr_WriteSelectorOfCentre (Act_Action_t NextAction) static void Ctr_ListCentresForEdition (void) { extern const char *Txt_Centres_of_INSTITUTION_X; - extern const char *Txt_Remove_centre; extern const char *Txt_Another_place; extern const char *Txt_CENTRE_STATUS[Ctr_NUM_STATUS_TXT]; unsigned NumCtr; @@ -1184,11 +1183,7 @@ static void Ctr_ListCentresForEdition (void) { Act_FormStart (ActRemCtr); Ctr_PutParamOtherCtrCod (Ctr->CtrCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_centre, - Txt_Remove_centre); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_changelog.h b/swad_changelog.h index 75995b57a..019458e42 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,12 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.118 (2015/07/22)" +#define Log_PLATFORM_VERSION "SWAD 14.119 (2015/07/22)" // 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 14.119: Jul 22, 2015 Function to put an icon to remove. (184828 lines) Version 14.118: Jul 22, 2015 Function to put a disabled icon indicating that removal is not allowed. (185361 lines) Version 14.117.17:Jul 22, 2015 Checking "alt" and "title" in all images. (185437 lines) Version 14.117.16:Jul 22, 2015 Checking "alt" and "title" in all images. (185368 lines) diff --git a/swad_country.c b/swad_country.c index d923230c3..d5c78fc5f 100644 --- a/swad_country.c +++ b/swad_country.c @@ -1273,7 +1273,6 @@ void Cty_FreeListCountries (void) static void Cty_ListCountriesForEdition (void) { extern const char *Txt_Countries; - extern const char *Txt_Remove_country; extern const char *Txt_STR_LANG_NAME[Txt_NUM_LANGUAGES]; unsigned NumCty; struct Country *Cty; @@ -1302,11 +1301,7 @@ static void Cty_ListCountriesForEdition (void) { Act_FormStart (ActRemCty); Cty_PutParamOtherCtyCod (Cty->CtyCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_country, - Txt_Remove_country); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_course.c b/swad_course.c index ea048e776..a90d97a38 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1339,7 +1339,6 @@ static void Crs_ListCoursesForSeeing (void) static void Crs_ListCoursesForEdition (void) { extern const char *Txt_Courses_of_DEGREE_X; - extern const char *Txt_Remove_course; extern const char *Txt_YEAR_OF_DEGREE[1+Deg_MAX_YEARS_PER_DEGREE]; extern const char *Txt_SEMESTER_OF_YEAR[1+2]; extern const char *Txt_COURSE_STATUS[Crs_NUM_STATUS_TXT]; @@ -1385,12 +1384,7 @@ static void Crs_ListCoursesForEdition (void) { Act_FormStart (ActRemCrs); Crs_PutParamOtherCrsCod (Crs->CrsCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_course, - Txt_Remove_course); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_degree.c b/swad_degree.c index 5519f6924..b8b0212c1 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -1149,7 +1149,6 @@ static void Deg_ListDegreeTypesForSeeing (void) static void Deg_ListDegreeTypesForEdition (void) { extern const char *Txt_Types_of_degree; - extern const char *Txt_Remove_type_of_degree; unsigned NumDegTyp; /***** Write heading *****/ @@ -1170,11 +1169,7 @@ static void Deg_ListDegreeTypesForEdition (void) { Act_FormStart (ActRemDegTyp); Deg_PutParamOtherDegTypCod (Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_type_of_degree, - Txt_Remove_type_of_degree); + Lay_PutIconRemove (); Act_FormEnd (); } @@ -1385,7 +1380,6 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg) static void Deg_ListDegreesForEdition (void) { extern const char *Txt_Degrees_of_CENTRE_X; - extern const char *Txt_Remove_degree; extern const char *Txt_DEGREE_With_year_for_optional_courses; extern const char *Txt_DEGREE_Without_year_for_optional_courses; extern const char *Txt_DEGREE_STATUS[Deg_NUM_STATUS_TXT]; @@ -1428,11 +1422,7 @@ static void Deg_ListDegreesForEdition (void) { Act_FormStart (ActRemDeg); Deg_PutParamOtherDegCod (Deg->DegCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_degree, - Txt_Remove_degree); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_department.c b/swad_department.c index 5c0d5d344..fdb61e2f6 100644 --- a/swad_department.c +++ b/swad_department.c @@ -483,7 +483,6 @@ unsigned Dpt_GetNumDepartmentsInInstitution (long InsCod) static void Dpt_ListDepartmentsForEdition (void) { extern const char *Txt_Departments; - extern const char *Txt_Remove_department; extern const char *Txt_Another_institution; unsigned NumDpt; struct Department *Dpt; @@ -515,11 +514,7 @@ static void Dpt_ListDepartmentsForEdition (void) { Act_FormStart (ActRemDpt); Dpt_PutParamDptCod (Dpt->DptCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_department, - Txt_Remove_department); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_file_browser.c b/swad_file_browser.c index 802a71a0d..9f66fdd59 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -1352,8 +1352,8 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType, const char *PathInTree,const char *FileName,const char *FileNameToShow); static bool Brw_CheckIfCanPasteIn (unsigned Level); static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow); -static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName,const char *FileNameToShow); + const char *PathInTree,const char *FileName); +static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName); static void Brw_PutIconCopy (Brw_FileType_t FileType, const char *PathInTree,const char *FileName,const char *FileNameShow); static void Brw_PutIconPasteOn (const char *PathInTree,const char *FileName,const char *FileNameToShow); @@ -4934,10 +4934,10 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,Brw_FileType_t FileType, /***** Icon to remove folder, file or link *****/ if (FileType == Brw_IS_FOLDER) /* Icon to remove a folder */ - Brw_PutIconRemoveDir (PathInTree,FileName,FileNameToShow); + Brw_PutIconRemoveDir (PathInTree,FileName); else // File or link /* Icon to remove a file or link */ - Brw_PutIconRemoveFile (FileType,PathInTree,FileName,FileNameToShow); + Brw_PutIconRemoveFile (FileType,PathInTree,FileName); /***** Icon to copy *****/ Brw_PutIconCopy (FileType,PathInTree,FileName,FileNameToShow); @@ -4995,10 +4995,8 @@ static bool Brw_CheckIfCanPasteIn (unsigned Level) // FileType can be Brw_IS_FILE or Brw_IS_LINK static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, - const char *PathInTree,const char *FileName,const char *FileNameToShow) + const char *PathInTree,const char *FileName) { - extern const char *Txt_Remove_FILE_OR_LINK_X; - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (Gbl.FileBrowser.ICanRemoveFileOrFolder) // Can I remove this file? @@ -5021,17 +5019,11 @@ static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, break; } Brw_ParamListFiles (FileType,PathInTree,FileName); - sprintf (Gbl.Title,Txt_Remove_FILE_OR_LINK_X,FileNameToShow); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconBRemove (); Act_FormEnd (); } else - Lay_PutIconRemovalNotAllowed (); + Lay_PutIconBRemovalNotAllowed (); fprintf (Gbl.F.Out,""); } @@ -5039,10 +5031,8 @@ static void Brw_PutIconRemoveFile (Brw_FileType_t FileType, /****************** Write link and icon to remove a folder *******************/ /*****************************************************************************/ -static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName,const char *FileNameToShow) +static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName) { - extern const char *Txt_Remove_folder_X; - fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); if (Gbl.FileBrowser.ICanRemoveFileOrFolder) // Can I remove this folder? @@ -5065,17 +5055,11 @@ static void Brw_PutIconRemoveDir (const char *PathInTree,const char *FileName,co break; } Brw_ParamListFiles (Brw_IS_FOLDER,PathInTree,FileName); - sprintf (Gbl.Title,Txt_Remove_folder_X,FileNameToShow); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconBRemove (); Act_FormEnd (); } else - Lay_PutIconRemovalNotAllowed (); + Lay_PutIconBRemovalNotAllowed (); fprintf (Gbl.F.Out,""); } diff --git a/swad_forum.c b/swad_forum.c index 03c40e710..bfcc94993 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1051,7 +1051,6 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst { extern const char *Txt_unread_MESSAGE; extern const char *Txt_MSG_Open; - extern const char *Txt_Remove_post; extern const char *Txt_no_subject; extern const char *Txt_Post_X_allowed; extern const char *Txt_Post_banned; @@ -1134,11 +1133,7 @@ static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long Pst For_PutHiddenParamPstCod (PstCod); For_PutAllHiddenParamsForum (); For_PutHiddenParamThrCod (Thr->ThrCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_post, - Txt_Remove_post); + Lay_PutIconRemove (); Act_FormEnd (); } @@ -3228,7 +3223,6 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi extern const char *Txt_Thread_with_posts_from_you; extern const char *Txt_There_are_new_posts; extern const char *Txt_No_new_posts; - extern const char *Txt_Remove_thread; extern const char *Txt_Move_thread; unsigned NumThr; unsigned NumThrInScreen; // From 0 to Pag_ITEMS_PER_PAGE-1 @@ -3314,11 +3308,7 @@ void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],struct Pagination *Pagi Act_FormStart (For_ActionsReqDelThr[Gbl.Forum.ForumType]); For_PutAllHiddenParamsForum (); For_PutHiddenParamThrCod (Thr.ThrCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_thread, - Txt_Remove_thread); + Lay_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_group.c b/swad_group.c index f5139b4f0..e192e5f58 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1117,7 +1117,6 @@ static void Grp_AddUsrToGroup (struct UsrData *UsrDat,long GrpCod) static void Grp_ListGroupTypesForEdition (void) { extern const char *Txt_Types_of_group; - extern const char *Txt_Remove_type_of_group; extern const char *Txt_It_is_optional_to_choose_a_group; extern const char *Txt_It_is_mandatory_to_choose_a_group; extern const char *Txt_A_student_can_belong_to_several_groups; @@ -1140,11 +1139,7 @@ static void Grp_ListGroupTypesForEdition (void) ""); Act_FormStart (ActReqRemGrpTyp); Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_type_of_group, - Txt_Remove_type_of_group); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -1299,7 +1294,6 @@ static void Grp_WriteHeadingGroupTypes (void) static void Grp_ListGroupsForEdition (void) { extern const char *Txt_Groups; - extern const char *Txt_Remove_group; extern const char *Txt_Group_X_open_click_to_close_it; extern const char *Txt_Group_X_closed_click_to_open_it; extern const char *Txt_File_zones_of_the_group_X_enabled_click_to_disable_them; @@ -1332,11 +1326,7 @@ static void Grp_ListGroupsForEdition (void) ""); Act_FormStart (ActReqRemGrp); Grp_PutParamGrpCod (Grp->GrpCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_group, - Txt_Remove_group); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_holiday.c b/swad_holiday.c index 8e78328ac..af7c2a28d 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -465,7 +465,6 @@ void Hld_FreeListHolidays (void) static void Hld_ListHolidaysForEdition (void) { extern const char *Txt_Holidays; - extern const char *Txt_Remove_holiday; extern const char *Txt_All_places; extern const char *Txt_HOLIDAY_TYPES[Hld_NUM_TYPES_HOLIDAY]; unsigned NumHld; @@ -490,11 +489,7 @@ static void Hld_ListHolidaysForEdition (void) ""); Act_FormStart (ActRemHld); Hld_PutParamHldCod (Hld->HldCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_holiday, - Txt_Remove_holiday); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_institution.c b/swad_institution.c index cdf38f069..66aa21f51 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -1082,7 +1082,6 @@ void Ins_WriteSelectorOfInstitution (Act_Action_t NextAction) static void Ins_ListInstitutionsForEdition (void) { extern const char *Txt_Institutions_of_COUNTRY_X; - extern const char *Txt_Remove_institution; extern const char *Txt_Another_country; extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT]; unsigned NumIns; @@ -1125,11 +1124,7 @@ static void Ins_ListInstitutionsForEdition (void) { Act_FormStart (ActRemIns); Ins_PutParamOtherInsCod (Ins->InsCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_institution, - Txt_Remove_institution); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_layout.c b/swad_layout.c index eea883732..9d8859018 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1031,7 +1031,7 @@ void Lay_PutCalculateIconWithText (const char *Alt,const char *Text) } /*****************************************************************************/ -/************ Put a icon indicating that removal is not allowed **************/ +/******** Put a disabled icon indicating that removal is not allowed *********/ /*****************************************************************************/ void Lay_PutIconRemovalNotAllowed (void) @@ -1046,6 +1046,46 @@ void Lay_PutIconRemovalNotAllowed (void) Txt_Removal_not_allowed); } +void Lay_PutIconBRemovalNotAllowed (void) + { + extern const char *Txt_Removal_not_allowed; + + fprintf (Gbl.F.Out,"\"%s\"", + Gbl.Prefs.IconsURL, + Txt_Removal_not_allowed, + Txt_Removal_not_allowed); + } + +/*****************************************************************************/ +/******** Put a disabled icon indicating that removal is not allowed *********/ +/*****************************************************************************/ + +void Lay_PutIconRemove (void) + { + extern const char *Txt_Remove; + + fprintf (Gbl.F.Out,"", + Gbl.Prefs.IconsURL, + Txt_Remove, + Txt_Remove); + } + +void Lay_PutIconBRemove (void) + { + extern const char *Txt_Remove; + + fprintf (Gbl.F.Out,"", + Gbl.Prefs.IconsURL, + Txt_Remove, + Txt_Remove); + } + /*****************************************************************************/ /********************** Put a button to submit a form ************************/ /*****************************************************************************/ diff --git a/swad_layout.h b/swad_layout.h index 6aefa9606..b12983d87 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -89,8 +89,6 @@ typedef enum /****************************** Public prototypes ****************************/ /*****************************************************************************/ -// void Lay_PrintDigest512 (unsigned char digest512[512/8]); - void Lay_WriteStartOfPage (void); void Lay_WriteTitle (const char *Title); @@ -100,6 +98,9 @@ void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text); void Lay_PutCalculateIconWithText (const char *Alt,const char *Text); void Lay_PutIconRemovalNotAllowed (void); +void Lay_PutIconBRemovalNotAllowed (void); +void Lay_PutIconRemove (void); +void Lay_PutIconBRemove (void); void Lay_PutCreateButton (const char *Text); void Lay_PutCreateButtonInline (const char *Text); diff --git a/swad_link.c b/swad_link.c index a6542da88..051956727 100644 --- a/swad_link.c +++ b/swad_link.c @@ -278,7 +278,6 @@ void Lnk_FreeListLinks (void) static void Lnk_ListLinksForEdition (void) { extern const char *Txt_Links; - extern const char *Txt_Remove_link; unsigned NumLnk; struct Link *Lnk; @@ -299,11 +298,7 @@ static void Lnk_ListLinksForEdition (void) ""); Act_FormStart (ActRemLnk); Lnk_PutParamLnkCod (Lnk->LnkCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_link, - Txt_Remove_link); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_mail.c b/swad_mail.c index caaf454af..ff602686d 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -386,7 +386,6 @@ void Mai_FreeListMailDomains (void) static void Mai_ListMailDomainsForEdition (void) { extern const char *Txt_Mail_domains_allowed_for_notifications; - extern const char *Txt_Remove_mail_domain; unsigned NumMai; struct Mail *Mai; @@ -407,11 +406,7 @@ static void Mai_ListMailDomainsForEdition (void) ""); Act_FormStart (ActRemMai); Mai_PutParamMaiCod (Mai->MaiCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_mail_domain, - Txt_Remove_mail_domain); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); @@ -921,7 +916,6 @@ void Mai_ShowFormChangeUsrEmail (void) extern const char *Txt_Current_email; extern const char *Txt_Other_emails; extern const char *Txt_Email_X_confirmed; - extern const char *Txt_Remove_email_X; extern const char *Txt_Confirm_email; extern const char *Txt_Use_this_email; extern const char *Txt_New_email; @@ -983,16 +977,9 @@ void Mai_ShowFormChangeUsrEmail (void) /* Form to remove old e-mail */ Act_FormStart (ActRemOldMai); - sprintf (Gbl.Title,Txt_Remove_email_X, + fprintf (Gbl.F.Out,"", row[0]); - fprintf (Gbl.F.Out,"" - "", - row[0], - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_message.c b/swad_message.c index 88525cff9..4593272b7 100644 --- a/swad_message.c +++ b/swad_message.c @@ -3263,8 +3263,6 @@ void Msg_WriteMsgDate (const char *DateTime,const char *ClassBackground) static void Msg_PutFormToDeleteMessage (long MsgCod,Msg_TypeOfMessages_t TypeOfMessages) { - extern const char *Txt_Delete_message; - fprintf (Gbl.F.Out,""); Act_FormStart (TypeOfMessages == Msg_MESSAGES_RECEIVED ? ActDelRcvMsg : @@ -3272,11 +3270,7 @@ static void Msg_PutFormToDeleteMessage (long MsgCod,Msg_TypeOfMessages_t TypeOfM Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); Msg_PutHiddenParamMsgCod (MsgCod); Msg_PutHiddenParamsMsgsFilters (); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Delete_message, - Txt_Delete_message); + Lay_PutIconBRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_nickname.c b/swad_nickname.c index eb1ffe59e..a4828b8d1 100644 --- a/swad_nickname.c +++ b/swad_nickname.c @@ -181,7 +181,6 @@ void Nck_ShowFormChangeUsrNickname (void) extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_Current_nickname; extern const char *Txt_Other_nicknames; - extern const char *Txt_Remove_nickname_X; extern const char *Txt_Use_this_nickname; extern const char *Txt_New_nickname; extern const char *Txt_Nickname; @@ -235,16 +234,9 @@ void Nck_ShowFormChangeUsrNickname (void) /* Form to remove old nickname */ Act_FormStart (ActRemOldNic); - sprintf (Gbl.Title,Txt_Remove_nickname_X, + fprintf (Gbl.F.Out,"", row[0]); - fprintf (Gbl.F.Out,"" - "", - row[0], - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconRemove (); Act_FormEnd (); } diff --git a/swad_notice.c b/swad_notice.c index f832f6bc2..1b14cbae6 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -478,7 +478,6 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, extern const char *Txt_NOTICE_Obsolete_Mark_as_active; extern const char *Txt_See_full_notice; extern const char *Txt_Remove; - extern const char *Txt_Remove_notice; struct UsrData UsrDat; /***** Start yellow note *****/ @@ -601,14 +600,15 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing, /* Form to delete notice */ Act_FormStart (ActRemNot); Not_PutHiddenParamNotCod (NotCod); - Act_LinkFormSubmit (Txt_Remove_notice,The_ClassFormul[Gbl.Prefs.Theme]); + Act_LinkFormSubmit (Txt_Remove,The_ClassFormul[Gbl.Prefs.Theme]); fprintf (Gbl.F.Out,"\"%s\"" " %s", Gbl.Prefs.IconsURL, - Txt_Remove_notice, - Txt_Remove,Txt_Remove_notice); + Txt_Remove, + Txt_Remove, + Txt_Remove); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_place.c b/swad_place.c index da6205fd9..6f069f29c 100644 --- a/swad_place.c +++ b/swad_place.c @@ -408,7 +408,6 @@ void Plc_FreeListPlaces (void) static void Plc_ListPlacesForEdition (void) { extern const char *Txt_Places; - extern const char *Txt_Remove_place; unsigned NumPlc; struct Place *Plc; @@ -433,11 +432,7 @@ static void Plc_ListPlacesForEdition (void) { Act_FormStart (ActRemPlc); Plc_PutParamPlcCod (Plc->PlcCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_place, - Txt_Remove_place); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_plugin.c b/swad_plugin.c index 34e49ebea..021a253bf 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -351,7 +351,6 @@ void Plg_FreeListPlugins (void) static void Plg_ListPluginsForEdition (void) { extern const char *Txt_Plugins; - extern const char *Txt_Remove_plugin; unsigned NumPlg; struct Plugin *Plg; @@ -372,11 +371,7 @@ static void Plg_ListPluginsForEdition (void) ""); Act_FormStart (ActRemPlg); Plg_PutParamPlgCod (Plg->PlgCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_plugin, - Txt_Remove_plugin); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_record.c b/swad_record.c index bb5069fbf..94afa7e15 100644 --- a/swad_record.c +++ b/swad_record.c @@ -182,7 +182,6 @@ void Rec_GetListRecordFieldsInCurrentCrs (void) void Rec_ListFieldsRecordsForEdition (void) { - extern const char *Txt_Remove_record_field; extern const char *Txt_RECORD_FIELD_VISIBILITY_MENU[Rec_NUM_TYPES_VISIBILITY]; unsigned NumField; Rec_VisibilityRecordFields_t Vis; @@ -201,11 +200,7 @@ void Rec_ListFieldsRecordsForEdition (void) fprintf (Gbl.F.Out,"",Gbl.RowEvenOdd); Act_FormStart (ActReqRemFie); Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_record_field, - Txt_Remove_record_field); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_survey.c b/swad_survey.c index 1929bef47..53e6425f7 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -2928,7 +2928,6 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ extern const char *Txt_SURVEY_STR_ANSWER_TYPES[Svy_NUM_ANS_TYPES]; extern const char *Txt_This_survey_has_no_questions; extern const char *Txt_Send_survey; - extern const char *Txt_Remove_question; extern const char *Txt_Edit_question; extern const char *Txt_New_question; char Query[512]; @@ -3005,11 +3004,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ Svy_PutParamQstCod (SvyQst->QstCod); Sta_WriteParamsDatesSeeAccesses (); Svy_WriteParamEditQst (SvyQst); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_question, - Txt_Remove_question); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_syllabus.c b/swad_syllabus.c index 7d9ff88e6..a3a38e0f7 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -514,7 +514,6 @@ static void Syl_ShowSyllabus (Inf_InfoType_t InfoType) static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Level,int *CodItem,const char *Text,bool NewItem) { - extern const char *Txt_Remove; extern const char *Txt_Move_up_X_and_its_subsections; extern const char *Txt_Move_up_X; extern const char *Txt_Movement_not_allowed; @@ -553,13 +552,7 @@ static void Syl_ShowRowSyllabus (Inf_InfoType_t InfoType,unsigned NumItem,int Le Act_FormStart (InfoType == Inf_LECTURES ? ActDelItmSylLec : ActDelItmSylPra); Syl_PutParamNumItem (NumItem); - sprintf (Gbl.Title,"%s %s", - Txt_Remove,StrItemCod); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Gbl.Title, - Gbl.Title); + Lay_PutIconRemove (); Act_FormEnd (); } fprintf (Gbl.F.Out,""); diff --git a/swad_test.c b/swad_test.c index 240452537..d60b39780 100644 --- a/swad_test.c +++ b/swad_test.c @@ -2402,7 +2402,6 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES]; extern const char *Txt_Shuffle; extern const char *Txt_Edit_question; - extern const char *Txt_Remove_question; Tst_QuestionsOrder_t Order; unsigned long NumRow; MYSQL_ROW row; @@ -2505,11 +2504,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m Par_PutHiddenParamChar ("OnlyThisQst", NumRows == 1 ? 'Y' : 'N'); // If there are only one row, don't list again after removing - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove_question, - Txt_Remove_question); + Lay_PutIconRemove (); Act_FormEnd (); fprintf (Gbl.F.Out,""); diff --git a/swad_text.c b/swad_text.c index e08f52282..e1e6aa194 100644 --- a/swad_text.c +++ b/swad_text.c @@ -7480,27 +7480,6 @@ const char *Txt_Degrees_with_pending_courses = "Titulaçãos com disciplinas pendentes"; #endif -const char *Txt_Delete_message = -#if L==0 - "Eliminar mensaje"; // Necessita traduccio -#elif L==1 - "Entfernen Nachricht"; -#elif L==2 - "Delete message"; -#elif L==3 - "Eliminar mensaje"; -#elif L==4 - "Supprimer message"; -#elif L==5 - "Eliminar mensaje"; // Okoteve traducción -#elif L==6 - "Rimuovere messaggio"; -#elif L==7 - "Usuń wiadomosc"; -#elif L==8 - "Remover mensagem"; -#endif - const char *Txt_Delete_messages_received = #if L==0 "Eliminar missatges rebuts"; @@ -28648,153 +28627,6 @@ const char *Txt_Remove_assignment = "Remover atividade"; #endif -const char *Txt_Remove_banner = -#if L==0 - "Eliminar enlace"; // Necessita traduccio -#elif L==1 - "Entfernen Werbebanner"; -#elif L==2 - "Remove banner"; -#elif L==3 - "Eliminar banner"; -#elif L==4 - "Supprimer banniére"; -#elif L==5 - "Eliminar banner"; // Okoteve traducción -#elif L==6 - "Rimuovere banner"; -#elif L==7 - "Usuń banner"; -#elif L==8 - "Remover banner"; -#endif - -const char *Txt_Remove_centre = -#if L==0 - "Eliminar centro"; // Necessita traduccio -#elif L==1 - "Lehrinstitut entfernen"; -#elif L==2 - "Remove centre"; -#elif L==3 - "Eliminar centro"; -#elif L==4 - "Supprimer centre"; -#elif L==5 - "Eliminar centro"; // Okoteve traducción -#elif L==6 - "Rimuovere centro"; -#elif L==7 - "Usuń centrum"; -#elif L==8 - "Remover centro"; -#endif - -const char *Txt_Remove_country = -#if L==0 - "Eliminar país"; // Necessita traduccio -#elif L==1 - "Land entfernen"; -#elif L==2 - "Remove country"; -#elif L==3 - "Eliminar país"; -#elif L==4 - "Supprimer pays"; -#elif L==5 - "Eliminar país"; // Okoteve traducción -#elif L==6 - "Rimuovere paese"; -#elif L==7 - "Usuń kraj"; -#elif L==8 - "Remover país"; -#endif - -const char *Txt_Remove_course = -#if L==0 - "Eliminar asignatura"; // Necessita traduccio -#elif L==1 - "Kurs entfernen"; -#elif L==2 - "Remove course"; -#elif L==3 - "Eliminar asignatura"; -#elif L==4 - "Supprimer matière"; -#elif L==5 - "Eliminar asignatura"; // Okoteve traducción -#elif L==6 - "Rimuovere corso"; -#elif L==7 - "Usuń kurs"; -#elif L==8 - "Remover disciplina"; -#endif - -const char *Txt_Remove_degree = -#if L==0 - "Eliminar titulación"; // Necessita traduccio -#elif L==1 - "Studiengang Entfernen"; -#elif L==2 - "Remove degree"; -#elif L==3 - "Eliminar titulación"; -#elif L==4 - "Supprimer étude"; -#elif L==5 - "Eliminar titulación"; // Okoteve traducción -#elif L==6 - "Rimuovere laurea"; -#elif L==7 - "Usuń stopnia"; -#elif L==8 - "Remover titulação"; -#endif - -const char *Txt_Remove_department = -#if L==0 - "Eliminar departamento"; // Necessita traduccio -#elif L==1 - "Abteilung entfernen"; -#elif L==2 - "Remove department"; -#elif L==3 - "Eliminar departamento"; -#elif L==4 - "Supprimer département"; -#elif L==5 - "Eliminar departamento"; // Okoteve traducción -#elif L==6 - "Rimuovere dipartimento"; -#elif L==7 - "Usuń dział"; -#elif L==8 - "Remover departamento"; -#endif - -const char *Txt_Remove_email_X = // Warning: it is very important to include %s in the following sentences -#if L==0 - "Eliminar correu %s"; -#elif L==1 - "Entfernen E-Mail %s"; -#elif L==2 - "Remove e-mail %s"; -#elif L==3 - "Eliminar correo %s"; -#elif L==4 - "Supprimer courrier %s"; -#elif L==5 - "Eliminar correo %s"; // Okoteve traducción -#elif L==6 - "Rimuovere e-mail %s"; -#elif L==7 - "Usuń e-mail %s"; -#elif L==8 - "Remover e-mail %s"; -#endif - const char *Txt_Remove_event = #if L==0 "Eliminar evento"; // Necessita traduccio @@ -28837,48 +28669,6 @@ const char *Txt_Remove_file = "Remover arquivo"; #endif -const char *Txt_Remove_FILE_OR_LINK_X = // Warning: it is very important to include %s in the following sentences -#if L==0 - "Eliminar %s"; -#elif L==1 - "Datei %s"; -#elif L==2 - "Remove %s"; -#elif L==3 - "Eliminar %s"; -#elif L==4 - "Supprimer %s"; -#elif L==5 - "Eliminar %s"; // Okoteve traducción -#elif L==6 - "Rimuovere %s"; -#elif L==7 - "Usuń %s"; -#elif L==8 - "Remover %s"; -#endif - -const char *Txt_Remove_folder_X = // Warning: it is very important to include %s in the following sentences -#if L==0 - "Eliminar carpeta %s"; -#elif L==1 - "Verzeichnis entfernen %s"; -#elif L==2 - "Remove folder %s"; -#elif L==3 - "Eliminar carpeta %s"; -#elif L==4 - "Supprimer répertoire %s"; -#elif L==5 - "Eliminar carpeta %s"; // Okoteve traducción -#elif L==6 - "Rimuovere cartella %s"; -#elif L==7 - "Usuń folder %s"; -#elif L==8 - "Remover diretório %s"; -#endif - const char *Txt_Remove_folder = #if L==0 "Eliminar carpeta"; @@ -28921,69 +28711,6 @@ const char *Txt_Remove_group = "Remover grupo"; #endif -const char *Txt_Remove_holiday = -#if L==0 - "Eliminar festividad"; // Necessita traduccio -#elif L==1 - "Entfernen Feiertag"; -#elif L==2 - "Remove holiday"; -#elif L==3 - "Eliminar festividad"; -#elif L==4 - "Supprimer fête"; -#elif L==5 - "Eliminar festividad"; // Okoteve traducción -#elif L==6 - "Rimuovere festività"; -#elif L==7 - "Usuń wakacje"; -#elif L==8 - "Remover féria"; -#endif - -const char *Txt_Remove_ID_X = // Warning: it is very important to include %s in the following sentences -#if L==0 - "Eliminar ID (DNI/cèdula/passaport) %s"; -#elif L==1 - "Entfernen Ausweis-Nr. %s"; -#elif L==2 - "Remove ID %s"; -#elif L==3 - "Eliminar ID (DNI/cédula) %s"; -#elif L==4 - "Supprimer numéro d'identité %s"; -#elif L==5 - "Eliminar ID (DNI/cédula) %s"; // Okoteve traducción -#elif L==6 - "Rimuovere carta d'identità %s"; -#elif L==7 - "Remove ID %s"; // Potrzebujesz tlumaczenie -#elif L==8 - "Remover nº de identif. %s"; -#endif - -const char *Txt_Remove_institution = -#if L==0 - "Eliminar institución"; // Necessita traduccio -#elif L==1 - "Hochschule entfernen"; -#elif L==2 - "Remove institution"; -#elif L==3 - "Eliminar institución"; -#elif L==4 - "Supprimer établissement"; -#elif L==5 - "Eliminar institución"; // Okoteve traducción -#elif L==6 - "Rimuovere istituzione"; -#elif L==7 - "Usuń instytucje"; -#elif L==8 - "Remover instituição"; -#endif - const char *Txt_Remove_link = #if L==0 "Eliminar enllaç"; @@ -29026,48 +28753,6 @@ const char *Txt_Remove_logo = "Remover logotipo"; #endif -const char *Txt_Remove_mail_domain = -#if L==0 - "Eliminar dominio de correo"; // Necessita traduccio -#elif L==1 - "Entfernen Mail-Domäne"; -#elif L==2 - "Remove mail domain"; -#elif L==3 - "Eliminar dominio de correo"; -#elif L==4 - "Supprimer domaine de messagerie"; -#elif L==5 - "Eliminar dominio de correo"; // Okoteve traducción -#elif L==6 - "Rimuovere campo mail"; -#elif L==7 - "Usuń domene mail"; -#elif L==8 - "Remover domínio de email"; -#endif - -const char *Txt_Remove_nickname_X = // Warning: it is very important to include %s in the following sentences -#if L==0 - "Eliminar sobrenom @%s"; -#elif L==1 - "Entfernen Benutzername @%s"; -#elif L==2 - "Remove nickname @%s"; -#elif L==3 - "Eliminar apodo @%s"; -#elif L==4 - "Supprimer surnom @%s"; -#elif L==5 - "Eliminar apodo @%s"; // Okoteve traducción -#elif L==6 - "Rimuovere nome utente @%s"; -#elif L==7 - "Usuń pseudonim @%s"; -#elif L==8 - "Remover alcunha @%s"; -#endif - const char *Txt_Remove_me_as_an_administrator = #if L==0 "Eliminarme com a administrador"; @@ -29221,27 +28906,6 @@ const char *Txt_Remove_me_from_the_course_X = // Warning: it is very important t "Tirar me da disciplina %s"; #endif -const char *Txt_Remove_notice = -#if L==0 - "Eliminar aviso"; // Necessita traduccio -#elif L==1 - "Entfernen Ankündigung"; -#elif L==2 - "Remove notice"; -#elif L==3 - "Eliminar aviso"; -#elif L==4 - "Supprimer avis"; -#elif L==5 - "Eliminar aviso"; // Okoteve traducción -#elif L==6 - "Rimuovere avviso"; -#elif L==7 - "Usuń ogloszenie"; -#elif L==8 - "Remover aviso"; -#endif - const char *Txt_Remove_old_users = #if L==0 "Eliminar usuaris antics"; @@ -29284,90 +28948,6 @@ const char *Txt_Remove_photo = "Remover foto"; #endif -const char *Txt_Remove_place = -#if L==0 - "Eliminar lugar"; // Necessita traduccio -#elif L==1 - "Entfernen Standort"; -#elif L==2 - "Remove place"; -#elif L==3 - "Eliminar lugar"; -#elif L==4 - "Supprimer emplacement"; -#elif L==5 - "Eliminar lugar"; // Okoteve traducción -#elif L==6 - "Rimuovere localit`"; -#elif L==7 - "Usuń miejsce"; -#elif L==8 - "Remover localização"; -#endif - -const char *Txt_Remove_plugin = -#if L==0 - "Eliminar complemento"; // Necessita traduccio -#elif L==1 - "Entfernen Plugin"; -#elif L==2 - "Remove plugin"; -#elif L==3 - "Eliminar complemento"; -#elif L==4 - "Supprimer plugin"; -#elif L==5 - "Eliminar complemento"; // Okoteve traducción -#elif L==6 - "Rimuovere plugin"; -#elif L==7 - "Usuń plugin"; -#elif L==8 - "Remover plugin"; -#endif - -const char *Txt_Remove_post = -#if L==0 - "Eliminar mensaje"; // Necessita traduccio -#elif L==1 - "Entfernen Beiträg"; -#elif L==2 - "Remove post"; -#elif L==3 - "Eliminar mensaje"; -#elif L==4 - "Supprimer message"; -#elif L==5 - "Eliminar mensaje"; // Okoteve traducción -#elif L==6 - "Rimuovere post"; -#elif L==7 - "Usuń post"; -#elif L==8 - "Remover post"; -#endif - -const char *Txt_Remove_question = -#if L==0 - "Eliminar pregunta"; // Necessita traduccio -#elif L==1 - "Entfernen Frage"; -#elif L==2 - "Remove question"; -#elif L==3 - "Eliminar pregunta"; -#elif L==4 - "Supprimer question"; -#elif L==5 - "Eliminar pregunta"; // Okoteve traducción -#elif L==6 - "Rimuovere domanda"; -#elif L==7 - "Usuń pytanie"; -#elif L==8 - "Remover questão"; -#endif - const char *Txt_Remove_record_field = #if L==0 "Eliminar campo de ficha"; // Necessita traduccio @@ -29473,27 +29053,6 @@ const char *Txt_Remove_thread = "Remover thread"; #endif -const char *Txt_Remove_type_of_degree = -#if L==0 - "Eliminar tipo de titulación"; // Necessita traduccio -#elif L==1 - "Entfernen Abschlussart"; -#elif L==2 - "Remove type of degree"; -#elif L==3 - "Eliminar tipo de titulación"; -#elif L==4 - "Supprimer type d'étude"; -#elif L==5 - "Eliminar tipo de titulación"; // Okoteve traducción -#elif L==6 - "Rimuovere tipo di laurea"; -#elif L==7 - "Usuń typu stopien"; -#elif L==8 - "Remover tipo de titulaçã"; -#endif - const char *Txt_Remove_type_of_group = #if L==0 "Eliminar tipo de grupo"; // Necessita traduccio