From 243d7cee1e2be3b25c56c003d98db345481a8611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Tue, 26 Mar 2019 11:53:21 +0100 Subject: [PATCH] Version18.89 --- Makefile | 5 +- swad_action.c | 52 +++--- swad_action.h | 2 +- swad_agenda.c | 24 +-- swad_assignment.c | 6 +- swad_attendance.c | 8 +- swad_calendar.c | 28 +-- swad_changelog.h | 4 +- swad_config.h | 2 +- swad_country.c | 2 +- swad_date.c | 14 +- swad_game.c | 6 +- swad_global.c | 2 +- swad_group.c | 8 +- swad_help_URL.c | 240 +++++++++++++------------- swad_icon.c | 28 +-- swad_icon.h | 2 +- swad_language.c | 24 +-- swad_language.h | 2 +- swad_layout.c | 4 +- swad_main.c | 4 +- swad_media.c | 2 +- swad_menu.c | 26 +-- swad_notification.c | 24 +-- swad_parameter.c | 9 +- swad_photo.c | 6 +- swad_preference.c | 404 -------------------------------------------- swad_preference.h | 60 ------- swad_privacy.c | 16 +- swad_profile.c | 10 +- swad_project.c | 24 +-- swad_record.c | 2 +- swad_setup.c | 2 +- swad_setup.h | 6 +- swad_survey.c | 6 +- swad_test.c | 2 +- swad_text.c | 60 +++---- swad_text_no_html.c | 18 +- swad_theme.c | 24 +-- swad_timeline.c | 14 +- swad_timetable.c | 8 +- swad_user.c | 48 +++--- 42 files changed, 387 insertions(+), 851 deletions(-) delete mode 100644 swad_preference.c delete mode 100644 swad_preference.h diff --git a/Makefile b/Makefile index b042bf5c..b0e79157 100644 --- a/Makefile +++ b/Makefile @@ -46,11 +46,10 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \ swad_message.o swad_MFU.o \ swad_network.o swad_nickname.o swad_notice.o swad_notification.o \ swad_pagination.o swad_parameter.o swad_password.o swad_photo.o \ - swad_place.o swad_plugin.o swad_preference.o swad_privacy.o \ - swad_profile.o swad_project.o \ + swad_place.o swad_plugin.o swad_privacy.o swad_profile.o swad_project.o \ swad_QR.o \ swad_record.o swad_report.o swad_role.o swad_RSS.o \ - swad_scope.o swad_search.o swad_session.o swad_setup.o \ + swad_scope.o swad_search.o swad_session.o swad_setting.o swad_setup.o \ swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \ swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o \ swad_timeline.o swad_timetable.o \ diff --git a/swad_action.c b/swad_action.c index 53979957..bd55fd9a 100644 --- a/swad_action.c +++ b/swad_action.c @@ -64,7 +64,6 @@ #include "swad_parameter.h" #include "swad_password.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_privacy.h" #include "swad_profile.h" #include "swad_project.h" @@ -72,6 +71,7 @@ #include "swad_report.h" #include "swad_role.h" #include "swad_search.h" +#include "swad_setting.h" #include "swad_setup.h" #include "swad_tab.h" #include "swad_test_import.h" @@ -1497,7 +1497,7 @@ Profile: 1271. ActSeeMyAgd Show my full agenda (personal organizer) 1272. ActFrmMyAcc Show form to the creation or change of user's account 1273. ActReqEdiRecSha Request the edition of the record with the personal data of the user - 1274. ActReqEdiPrf Show forms to edit preferences + 1274. ActReqEdiSet Show forms to edit settings 1275. ActChgMyRol Change type of logged user @@ -1559,7 +1559,7 @@ Profile: 1325. ActChgPriPho Change privacy of my photo 1326. ActChgBasPriPrf Change privacy of my basic public profile NEW. ActChgExtPriPrf Change privacy of my extended public profile - NEW. ActChgCooPrf Change preference about third party cookies + NEW. ActChgCooPrf Change setting about third party cookies 1327. ActChgNtfPrf Change whether to notify by email new messages 1328. ActPrnUsrQR Show my QR code ready to print @@ -1677,7 +1677,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeePen */{1060, 1,TabSys,ActSeePen , 0, 0, 0, 0, 0, 0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Hie_SeePending ,"sitemap" }, /* ActSeeLnk */{ 748, 2,TabSys,ActSeeLnk , 0, 0, 0, 0, 0, 0,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lnk_SeeLinks ,"link" }, /* ActLstPlg */{ 777, 3,TabSys,ActLstPlg , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plg_ListPlugins ,"puzzle-piece" }, - /* ActSetUp */{ 840, 4,TabSys,ActSetUp , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Set_Setup ,"bolt" }, + /* ActSetUp */{ 840, 4,TabSys,ActSetUp , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,SUp_SetUp ,"bolt" }, // Actions not in menu: /* ActEdiCty */{ 863,-1,TabUnk,ActSeeCty , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cty_EditCountries ,NULL}, @@ -3078,7 +3078,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActSeeMyAgd */{1602, 3,TabPrf,ActSeeMyAgd ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Agd_ShowMyAgenda ,"calendar" }, /* ActFrmMyAcc */{ 36, 4,TabPrf,ActFrmMyAcc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Acc_ShowFormMyAccount ,"at" }, /* ActReqEdiRecSha */{ 285, 5,TabPrf,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ShowMySharedRecordAndMore ,"card" }, - /* ActReqEdiPrf */{ 673, 6,TabPrf,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pre_EditPrefs ,"cog" }, + /* ActReqEdiSet */{ 673, 6,TabPrf,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Set_EditSettings ,"cog" }, // Actions not in menu: /* ActChgMyRol */{ 589,-1,TabUnk,ActFrmRolSes ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Rol_ChangeMyRole ,Usr_ShowFormsLogoutAndRole ,NULL}, @@ -3131,23 +3131,23 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = /* ActReqEdiMyNet */{1172,-1,TabUnk,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ShowMySharedRecordAndMore ,NULL}, /* ActChgMyNet */{1173,-1,TabUnk,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Net_UpdateMyWebsAndSocialNets ,NULL}, - /* ActChgThe */{ 841,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,The_ChangeTheme ,Pre_EditPrefs ,NULL}, - /* ActReqChgLan */{ 992,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lan_AskChangeLanguage ,NULL}, - /* ActChgLan */{ 654,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Lan_ChangeLanguage ,Pre_EditPrefs ,NULL}, - /* ActChg1stDay */{1484,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Pre_EditPrefs ,NULL}, - /* ActChgDatFmt */{1638,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_ChangeDateFormat ,Pre_EditPrefs ,NULL}, - /* ActChgCol */{ 674,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ChangeSideCols ,Pre_EditPrefs ,NULL}, - /* ActHidLftCol */{ 668,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_HideLeftCol ,Pre_EditPrefs ,NULL}, - /* ActHidRgtCol */{ 669,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_HideRightCol ,Pre_EditPrefs ,NULL}, - /* ActShoLftCol */{ 670,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ShowLeftCol ,Pre_EditPrefs ,NULL}, - /* ActShoRgtCol */{ 671,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ShowRightCol ,Pre_EditPrefs ,NULL}, - /* ActChgIco */{1092,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Pre_EditPrefs ,NULL}, - /* ActChgMnu */{1243,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL}, - /* ActChgPriPho */{ 774,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL}, - /* ActChgBasPriPrf */{1404,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeBasicProfileVis ,NULL}, - /* ActChgExtPriPrf */{1765,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeExtendedProfileVis ,NULL}, - /* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL}, - /* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL}, + /* ActChgThe */{ 841,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,The_ChangeTheme ,Set_EditSettings ,NULL}, + /* ActReqChgLan */{ 992,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lan_AskChangeLanguage ,NULL}, + /* ActChgLan */{ 654,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Lan_ChangeLanguage ,Set_EditSettings ,NULL}, + /* ActChg1stDay */{1484,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Set_EditSettings ,NULL}, + /* ActChgDatFmt */{1638,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_ChangeDateFormat ,Set_EditSettings ,NULL}, + /* ActChgCol */{ 674,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ChangeSideCols ,Set_EditSettings ,NULL}, + /* ActHidLftCol */{ 668,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_HideLeftCol ,Set_EditSettings ,NULL}, + /* ActHidRgtCol */{ 669,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_HideRightCol ,Set_EditSettings ,NULL}, + /* ActShoLftCol */{ 670,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ShowLeftCol ,Set_EditSettings ,NULL}, + /* ActShoRgtCol */{ 671,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ShowRightCol ,Set_EditSettings ,NULL}, + /* ActChgIco */{1092,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Set_EditSettings ,NULL}, + /* ActChgMnu */{1243,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Set_EditSettings ,NULL}, + /* ActChgPriPho */{ 774,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL}, + /* ActChgBasPriPrf */{1404,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeBasicProfileVis ,NULL}, + /* ActChgExtPriPrf */{1765,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeExtendedProfileVis ,NULL}, + /* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL}, + /* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Set_EditSettings ,NULL}, /* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_PrintUsrQRCode ,NULL}, @@ -3832,7 +3832,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActShoLftCol, // #670 ActShoRgtCol, // #671 -1, // #672 (obsolete action) - ActReqEdiPrf, // #673 + ActReqEdiSet, // #673 ActChgCol, // #674 ActSeeDpt, // #675 ActSeeCtr, // #676 @@ -5249,14 +5249,14 @@ void Act_AdjustCurrentAction (void) /***** Adjustment 5: ------------- - If any of my preferences about privacy is unknown + If any of my settings about privacy is unknown the only action possible - is to show a form to change my preferences *****/ + is to show a form to change my settings *****/ if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN || Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN || Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN) { - Gbl.Action.Act = ActReqEdiPrf; + Gbl.Action.Act = ActReqEdiSet; Tab_SetCurrentTab (); return; } diff --git a/swad_action.h b/swad_action.h index e0452046..243ced39 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1530,7 +1530,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActSeeMyAgd (ActSeeMyUsgRep + 4) #define ActFrmMyAcc (ActSeeMyUsgRep + 5) #define ActReqEdiRecSha (ActSeeMyUsgRep + 6) -#define ActReqEdiPrf (ActSeeMyUsgRep + 7) +#define ActReqEdiSet (ActSeeMyUsgRep + 7) // Secondary actions #define ActChgMyRol (ActSeeMyUsgRep + 8) #define ActFrmNewEvtMyAgd (ActSeeMyUsgRep + 9) diff --git a/swad_agenda.c b/swad_agenda.c index 6080bf7e..38823e23 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -42,9 +42,9 @@ #include "swad_pagination.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_privacy.h" #include "swad_QR.h" +#include "swad_setting.h" #include "swad_string.h" #include "swad_table.h" @@ -158,11 +158,11 @@ void Agd_ShowMyAgenda (void) Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE); /***** Put forms to choice which events to show *****/ - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Agd_ShowFormToSelPast__FutureEvents (); Agd_ShowFormToSelPrivatPublicEvents (); Agd_ShowFormToSelHiddenVisiblEvents (); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); /***** Show the current events in the user's agenda *****/ Agd_ShowEventsToday (Agd_MY_AGENDA_TODAY); @@ -188,7 +188,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void) "calendar-plus.svg", // Agd_FUTURE_EVENTS }; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (PstFut = Agd_PAST___EVENTS; PstFut <= Agd_FUTURE_EVENTS; PstFut++) @@ -202,12 +202,12 @@ static void Agd_ShowFormToSelPast__FutureEvents (void) Gbl.Agenda.HiddenVisiblEvents, Gbl.Agenda.CurrentPage, -1L); - Ico_PutPrefIconLink (Icon[PstFut], + Ico_PutSettingIconLink (Icon[PstFut], Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ @@ -224,7 +224,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void) "unlock.svg", // Agd_PUBLIC_EVENTS }; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (PrvPub = Agd_PRIVAT_EVENTS; PrvPub <= Agd_PUBLIC_EVENTS; PrvPub++) @@ -238,12 +238,12 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void) Gbl.Agenda.HiddenVisiblEvents, Gbl.Agenda.CurrentPage, -1L); - Ico_PutPrefIconLink (Icon[PrvPub], + Ico_PutSettingIconLink (Icon[PrvPub], Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ @@ -260,7 +260,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void) "eye.svg", // Agd_VISIBL_EVENTS }; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (HidVis = Agd_HIDDEN_EVENTS; HidVis <= Agd_VISIBL_EVENTS; HidVis++) @@ -274,12 +274,12 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void) Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle Gbl.Agenda.CurrentPage, -1L); - Ico_PutPrefIconLink (Icon[HidVis], + Ico_PutSettingIconLink (Icon[HidVis], Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ diff --git a/swad_assignment.c b/swad_assignment.c index d0cf23ac..4fa6f972 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -41,7 +41,7 @@ #include "swad_pagination.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" +#include "swad_setting.h" #include "swad_string.h" #include "swad_table.h" @@ -147,9 +147,9 @@ static void Asg_ShowAllAssignments (void) /***** Select whether show only my groups or all groups *****/ if (Gbl.CurrentCrs.Grps.NumGrps) { - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } if (Gbl.Asgs.Num) diff --git a/swad_attendance.c b/swad_attendance.c index fc6f69ae..3be28edf 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -41,8 +41,8 @@ #include "swad_pagination.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_QR.h" +#include "swad_setting.h" #include "swad_table.h" /*****************************************************************************/ @@ -228,9 +228,9 @@ static void Att_ShowAllAttEvents (void) /***** Select whether show only my groups or all groups *****/ if (Gbl.CurrentCrs.Grps.NumGrps) { - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } if (Gbl.AttEvents.Num) @@ -1865,7 +1865,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Save_changes; - /***** Get my preference about photos in users' list for current course *****/ + /***** Get my setting about photos in users' list for current course *****/ Usr_GetMyPrefAboutListWithPhotosFromDB (); /***** Start form *****/ diff --git a/swad_calendar.c b/swad_calendar.c index 02a3777f..5ba93c3c 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -34,7 +34,7 @@ #include "swad_form.h" #include "swad_global.h" #include "swad_parameter.h" -#include "swad_preference.h" +#include "swad_setting.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -77,19 +77,19 @@ static void Cal_PutIconsCalendar (void); void Cal_PutIconsToSelectFirstDayOfWeek (void) { - extern const char *Hlp_PROFILE_Preferences_calendar; + extern const char *Hlp_PROFILE_Settings_calendar; extern const char *Txt_Calendar; Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek, - Hlp_PROFILE_Preferences_calendar,Box_NOT_CLOSABLE); - Pre_StartPrefsHead (); + Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE); + Set_StartSettingsHead (); Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); Box_EndBox (); } /*****************************************************************************/ -/*********** Put contextual icons in first-day-of-week preference ************/ +/************ Put contextual icons in first-day-of-week setting **************/ /*****************************************************************************/ static void Cal_PutIconsFirstDayOfWeek (void) @@ -110,7 +110,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ()) unsigned FirstDayOfWeek; char Icon[32 + 1]; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (FirstDayOfWeek = 0; // Monday FirstDayOfWeek <= 6; // Sunday FirstDayOfWeek++) @@ -129,11 +129,11 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ()) snprintf (Icon,sizeof (Icon), "first-day-of-week-%u.png", FirstDayOfWeek); - Ico_PutPrefIconLink (Icon,Gbl.Title); + Ico_PutSettingIconLink (Icon,Gbl.Title); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ @@ -147,14 +147,14 @@ void Cal_ChangeFirstDayOfWeek (void) /***** Store icon first day of week database *****/ if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preference about first day of week", + DB_QueryUPDATE ("can not update your setting about first day of week", "UPDATE usr_data SET FirstDayOfWeek=%u" " WHERE UsrCod=%ld", Gbl.Prefs.FirstDayOfWeek, Gbl.Usrs.Me.UsrDat.UsrCod); - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); + /***** Set settings from current IP *****/ + Set_SetSettingsFromIP (); } /*****************************************************************************/ @@ -270,9 +270,9 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, /***** Preference selector to change first day of week *****/ if (!PrintView) { - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,NULL); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } /***** Draw several months *****/ diff --git a/swad_changelog.h b/swad_changelog.h index 707c7d37..1118b882 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -466,10 +466,12 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.88 (2019-03-25)" +#define Log_PLATFORM_VERSION "SWAD 18.89 (2019-03-26)" #define CSS_FILE "swad18.88.css" #define JS_FILE "swad18.88.js" /* + Version 18.89: Mar 26, 2019 Corrections in help links after recent changes. + Module swad_preference is renamed swad_setting. (241090 lines) Version 18.88: Mar 25, 2019 Change in usability of exam announcements, suggested by Mancia Anguita López and Javier Fernández Baldomero. (241089 lines) Version 18.87.1: Mar 24, 2019 Code refactoring in notices. (241011 lines) Version 18.87: Mar 24, 2019 Change in usability of notices. (240997 lines) diff --git a/swad_config.h b/swad_config.h index 02d698f4..483c9228 100644 --- a/swad_config.h +++ b/swad_config.h @@ -528,7 +528,7 @@ #define Cfg_TIME_TO_DELETE_OLD_PENDING_PASSWORDS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending passwords #define Cfg_TIME_TO_DELETE_OLD_PENDING_EMAILS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending emails -#define Cfg_TIME_TO_DELETE_IP_PREFS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired IP preferences +#define Cfg_TIME_TO_DELETE_IP_PREFS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired IP settings #define Cfg_TIME_TO_DELETE_OLD_NOTIF ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired notifications diff --git a/swad_country.c b/swad_country.c index 0a2abd5a..0f2f1db0 100644 --- a/swad_country.c +++ b/swad_country.c @@ -41,8 +41,8 @@ #include "swad_help.h" #include "swad_institution.h" #include "swad_language.h" -#include "swad_preference.h" #include "swad_QR.h" +#include "swad_setting.h" #include "swad_table.h" /*****************************************************************************/ diff --git a/swad_date.c b/swad_date.c index d52777c8..b1422381 100644 --- a/swad_date.c +++ b/swad_date.c @@ -36,7 +36,7 @@ #include "swad_form.h" #include "swad_global.h" #include "swad_parameter.h" -#include "swad_preference.h" +#include "swad_setting.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -99,13 +99,13 @@ static unsigned Dat_GetParamDateFormat (void); void Dat_PutBoxToSelectDateFormat (void) { - extern const char *Hlp_PROFILE_Preferences_dates; + extern const char *Hlp_PROFILE_Settings_dates; extern const char *Txt_Dates; Dat_Format_t Format; /***** Start box *****/ Box_StartBox (NULL,Txt_Dates,Dat_PutIconsDateFormat, - Hlp_PROFILE_Preferences_dates,Box_NOT_CLOSABLE); + Hlp_PROFILE_Settings_dates,Box_NOT_CLOSABLE); /***** Form with list of options *****/ Frm_StartForm (ActChgDatFmt); @@ -142,7 +142,7 @@ void Dat_PutBoxToSelectDateFormat (void) } /*****************************************************************************/ -/************** Put contextual icons in date-format preference ***************/ +/*************** Put contextual icons in date-format setting *****************/ /*****************************************************************************/ static void Dat_PutIconsDateFormat (void) @@ -183,14 +183,14 @@ void Dat_ChangeDateFormat (void) /***** Store date format in database *****/ if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preference about date format", + DB_QueryUPDATE ("can not update your setting about date format", "UPDATE usr_data SET DateFormat=%u" " WHERE UsrCod=%ld", (unsigned) Gbl.Prefs.DateFormat, Gbl.Usrs.Me.UsrDat.UsrCod); - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); + /***** Set settings from current IP *****/ + Set_SetSettingsFromIP (); } /*****************************************************************************/ diff --git a/swad_game.c b/swad_game.c index a9beb9c5..2dbfc3e8 100644 --- a/swad_game.c +++ b/swad_game.c @@ -41,8 +41,8 @@ #include "swad_group.h" #include "swad_pagination.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_role.h" +#include "swad_setting.h" #include "swad_table.h" #include "swad_test.h" @@ -225,9 +225,9 @@ static void Gam_ListAllGames (void) /***** Select whether show only my groups or all groups *****/ if (Gbl.CurrentCrs.Grps.NumGrps) { - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Grp_ShowFormToSelWhichGrps (ActSeeAllGam,Gam_ParamsWhichGroupsToShow); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } if (Gbl.Games.Num) diff --git a/swad_global.c b/swad_global.c index 5a0cb16f..84585fbb 100644 --- a/swad_global.c +++ b/swad_global.c @@ -43,9 +43,9 @@ #include "swad_global.h" #include "swad_icon.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_project.h" #include "swad_role.h" +#include "swad_setting.h" #include "swad_theme.h" #include "swad_web_service.h" diff --git a/swad_group.c b/swad_group.c index b93d600e..568c94e3 100644 --- a/swad_group.c +++ b/swad_group.c @@ -40,8 +40,8 @@ #include "swad_group.h" #include "swad_notification.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_project.h" +#include "swad_setting.h" #include "swad_table.h" /*****************************************************************************/ @@ -5023,7 +5023,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()) extern const char *Txt_GROUP_WHICH_GROUPS[2]; Grp_WhichGroups_t WhichGrps; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (WhichGrps = Grp_ONLY_MY_GROUPS; WhichGrps <= Grp_ALL_GROUPS; WhichGrps++) @@ -5035,13 +5035,13 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ()) Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps); if (FuncParams) // Extra parameters depending on the action FuncParams (); - Ico_PutPrefIconLink (WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" : + Ico_PutSettingIconLink (WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" : "sitemap.svg", Txt_GROUP_WHICH_GROUPS[WhichGrps]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ diff --git a/swad_help_URL.c b/swad_help_URL.c index 33f52b7b..9d598bbb 100644 --- a/swad_help_URL.c +++ b/swad_help_URL.c @@ -3500,254 +3500,254 @@ const char *Hlp_PROFILE_Photo = "PROFILE.Photo.en"; #endif -const char *Hlp_PROFILE_Preferences_internationalization = +const char *Hlp_PROFILE_Settings_internationalization = #if L==1 - "PROFILE.Preferences.es#internacionalizaci%C3%B3n"; + "PROFILE.Settings.es#internacionalizaci%C3%B3n"; #elif L==2 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #elif L==3 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #elif L==4 - "PROFILE.Preferences.es#internacionalizaci%C3%B3n"; + "PROFILE.Settings.es#internacionalizaci%C3%B3n"; #elif L==5 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #elif L==6 - "PROFILE.Preferences.es#internacionalizaci%C3%B3n"; + "PROFILE.Settings.es#internacionalizaci%C3%B3n"; #elif L==7 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #elif L==8 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #elif L==9 - "PROFILE.Preferences.en#internationalization"; + "PROFILE.Settings.en#internationalization"; #endif -const char *Hlp_PROFILE_Preferences_language = +const char *Hlp_PROFILE_Settings_language = #if L==1 - "PROFILE.Preferences.es#idioma"; + "PROFILE.Settings.es#idioma"; #elif L==2 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #elif L==3 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #elif L==4 - "PROFILE.Preferences.es#idioma"; + "PROFILE.Settings.es#idioma"; #elif L==5 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #elif L==6 - "PROFILE.Preferences.es#idioma"; + "PROFILE.Settings.es#idioma"; #elif L==7 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #elif L==8 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #elif L==9 - "PROFILE.Preferences.en#language"; + "PROFILE.Settings.en#language"; #endif -const char *Hlp_PROFILE_Preferences_calendar = +const char *Hlp_PROFILE_Settings_calendar = #if L==1 - "PROFILE.Preferences.es#calendario"; + "PROFILE.Settings.es#calendario"; #elif L==2 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #elif L==3 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #elif L==4 - "PROFILE.Preferences.es#calendario"; + "PROFILE.Settings.es#calendario"; #elif L==5 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #elif L==6 - "PROFILE.Preferences.es#calendario"; + "PROFILE.Settings.es#calendario"; #elif L==7 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #elif L==8 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #elif L==9 - "PROFILE.Preferences.en#calendar"; + "PROFILE.Settings.en#calendar"; #endif -const char *Hlp_PROFILE_Preferences_dates = +const char *Hlp_PROFILE_Settings_dates = #if L==1 - "PROFILE.Preferences.es#fechas"; + "PROFILE.Settings.es#fechas"; #elif L==2 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #elif L==3 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #elif L==4 - "PROFILE.Preferences.es#fechas"; + "PROFILE.Settings.es#fechas"; #elif L==5 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #elif L==6 - "PROFILE.Preferences.es#fechas"; + "PROFILE.Settings.es#fechas"; #elif L==7 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #elif L==8 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #elif L==9 - "PROFILE.Preferences.en#dates"; + "PROFILE.Settings.en#dates"; #endif -const char *Hlp_PROFILE_Preferences_design = +const char *Hlp_PROFILE_Settings_design = #if L==1 - "PROFILE.Preferences.es#dise%C3%B1o"; + "PROFILE.Settings.es#dise%C3%B1o"; #elif L==2 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #elif L==3 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #elif L==4 - "PROFILE.Preferences.es#dise%C3%B1o"; + "PROFILE.Settings.es#dise%C3%B1o"; #elif L==5 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #elif L==6 - "PROFILE.Preferences.es#dise%C3%B1o"; + "PROFILE.Settings.es#dise%C3%B1o"; #elif L==7 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #elif L==8 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #elif L==9 - "PROFILE.Preferences.en#design"; + "PROFILE.Settings.en#design"; #endif -const char *Hlp_PROFILE_Preferences_icons = +const char *Hlp_PROFILE_Settings_icons = #if L==1 - "PROFILE.Preferences.es#iconos"; + "PROFILE.Settings.es#iconos"; #elif L==2 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #elif L==3 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #elif L==4 - "PROFILE.Preferences.es#iconos"; + "PROFILE.Settings.es#iconos"; #elif L==5 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #elif L==6 - "PROFILE.Preferences.es#iconos"; + "PROFILE.Settings.es#iconos"; #elif L==7 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #elif L==8 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #elif L==9 - "PROFILE.Preferences.en#icons"; + "PROFILE.Settings.en#icons"; #endif -const char *Hlp_PROFILE_Preferences_theme = +const char *Hlp_PROFILE_Settings_theme = #if L==1 - "PROFILE.Preferences.es#tema"; + "PROFILE.Settings.es#tema"; #elif L==2 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #elif L==3 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #elif L==4 - "PROFILE.Preferences.es#tema"; + "PROFILE.Settings.es#tema"; #elif L==5 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #elif L==6 - "PROFILE.Preferences.es#tema"; + "PROFILE.Settings.es#tema"; #elif L==7 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #elif L==8 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #elif L==9 - "PROFILE.Preferences.en#theme"; + "PROFILE.Settings.en#theme"; #endif -const char *Hlp_PROFILE_Preferences_menu = +const char *Hlp_PROFILE_Settings_menu = #if L==1 - "PROFILE.Preferences.es#men%C3%BA"; + "PROFILE.Settings.es#men%C3%BA"; #elif L==2 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #elif L==3 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #elif L==4 - "PROFILE.Preferences.es#men%C3%BA"; + "PROFILE.Settings.es#men%C3%BA"; #elif L==5 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #elif L==6 - "PROFILE.Preferences.es#men%C3%BA"; + "PROFILE.Settings.es#men%C3%BA"; #elif L==7 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #elif L==8 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #elif L==9 - "PROFILE.Preferences.en#menu"; + "PROFILE.Settings.en#menu"; #endif -const char *Hlp_PROFILE_Preferences_columns = +const char *Hlp_PROFILE_Settings_columns = #if L==1 - "PROFILE.Preferences.es#columnas"; + "PROFILE.Settings.es#columnas"; #elif L==2 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #elif L==3 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #elif L==4 - "PROFILE.Preferences.es#columnas"; + "PROFILE.Settings.es#columnas"; #elif L==5 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #elif L==6 - "PROFILE.Preferences.es#columnas"; + "PROFILE.Settings.es#columnas"; #elif L==7 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #elif L==8 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #elif L==9 - "PROFILE.Preferences.en#columns"; + "PROFILE.Settings.en#columns"; #endif -const char *Hlp_PROFILE_Preferences_privacy = +const char *Hlp_PROFILE_Settings_privacy = #if L==1 - "PROFILE.Preferences.es#privacidad"; + "PROFILE.Settings.es#privacidad"; #elif L==2 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #elif L==3 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #elif L==4 - "PROFILE.Preferences.es#privacidad"; + "PROFILE.Settings.es#privacidad"; #elif L==5 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #elif L==6 - "PROFILE.Preferences.es#privacidad"; + "PROFILE.Settings.es#privacidad"; #elif L==7 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #elif L==8 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #elif L==9 - "PROFILE.Preferences.en#privacy"; + "PROFILE.Settings.en#privacy"; #endif -const char *Hlp_PROFILE_Preferences_cookies = +const char *Hlp_PROFILE_Settings_cookies = #if L==1 - "PROFILE.Preferences.es#cookies"; + "PROFILE.Settings.es#cookies"; #elif L==2 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #elif L==3 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #elif L==4 - "PROFILE.Preferences.es#cookies"; + "PROFILE.Settings.es#cookies"; #elif L==5 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #elif L==6 - "PROFILE.Preferences.es#cookies"; + "PROFILE.Settings.es#cookies"; #elif L==7 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #elif L==8 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #elif L==9 - "PROFILE.Preferences.en#cookies"; + "PROFILE.Settings.en#cookies"; #endif -const char *Hlp_PROFILE_Preferences_notifications = +const char *Hlp_PROFILE_Settings_notifications = #if L==1 - "PROFILE.Preferences.es#notificaciones"; + "PROFILE.Settings.es#notificaciones"; #elif L==2 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #elif L==3 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #elif L==4 - "PROFILE.Preferences.es#notificaciones"; + "PROFILE.Settings.es#notificaciones"; #elif L==5 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #elif L==6 - "PROFILE.Preferences.es#notificaciones"; + "PROFILE.Settings.es#notificaciones"; #elif L==7 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #elif L==8 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #elif L==9 - "PROFILE.Preferences.en#notifications"; + "PROFILE.Settings.en#notifications"; #endif diff --git a/swad_icon.c b/swad_icon.c index a9d2172c..be3231ea 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -35,7 +35,7 @@ #include "swad_icon.h" #include "swad_layout.h" #include "swad_parameter.h" -#include "swad_preference.h" +#include "swad_setting.h" /*****************************************************************************/ /************** External global variables from others modules ****************/ @@ -110,15 +110,15 @@ const char *Ico_GetIcon (const char *IconWithoutExtension) void Ico_PutIconsToSelectIconSet (void) { - extern const char *Hlp_PROFILE_Preferences_icons; + extern const char *Hlp_PROFILE_Settings_icons; extern const char *Txt_Icons; Ico_IconSet_t IconSet; char Icon[PATH_MAX + 1]; Box_StartBox (NULL,Txt_Icons,Ico_PutIconsIconSet, - Hlp_PROFILE_Preferences_icons,Box_NOT_CLOSABLE); - Pre_StartPrefsHead (); - Pre_StartOnePrefSelector (); + Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE); + Set_StartSettingsHead (); + Set_StartOneSettingSelector (); for (IconSet = (Ico_IconSet_t) 0; IconSet < Ico_NUM_ICON_SETS; IconSet++) @@ -132,17 +132,17 @@ void Ico_PutIconsToSelectIconSet (void) "%s/%s/cog.svg", Cfg_ICON_FOLDER_SETS, Ico_IconSetId[IconSet]); - Ico_PutPrefIconLink (Icon,Ico_IconSetNames[IconSet]); + Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); + Set_EndOneSettingSelector (); + Set_EndSettingsHead (); Box_EndBox (); } /*****************************************************************************/ -/*************** Put contextual icons in icon-set preference *****************/ +/***************** Put contextual icons in icon-set setting *******************/ /*****************************************************************************/ static void Ico_PutIconsIconSet (void) @@ -167,13 +167,13 @@ void Ico_ChangeIconSet (void) /***** Store icon set in database *****/ if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preference about icon set", + DB_QueryUPDATE ("can not update your setting about icon set", "UPDATE usr_data SET IconSet='%s' WHERE UsrCod=%ld", Ico_IconSetId[Gbl.Prefs.IconSet], Gbl.Usrs.Me.UsrDat.UsrCod); - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); + /***** Set settings from current IP *****/ + Set_SetSettingsFromIP (); } /*****************************************************************************/ @@ -345,10 +345,10 @@ void Ico_PutIconTextLink (const char *Icon,const char *Text) } /*****************************************************************************/ -/************************** Show a preference selector ***********************/ +/**************************** Show a setting selector *************************/ /*****************************************************************************/ -void Ico_PutPrefIconLink (const char *Icon,const char *Title) +void Ico_PutSettingIconLink (const char *Icon,const char *Title) { fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); + Set_EndOneSettingSelector (); + Set_EndSettingsHead (); Box_EndBox (); } /*****************************************************************************/ -/****************** Put contextual icons in menu preference ******************/ +/******************* Put contextual icons in menu setting ********************/ /*****************************************************************************/ static void Mnu_PutIconsMenu (void) @@ -453,12 +453,12 @@ void Mnu_ChangeMenu (void) /***** Store menu in database *****/ if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preference about menu", + DB_QueryUPDATE ("can not update your setting about menu", "UPDATE usr_data SET Menu=%u WHERE UsrCod=%ld", (unsigned) Gbl.Prefs.Menu,Gbl.Usrs.Me.UsrDat.UsrCod); - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); + /***** Set settings from current IP *****/ + Set_SetSettingsFromIP (); } /*****************************************************************************/ diff --git a/swad_notification.c b/swad_notification.c index 46f47076..13fa38ed 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -365,13 +365,13 @@ void Ntf_ShowMyNotifications (void) Ntf_WriteFormAllNotifications (AllNotifications); if (NumNotifications) // TODO: Show message only when I don't have notificacions at all - /* Put form to change notification preferences */ + /* Put form to change notification settings */ Lay_PutContextualLinkIconText (ActMrkNtfSee,NULL,NULL, "eye.svg", Txt_Mark_all_NOTIFICATIONS_as_read); - /* Put form to change notification preferences */ - Lay_PutContextualLinkIconText (ActReqEdiPrf,Ntf_NOTIFICATIONS_ID,NULL, + /* Put form to change notification settings */ + Lay_PutContextualLinkIconText (ActReqEdiSet,Ntf_NOTIFICATIONS_ID,NULL, "cog.svg", Txt_Settings); @@ -1915,7 +1915,7 @@ void Ntf_MarkAllNotifAsSeen (void) void Ntf_PutFormChangeNotifSentByEMail (void) { - extern const char *Hlp_PROFILE_Preferences_notifications; + extern const char *Hlp_PROFILE_Settings_notifications; extern const char *The_ClassFormInBox[The_NUM_THEMES]; extern const char *Txt_Save_changes; extern const char *Txt_Notifications; @@ -1924,12 +1924,12 @@ void Ntf_PutFormChangeNotifSentByEMail (void) extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS]; Ntf_NotifyEvent_t NotifyEvent; - /***** Start section with preferences on privacy *****/ + /***** Start section with settings on privacy *****/ Lay_StartSection (Ntf_NOTIFICATIONS_ID); /***** Start box *****/ Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif, - Hlp_PROFILE_Preferences_notifications,Box_NOT_CLOSABLE); + Hlp_PROFILE_Settings_notifications,Box_NOT_CLOSABLE); /***** Start form *****/ Frm_StartForm (ActChgNtfPrf); @@ -1992,7 +1992,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void) /***** End box *****/ Box_EndBox (); - /***** End section with preferences about notifications *****/ + /***** End section with settings about notifications *****/ Lay_EndSection (); } @@ -2024,18 +2024,18 @@ static void Ntf_GetParamsNotifyEvents (void) } /*****************************************************************************/ -/***** Change my preference about sending me notify emails about events ******/ +/******* Change my setting about sending me notify emails about events *******/ /*****************************************************************************/ void Ntf_ChangeNotifyEvents (void) { - extern const char *Txt_Your_preferences_about_notifications_have_changed; + extern const char *Txt_Your_settings_about_notifications_have_changed; /***** Get param with whether notify me about events *****/ Ntf_GetParamsNotifyEvents (); - /***** Store preferences about notify events *****/ - DB_QueryUPDATE ("can not update user's preferences", + /***** Store settings about notify events *****/ + DB_QueryUPDATE ("can not update user's settings", "UPDATE usr_data" " SET NotifNtfEvents=%u,EmailNtfEvents=%u" " WHERE UsrCod=%ld", @@ -2044,7 +2044,7 @@ void Ntf_ChangeNotifyEvents (void) Gbl.Usrs.Me.UsrDat.UsrCod); /***** Show message *****/ - Ale_ShowAlert (Ale_SUCCESS,Txt_Your_preferences_about_notifications_have_changed); + Ale_ShowAlert (Ale_SUCCESS,Txt_Your_settings_about_notifications_have_changed); } /*****************************************************************************/ diff --git a/swad_parameter.c b/swad_parameter.c index afd96cc3..9d200f66 100644 --- a/swad_parameter.c +++ b/swad_parameter.c @@ -32,11 +32,10 @@ #include "swad_action.h" #include "swad_config.h" -#include "swad_database.h" // TODO: REMOVE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #include "swad_global.h" #include "swad_parameter.h" #include "swad_password.h" -#include "swad_preference.h" +#include "swad_setting.h" #include "swad_tab.h" /*****************************************************************************/ @@ -794,12 +793,12 @@ void Par_GetMainParameters (void) break; } - /***** Try to get preferences changed from current IP *****/ - Pre_GetPrefsFromIP (); + /***** Try to get settings changed from current IP *****/ + Set_GetSettingsFromIP (); if (!Gbl.Session.IsOpen) // When no session open (no logged user)... { - /***** Try to get preferences changed from current IP *****/ + /***** Try to get settings changed from current IP *****/ if (Gbl.Prefs.Theme == The_THEME_UNKNOWN) Gbl.Prefs.Theme = The_THEME_DEFAULT; diff --git a/swad_photo.c b/swad_photo.c index 9f38214a..b390b81e 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -46,8 +46,8 @@ #include "swad_logo.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_privacy.h" +#include "swad_setting.h" #include "swad_table.h" #include "swad_theme.h" #include "swad_user.h" @@ -1314,13 +1314,13 @@ void Pho_ChangePhotoVisibility (void) Pri_PHOTO_ALLOWED_VIS); /***** Store public/private photo in database *****/ - DB_QueryUPDATE ("can not update your preference about photo visibility", + DB_QueryUPDATE ("can not update your setting about photo visibility", "UPDATE usr_data SET PhotoVisibility='%s' WHERE UsrCod=%ld", Pri_VisibilityDB[Gbl.Usrs.Me.UsrDat.PhotoVisibility], Gbl.Usrs.Me.UsrDat.UsrCod); /***** Show form again *****/ - Pre_EditPrefs (); + Set_EditSettings (); } /*****************************************************************************/ diff --git a/swad_preference.c b/swad_preference.c deleted file mode 100644 index 1480fc26..00000000 --- a/swad_preference.c +++ /dev/null @@ -1,404 +0,0 @@ -// swad_preference.c: user's preferences - -/* - SWAD (Shared Workspace At a Distance), - is a web platform developed at the University of Granada (Spain), - and used to support university teaching. - - This file is part of SWAD core. - Copyright (C) 1999-2019 Antonio Cañas Vargas - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ -/*****************************************************************************/ -/********************************** Headers **********************************/ -/*****************************************************************************/ - -#include // For NULL -#include // For boolean type -#include // For fprintf, etc. -#include - -#include "swad_box.h" -#include "swad_calendar.h" -#include "swad_config.h" -#include "swad_cookie.h" -#include "swad_database.h" -#include "swad_date.h" -#include "swad_form.h" -#include "swad_global.h" -#include "swad_language.h" -#include "swad_layout.h" -#include "swad_notification.h" -#include "swad_menu.h" -#include "swad_parameter.h" -#include "swad_preference.h" -#include "swad_privacy.h" - -/*****************************************************************************/ -/*************** External global variables from others modules ***************/ -/*****************************************************************************/ - -extern struct Globals Gbl; - -/*****************************************************************************/ -/****************************** Private constants ****************************/ -/*****************************************************************************/ - -/*****************************************************************************/ -/****************************** Private prototypes ***************************/ -/*****************************************************************************/ - -static void Pre_PutIconsToSelectSideCols (void); -static void Pre_PutIconsSideColumns (void); -static void Pre_UpdateSideColsOnUsrDataTable (void); - -/*****************************************************************************/ -/***************************** Edit preferences ******************************/ -/*****************************************************************************/ - -void Pre_EditPrefs (void) - { - extern const char *Hlp_PROFILE_Preferences_internationalization; - extern const char *Hlp_PROFILE_Preferences_design; - extern const char *Txt_Internationalization; - extern const char *Txt_Design; - - /***** Internationalization: language, first day of week, date format *****/ - Box_StartBox (NULL,Txt_Internationalization,NULL, - Hlp_PROFILE_Preferences_internationalization,Box_NOT_CLOSABLE); - fprintf (Gbl.F.Out,"
"); - Lan_PutBoxToSelectLanguage (); // 1. Language - fprintf (Gbl.F.Out,"
" - "
"); - Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week - fprintf (Gbl.F.Out,"
" - "
"); - Dat_PutBoxToSelectDateFormat (); // 3. Date format - fprintf (Gbl.F.Out,"
"); - Box_EndBox (); - - /***** Design: icon set, menu, theme, side columns *****/ - Box_StartBox (NULL,Txt_Design,NULL, - Hlp_PROFILE_Preferences_design,Box_NOT_CLOSABLE); - fprintf (Gbl.F.Out,"
"); - Ico_PutIconsToSelectIconSet (); // 4. Icon set - fprintf (Gbl.F.Out,"
" - "
"); - Mnu_PutIconsToSelectMenu (); // 5. Menu - fprintf (Gbl.F.Out,"
" - "
"); - The_PutIconsToSelectTheme (); // 6. Theme - fprintf (Gbl.F.Out,"
" - "
"); - Pre_PutIconsToSelectSideCols (); // 7. Side columns - fprintf (Gbl.F.Out,"
"); - Box_EndBox (); - - if (Gbl.Usrs.Me.Logged) - { - /***** Form to set my preferences on privacy *****/ - Pri_EditMyPrivacy (); - - /***** Form to set my preferences on cookies *****/ - Coo_EditMyPrefsOnCookies (); - - /***** Automatic email to notify of new events *****/ - Ntf_PutFormChangeNotifSentByEMail (); - } - } - -/*****************************************************************************/ -/******************* Get preferences changed from current IP *****************/ -/*****************************************************************************/ - -void Pre_GetPrefsFromIP (void) - { - unsigned long NumRows; - MYSQL_RES *mysql_res; - MYSQL_ROW row; - - if (Gbl.IP[0]) - { - /***** Get preferences from database *****/ - NumRows = DB_QuerySELECT (&mysql_res,"can not get preferences", - "SELECT FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols" - " FROM IP_prefs WHERE IP='%s'", - Gbl.IP); - if (NumRows) - { - if (NumRows != 1) - Lay_ShowErrorAndExit ("Internal error while getting preferences."); - - /***** Get preferences from database *****/ - row = mysql_fetch_row (mysql_res); - - /* Get first day of week (row[0]) */ - Gbl.Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[0]); - - /* Get date format (row[1]) */ - Gbl.Prefs.DateFormat = Dat_GetDateFormatFromStr (row[1]); - - /* Get theme (row[2]) */ - Gbl.Prefs.Theme = The_GetThemeFromStr (row[2]); - - /* Get icon set (row[3]) */ - Gbl.Prefs.IconSet = Ico_GetIconSetFromStr (row[3]); - - /* Get menu (row[4]) */ - Gbl.Prefs.Menu = Mnu_GetMenuFromStr (row[4]); - - /* Get if user wants to show side columns (row[5]) */ - if (sscanf (row[5],"%u",&Gbl.Prefs.SideCols) == 1) - { - if (Gbl.Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS) - Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS; - } - else - Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS; - } - } - } - -/*****************************************************************************/ -/************************ Set preferences from current IP ********************/ -/*****************************************************************************/ - -void Pre_SetPrefsFromIP (void) - { - extern const char *The_ThemeId[The_NUM_THEMES]; - extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS]; - - /***** Update preferences from current IP in database *****/ - DB_QueryREPLACE ("can not store preferences from current IP address", - "REPLACE INTO IP_prefs" - " (IP,UsrCod,LastChange," - "FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols)" - " VALUES" - " ('%s',%ld,NOW()," - "%u,%u,'%s','%s',%u,%u)", - Gbl.IP,Gbl.Usrs.Me.UsrDat.UsrCod, - Gbl.Prefs.FirstDayOfWeek, - (unsigned) Gbl.Prefs.DateFormat, - The_ThemeId[Gbl.Prefs.Theme], - Ico_IconSetId[Gbl.Prefs.IconSet], - (unsigned) Gbl.Prefs.Menu, - Gbl.Prefs.SideCols); - - /***** If a user is logged, update its preferences in database for all its IP's *****/ - if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preferences", - "UPDATE IP_prefs" - " SET FirstDayOfWeek=%u,DateFormat=%u," - "Theme='%s',IconSet='%s',Menu=%u,SideCols=%u" - " WHERE UsrCod=%ld", - Gbl.Prefs.FirstDayOfWeek, - (unsigned) Gbl.Prefs.DateFormat, - The_ThemeId[Gbl.Prefs.Theme], - Ico_IconSetId[Gbl.Prefs.IconSet], - (unsigned) Gbl.Prefs.Menu, - Gbl.Prefs.SideCols, - Gbl.Usrs.Me.UsrDat.UsrCod); - } - -/*****************************************************************************/ -/*********************** Remove old preferences from IP **********************/ -/*****************************************************************************/ - -void Pre_RemoveOldPrefsFromIP (void) - { - /***** Remove old preferences *****/ - DB_QueryDELETE ("can not remove old preferences", - "DELETE LOW_PRIORITY FROM IP_prefs" - " WHERE LastChange", - SideCols == Gbl.Prefs.SideCols ? "PREF_ON" : - "PREF_OFF"); - Frm_StartForm (ActChgCol); - Par_PutHiddenParamUnsigned ("SideCols",SideCols); - snprintf (Icon,sizeof (Icon), - "layout%u%u_32x20.gif", - SideCols >> 1,SideCols & 1); - Ico_PutPrefIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]); - Frm_EndForm (); - fprintf (Gbl.F.Out,""); - } - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); - Box_EndBox (); - } - -/*****************************************************************************/ -/************* Put contextual icons in side-columns preference ***************/ -/*****************************************************************************/ - -static void Pre_PutIconsSideColumns (void) - { - /***** Put icon to show a figure *****/ - Gbl.Figures.FigureType = Fig_SIDE_COLUMNS; - Fig_PutIconToShowFigure (); - } - -/*****************************************************************************/ -/*********************** Change layout of side columns ***********************/ -/*****************************************************************************/ - -void Pre_ChangeSideCols (void) - { - /***** Get param side-columns *****/ - Gbl.Prefs.SideCols = Pre_GetParamSideCols (); - - /***** Store side colums in database *****/ - if (Gbl.Usrs.Me.Logged) - Pre_UpdateSideColsOnUsrDataTable (); - - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); - } - -/*****************************************************************************/ -/*************************** Hide left side column ***************************/ -/*****************************************************************************/ - -void Pre_HideLeftCol (void) - { - Gbl.Prefs.SideCols &= ~Lay_SHOW_LEFT_COLUMN; // And with 1...101 to hide left column - if (Gbl.Usrs.Me.Logged) - Pre_UpdateSideColsOnUsrDataTable (); - - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); - } - -/*****************************************************************************/ -/*************************** Hide right side column **************************/ -/*****************************************************************************/ - -void Pre_HideRightCol (void) - { - Gbl.Prefs.SideCols &= ~Lay_SHOW_RIGHT_COLUMN; // And with 1...110 to hide right column - if (Gbl.Usrs.Me.Logged) - Pre_UpdateSideColsOnUsrDataTable (); - - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); - } - -/*****************************************************************************/ -/**************************** Show left side column **************************/ -/*****************************************************************************/ - -void Pre_ShowLeftCol (void) - { - Gbl.Prefs.SideCols |= Lay_SHOW_LEFT_COLUMN; // Or with 10 to show left column - if (Gbl.Usrs.Me.Logged) - Pre_UpdateSideColsOnUsrDataTable (); - - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); - } - -/*****************************************************************************/ -/**************************** Show right side column *************************/ -/*****************************************************************************/ - -void Pre_ShowRightCol (void) - { - Gbl.Prefs.SideCols |= Lay_SHOW_RIGHT_COLUMN; // Or with 01 to show right column - if (Gbl.Usrs.Me.Logged) - Pre_UpdateSideColsOnUsrDataTable (); - - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); - } - -/*****************************************************************************/ -/************** Update layout of side colums on user data table **************/ -/*****************************************************************************/ - -static void Pre_UpdateSideColsOnUsrDataTable (void) - { - DB_QueryUPDATE ("can not update your preference about side columns", - "UPDATE usr_data SET SideCols=%u" - " WHERE UsrCod=%ld", - Gbl.Prefs.SideCols,Gbl.Usrs.Me.UsrDat.UsrCod); - } - -/*****************************************************************************/ -/************** Get parameter used to show/hide side columns *****************/ -/*****************************************************************************/ - -unsigned Pre_GetParamSideCols (void) - { - return (unsigned) Par_GetParToUnsignedLong ("SideCols", - 0, - Lay_SHOW_BOTH_COLUMNS, - Cfg_DEFAULT_COLUMNS); - } - -/*****************************************************************************/ -/********** Head to select one or several preferences using icons ************/ -/*****************************************************************************/ -/* - +-- Container for several pref. selectors ---+ - | +One pref.selector+ +One pref.selector+ | - | | +-----+ +-----+ | | +-----+ +-----+ | | - | | |Icon | |Icon | | | |Icon | |Icon | | | - | | |opt.A| |opt.B| | | |opt.A| |opt.B| | | - | | +-----+ +-----+ | | +-----+ +-----+ | | - | +-----------------+ +-----------------+ | - +--------------------------------------------+ -*/ -void Pre_StartPrefsHead (void) - { - fprintf (Gbl.F.Out,"
"); - } - -void Pre_EndPrefsHead (void) - { - fprintf (Gbl.F.Out,"
"); - } - -void Pre_StartOnePrefSelector (void) - { - fprintf (Gbl.F.Out,"
"); - } - -void Pre_EndOnePrefSelector (void) - { - fprintf (Gbl.F.Out,"
"); - } diff --git a/swad_preference.h b/swad_preference.h deleted file mode 100644 index 8118145b..00000000 --- a/swad_preference.h +++ /dev/null @@ -1,60 +0,0 @@ -// swad_preference.h: user's preferences - -#ifndef _SWAD_PRE -#define _SWAD_PRE -/* - SWAD (Shared Workspace At a Distance in Spanish), - is a web platform developed at the University of Granada (Spain), - and used to support university teaching. - - This file is part of SWAD core. - Copyright (C) 1999-2019 Antonio Cañas Vargas - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . -*/ -/*****************************************************************************/ -/********************************* Headers ***********************************/ -/*****************************************************************************/ - -/*****************************************************************************/ -/***************************** Public constants ******************************/ -/*****************************************************************************/ - -/*****************************************************************************/ -/******************************* Public types ********************************/ -/*****************************************************************************/ - -/*****************************************************************************/ -/***************************** Public prototypes *****************************/ -/*****************************************************************************/ - -void Pre_EditPrefs (void); - -void Pre_GetPrefsFromIP (void); -void Pre_SetPrefsFromIP (void); -void Pre_RemoveOldPrefsFromIP (void); - -void Pre_ChangeSideCols (void); -void Pre_HideLeftCol (void); -void Pre_HideRightCol (void); -void Pre_ShowLeftCol (void); -void Pre_ShowRightCol (void); -unsigned Pre_GetParamSideCols (void); - -void Pre_StartPrefsHead (void); -void Pre_EndPrefsHead (void); -void Pre_StartOnePrefSelector (void); -void Pre_EndOnePrefSelector (void); - -#endif diff --git a/swad_privacy.c b/swad_privacy.c index 88656c0e..18c42071 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -78,26 +78,26 @@ static void Pri_PutFormVisibility (const char *TxtLabel, void Pri_EditMyPrivacy (void) { - extern const char *Hlp_PROFILE_Preferences_privacy; - extern const char *Txt_Please_review_your_privacy_preferences; + extern const char *Hlp_PROFILE_Settings_privacy; + extern const char *Txt_Please_check_your_privacy_settings; extern const char *Txt_Privacy; extern const char *Txt_Photo; extern const char *Txt_Basic_public_profile; extern const char *Txt_Extended_public_profile; extern const char *Txt_Timeline; - /***** Start section with preferences on privacy *****/ + /***** Start section with settings on privacy *****/ Lay_StartSection (Pri_PRIVACY_ID); - /***** If any of my preferences about privacy is unknown *****/ + /***** If any of my settings about privacy is unknown *****/ if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN || Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN || Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN) - Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences); + Ale_ShowAlert (Ale_WARNING,Txt_Please_check_your_privacy_settings); /***** Start box and table *****/ Box_StartBoxTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy, - Hlp_PROFILE_Preferences_privacy,Box_NOT_CLOSABLE,2); + Hlp_PROFILE_Settings_privacy,Box_NOT_CLOSABLE,2); /***** Edit photo visibility *****/ Pri_PutFormVisibility (Txt_Photo, @@ -126,12 +126,12 @@ void Pri_EditMyPrivacy (void) /***** End table and box *****/ Box_EndBoxTable (); - /***** End section with preferences on privacy *****/ + /***** End section with settings on privacy *****/ Lay_EndSection (); } /*****************************************************************************/ -/***************** Put contextual icons in privacy preference ****************/ +/****************** Put contextual icons in privacy setting ******************/ /*****************************************************************************/ static void Pri_PutIconsPrivacy (void) diff --git a/swad_profile.c b/swad_profile.c index efae99ab..37470708 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -39,11 +39,11 @@ #include "swad_nickname.h" #include "swad_notification.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_privacy.h" #include "swad_profile.h" #include "swad_role.h" #include "swad_role_type.h" +#include "swad_setting.h" #include "swad_theme.h" #include "swad_timeline.h" #include "swad_user.h" @@ -357,7 +357,7 @@ void Prf_ChangeBasicProfileVis (void) Pri_BASIC_PROFILE_ALLOWED_VIS); /***** Store public/private photo in database *****/ - DB_QueryUPDATE ("can not update your preference" + DB_QueryUPDATE ("can not update your setting" " about public profile visibility", "UPDATE usr_data SET BaPrfVisibility='%s'" " WHERE UsrCod=%ld", @@ -365,7 +365,7 @@ void Prf_ChangeBasicProfileVis (void) Gbl.Usrs.Me.UsrDat.UsrCod); /***** Show form again *****/ - Pre_EditPrefs (); + Set_EditSettings (); } void Prf_ChangeExtendedProfileVis (void) @@ -377,7 +377,7 @@ void Prf_ChangeExtendedProfileVis (void) Pri_EXTENDED_PROFILE_ALLOWED_VIS); /***** Store public/private photo in database *****/ - DB_QueryUPDATE ("can not update your preference" + DB_QueryUPDATE ("can not update your setting" " about public profile visibility", "UPDATE usr_data SET ExPrfVisibility='%s'" " WHERE UsrCod=%ld", @@ -385,7 +385,7 @@ void Prf_ChangeExtendedProfileVis (void) Gbl.Usrs.Me.UsrDat.UsrCod); /***** Show form again *****/ - Pre_EditPrefs (); + Set_EditSettings (); } /*****************************************************************************/ diff --git a/swad_project.c b/swad_project.c index f1e37156..6cd7b876 100644 --- a/swad_project.c +++ b/swad_project.c @@ -41,8 +41,8 @@ #include "swad_pagination.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_project.h" +#include "swad_setting.h" #include "swad_string.h" #include "swad_table.h" @@ -268,7 +268,7 @@ static void Prj_ShowProjectsInCurrentPage (void) /***** Put forms to choice which projects to show *****/ /* 1st. row */ - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Prj_ShowFormToFilterByMy_All (); Prj_ShowFormToFilterByPreassignedNonPreassig (); switch (Gbl.Usrs.Me.Role.Logged) @@ -281,7 +281,7 @@ static void Prj_ShowProjectsInCurrentPage (void) default: // Students will see only visible projects break; } - Pre_EndPrefsHead (); + Set_EndSettingsHead (); /* 2nd. row */ Prj_ShowFormToFilterByDpt (); @@ -368,7 +368,7 @@ static void Prj_ShowFormToFilterByMy_All (void) "sitemap.svg", // Prj_ALL_PROJECTS }; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (My_All = (Prj_WhoseProjects_t) 0; My_All <= (Prj_WhoseProjects_t) (Prj_NUM_WHOSE_PROJECTS - 1); My_All++) @@ -385,12 +385,12 @@ static void Prj_ShowFormToFilterByMy_All (void) Gbl.Prjs.SelectedOrder, Gbl.Prjs.CurrentPage, -1L); - Ico_PutPrefIconLink (WhoseProjectsIcon[My_All], + Ico_PutSettingIconLink (WhoseProjectsIcon[My_All], Txt_PROJECT_MY_ALL_PROJECTS[My_All]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ @@ -403,7 +403,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void) struct Prj_Filter Filter; Prj_PreassignedNonpreassig_t PreNon; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (PreNon = (Prj_PreassignedNonpreassig_t) 0; PreNon <= (Prj_PreassignedNonpreassig_t) (Prj_NUM_PREASSIGNED_NONPREASSIG - 1); PreNon++) @@ -420,12 +420,12 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void) Gbl.Prjs.SelectedOrder, Gbl.Prjs.CurrentPage, -1L); - Ico_PutPrefIconLink (PreassignedNonpreassigImage[PreNon], + Ico_PutSettingIconLink (PreassignedNonpreassigImage[PreNon], Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ @@ -443,7 +443,7 @@ static void Prj_ShowFormToFilterByHidden (void) "eye.svg", // Prj_VISIBL }; - Pre_StartOnePrefSelector (); + Set_StartOneSettingSelector (); for (HidVis = (Prj_HiddenVisibl_t) 0; HidVis <= (Prj_HiddenVisibl_t) (Prj_NUM_HIDDEN_VISIBL - 1); HidVis++) @@ -460,12 +460,12 @@ static void Prj_ShowFormToFilterByHidden (void) Gbl.Prjs.SelectedOrder, Gbl.Prjs.CurrentPage, -1L); - Ico_PutPrefIconLink (HiddenVisiblIcon[HidVis], + Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis], Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); + Set_EndOneSettingSelector (); } /*****************************************************************************/ diff --git a/swad_record.c b/swad_record.c index 0cad1167..1105c52a 100644 --- a/swad_record.c +++ b/swad_record.c @@ -44,11 +44,11 @@ #include "swad_network.h" #include "swad_parameter.h" #include "swad_photo.h" -#include "swad_preference.h" #include "swad_privacy.h" #include "swad_QR.h" #include "swad_record.h" #include "swad_role.h" +#include "swad_setting.h" #include "swad_table.h" #include "swad_user.h" diff --git a/swad_setup.c b/swad_setup.c index 20e2dd52..05432924 100644 --- a/swad_setup.c +++ b/swad_setup.c @@ -51,7 +51,7 @@ /****************************** Initial set up *******************************/ /*****************************************************************************/ -void Set_Setup (void) +void SUp_SetUp (void) { /***** Create tables in database *****/ DB_CreateTablesIfNotExist (); diff --git a/swad_setup.h b/swad_setup.h index 859f8fb6..c6830a4b 100644 --- a/swad_setup.h +++ b/swad_setup.h @@ -1,7 +1,7 @@ // swad_setup.h: initial setup after installation -#ifndef _SWAD_SET -#define _SWAD_SET +#ifndef _SWAD_SUP +#define _SWAD_SUP /* SWAD (Shared Workspace At a Distance in Spanish), is a web platform developed at the University of Granada (Spain), @@ -35,6 +35,6 @@ /***************************** Public prototypes *****************************/ /*****************************************************************************/ -void Set_Setup (void); +void SUp_SetUp (void); #endif diff --git a/swad_survey.c b/swad_survey.c index 80bf5f93..ca90147a 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -40,8 +40,8 @@ #include "swad_notification.h" #include "swad_pagination.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_role.h" +#include "swad_setting.h" #include "swad_survey.h" #include "swad_table.h" @@ -230,9 +230,9 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) /***** Select whether show only my groups or all groups *****/ if (Gbl.CurrentCrs.Grps.NumGrps) { - Pre_StartPrefsHead (); + Set_StartSettingsHead (); Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } if (Gbl.Svys.Num) diff --git a/swad_test.c b/swad_test.c index 9c953c0f..7b37f8f6 100644 --- a/swad_test.c +++ b/swad_test.c @@ -7317,7 +7317,7 @@ void Tst_SelUsrsToSeeUsrsTestResults (void) /***** Get and update type of list, number of columns in class photo - and preference about view photos *****/ + and preference about viewing photos *****/ Usr_GetAndUpdatePrefsAboutUsrList (); /***** Get groups to show ******/ diff --git a/swad_text.c b/swad_text.c index 1ec7b069..440223e9 100644 --- a/swad_text.c +++ b/swad_text.c @@ -19778,7 +19778,7 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = "Cartão" #endif , - // 6: ActReqEdiPrf + // 6: ActReqEdiSet #if L==1 // ca "Configuració" #elif L==2 // de @@ -21645,25 +21645,25 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] = "Cartão" #endif , - // 6: ActReqEdiPrf + // 6: ActReqEdiSet #if L==1 // ca - "Les meves preferències (idioma, colors, notificacions …)" + "Els meus ajustos (idioma, colors, notificacions…)" #elif L==2 // de - "Einstellungen" + "Meine Einstellungen (Sprache, Farben, Benachrichtigungen…)" #elif L==3 // en - "Preferences" + "My settings (language, colors, notifications…)" #elif L==4 // es - "Mis preferencias (idioma, colores, notificaciones…)" + "Mis ajustes (idioma, colores, notificaciones…)" #elif L==5 // fr - "Préférences" + "Mes paramètres (langue, couleurs, notifications…)" #elif L==6 // gn - "Mis preferencias (idioma, colores, notificaciones…)" // Okoteve traducción + "Mis ajustes (idioma, colores, notificaciones…)" // Okoteve traducción #elif L==7 // it - "Preferenze" + "Le mie impostazioni (lingua, colori, notifiche…)" #elif L==8 // pl - "Preferencje" + "Moje ustawienia (język, kolory, powiadomienia…)" #elif L==9 // pt - "Preferências" + "Minhas configurações (idioma, cores, notificações…)" #endif , NULL, // 7 @@ -29161,25 +29161,25 @@ const char *Txt_Please_fill_in_your_record_card_including_your_sex = " incluindo o seu sexo."; #endif -const char *Txt_Please_review_your_privacy_preferences = +const char *Txt_Please_check_your_privacy_settings = #if L==1 // ca - "Si us plau, revisi les seves preferències de privacitat."; + "Si us plau, comproveu la seva configuració de privacitat."; #elif L==2 // de "Bitte überprüfen Sie Ihre Datenschutzeinstellungen."; #elif L==3 // en - "Please review your privacy preferences."; + "Please review your privacy settings."; #elif L==4 // es - "Por favor, revise sus preferencias de privacidad."; + "Por favor, revise sus ajustes de privacidad."; #elif L==5 // fr - "S'il vous plaît revoir vos préférences de privacité."; + "S'il vous plaît, vérifiez vos paramètres de privacité."; #elif L==6 // gn - "Por favor, revise sus preferencias de privacidad."; // Okoteve traducción + "Por favor, revise sus ajustes de privacidad."; // Okoteve traducción #elif L==7 // it - "Si prega di rivedere le vostre preferenze di privatezza."; + "Per favore, controlla le tue impostazioni sulla privacy."; #elif L==8 // pl - "Proszę sprawdzić ustawienia prywatności."; + "Sprawdź ustawienia prywatności."; #elif L==9 // pt - "Por favor, revise suas preferências de privacidade."; + "Por favor, verifique suas configurações de privacidade."; #endif const char *Txt_Please_select_the_country_of_your_institution = @@ -56537,25 +56537,25 @@ const char *Txt_Your_personal_data_have_been_updated = "Seus dados pessoais foram atualizados."; #endif -const char *Txt_Your_preferences_about_notifications_have_changed = +const char *Txt_Your_settings_about_notifications_have_changed = #if L==1 // ca - "Les seves preferències sobre les notificacions han canviat."; + "La seva configuració de les notificacions ha canviat."; #elif L==2 // de - "Your preferences about notifications have changed."; // Need Übersetzung + "Ihre Einstellungen zu Benachrichtigungen haben sich geändert."; #elif L==3 // en - "Your preferences about notifications have changed."; + "Your settings about notifications have changed."; #elif L==4 // es - "Sus preferencias sobre las notificaciones han cambiado."; + "Sus ajustes sobre las notificaciones han cambiado."; #elif L==5 // fr - "Your preferences about notifications have changed."; // Besoin de traduction + "Vos paramètres concernant les notifications ont changé."; #elif L==6 // gn - "Sus preferencias sobre las notificaciones han cambiado."; // Okoteve traducción + "Sus ajustes sobre las notificaciones han cambiado."; // Okoteve traducción #elif L==7 // it - "Le tue preferenze sulle notifiche sono cambiate."; + "Le tue impostazioni sulle notifiche sono cambiate."; #elif L==8 // pl - "Your preferences about notifications have changed."; // Potrzebujesz tlumaczenie + "Twoje ustawienia dotyczące powiadomień uległy zmianie."; #elif L==9 // pt - "Suas preferências sobre notificações foram alteradas."; + "Suas configurações sobre notificações foram alteradas."; #endif const char *Txt_Your_record_card_in_this_course_has_been_updated = diff --git a/swad_text_no_html.c b/swad_text_no_html.c index 1f82298d..99b12e6f 100644 --- a/swad_text_no_html.c +++ b/swad_text_no_html.c @@ -320,23 +320,23 @@ const char *Txt_If_you_no_longer_wish_to_receive_email_notifications_NO_HTML[1 + { "", "Si no desitgeu rebre més avisos per correu," - " desactiveu la opció corresponent en les preferències del seu perfil.", + " desactiveu la opció corresponent en els ajustos del seu perfil.", "Wenn Sie nicht mehr erhalten möchten, E-Mail-Benachrichtigungen," - " Deaktivieren Sie die Option in den Einstellungen Ihres Profils.", + " Deaktivieren Sie die Option in Ihren Profileinstellungen.", "If you no longer wish to receive email notifications," - " uncheck the option in the preferences of your profile.", + " uncheck the option in your profile settings.", "Si no desea recibir más avisos por correo," - " desactive la opción correspondiente en las preferencias de su perfil.", + " desactive la opción correspondiente en los ajustes de su perfil.", "Si vous ne souhaitez plus recevoir de notifications par email," - " décochez l'option dans les préférences de votre profil.", + " décochez l'option dans les paramètres de votre profil.", "Si no desea recibir más avisos por correo," - " desactive la opción correspondiente en las preferencias de su perfil.", // Okoteve traducción + " desactive la opción correspondiente en los ajustes de su perfil.", // Okoteve traducción "Se non desideri più ricevere notifiche via email," - " deselezionare l'opzione nelle preferenze del tuo profilo.", + " deselezionare l'opzione nelle impostazioni del tuo profilo.", "Jesli nie chcesz otrzymywac powiadomien email," - " usuń zaznaczenie opcje w ustawieniach swojego profilu.", + " odznacz opcję w ustawieniach swojego profilu.", "Se já não desejar receber notificações por email," - " desmarque a opção nas preferências do seu perfil.", + " desmarque a opção nas configurações do seu perfil.", }; const char *Txt_Institutions_NO_HTML = diff --git a/swad_theme.c b/swad_theme.c index 2bdb56bb..26d84d86 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -35,7 +35,7 @@ #include "swad_global.h" #include "swad_layout.h" #include "swad_parameter.h" -#include "swad_preference.h" +#include "swad_setting.h" #include "swad_theme.h" /*****************************************************************************/ @@ -261,15 +261,15 @@ static void The_PutIconsTheme (void); void The_PutIconsToSelectTheme (void) { - extern const char *Hlp_PROFILE_Preferences_theme; + extern const char *Hlp_PROFILE_Settings_theme; extern const char *Txt_Theme_SKIN; The_Theme_t Theme; char Icon[PATH_MAX + 1]; Box_StartBox (NULL,Txt_Theme_SKIN,The_PutIconsTheme, - Hlp_PROFILE_Preferences_theme,Box_NOT_CLOSABLE); - Pre_StartPrefsHead (); - Pre_StartOnePrefSelector (); + Hlp_PROFILE_Settings_theme,Box_NOT_CLOSABLE); + Set_StartSettingsHead (); + Set_StartOneSettingSelector (); for (Theme = (The_Theme_t) 0; Theme < The_NUM_THEMES; Theme++) @@ -283,17 +283,17 @@ void The_PutIconsToSelectTheme (void) "%s/%s/theme_32x20.gif", Cfg_ICON_FOLDER_THEMES, The_ThemeId[Theme]); - Ico_PutPrefIconLink (Icon,The_ThemeNames[Theme]); + Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); + Set_EndOneSettingSelector (); + Set_EndSettingsHead (); Box_EndBox (); } /*****************************************************************************/ -/***************** Put contextual icons in theme preference ******************/ +/****************** Put contextual icons in theme setting ********************/ /*****************************************************************************/ static void The_PutIconsTheme (void) @@ -324,14 +324,14 @@ void The_ChangeTheme (void) /***** Store theme in database *****/ if (Gbl.Usrs.Me.Logged) - DB_QueryUPDATE ("can not update your preference about theme", + DB_QueryUPDATE ("can not update your setting about theme", "UPDATE usr_data SET Theme='%s'" " WHERE UsrCod=%ld", The_ThemeId[Gbl.Prefs.Theme], Gbl.Usrs.Me.UsrDat.UsrCod); - /***** Set preferences from current IP *****/ - Pre_SetPrefsFromIP (); + /***** Set settings from current IP *****/ + Set_SetSettingsFromIP (); } /*****************************************************************************/ diff --git a/swad_timeline.c b/swad_timeline.c index d4f3ecd9..e03363f4 100644 --- a/swad_timeline.c +++ b/swad_timeline.c @@ -45,8 +45,8 @@ #include "swad_notice.h" #include "swad_notification.h" #include "swad_parameter.h" -#include "swad_preference.h" #include "swad_profile.h" +#include "swad_setting.h" #include "swad_timeline.h" /*****************************************************************************/ @@ -1135,9 +1135,9 @@ static void TL_PutFormWhichUsrs (void) "users.svg", // TL_USRS_ALL }; - /***** Preference selector for which users *****/ - Pre_StartPrefsHead (); - Pre_StartOnePrefSelector (); + /***** Setting selector for which users *****/ + Set_StartSettingsHead (); + Set_StartOneSettingSelector (); for (WhichUsrs = (TL_WhichUsrs_t) 1; WhichUsrs < TL_NUM_WHICH_USRS; WhichUsrs++) @@ -1147,12 +1147,12 @@ static void TL_PutFormWhichUsrs (void) "PREF_OFF"); Frm_StartForm (ActSeeSocTmlGbl); Par_PutHiddenParamUnsigned ("WhichUsrs",WhichUsrs); - Ico_PutPrefIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]); + Ico_PutSettingIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]); Frm_EndForm (); fprintf (Gbl.F.Out,""); } - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); + Set_EndOneSettingSelector (); + Set_EndSettingsHead (); /***** Show warning if I do not follow anyone *****/ if (Gbl.Timeline.WhichUsrs == TL_USRS_FOLLOWED) diff --git a/swad_timetable.c b/swad_timetable.c index bfdb435c..e559adff 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -38,7 +38,7 @@ #include "swad_global.h" #include "swad_language.h" #include "swad_parameter.h" -#include "swad_preference.h" +#include "swad_setting.h" #include "swad_timetable.h" /*****************************************************************************/ @@ -371,8 +371,8 @@ void TT_ShowClassTimeTable (void) TT_ShowTimeTableGrpsSelected (); else { - /***** Preference selector *****/ - Pre_StartPrefsHead (); + /***** Setting selector *****/ + Set_StartSettingsHead (); /* Select whether show only my groups or all groups */ if ( Gbl.TimeTable.Type == TT_MY_TIMETABLE || @@ -384,7 +384,7 @@ void TT_ShowClassTimeTable (void) Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type], Grp_PutParamWhichGrps); - Pre_EndPrefsHead (); + Set_EndSettingsHead (); } /***** Show the time table *****/ diff --git a/swad_user.c b/swad_user.c index 2a930abd..39b90d99 100644 --- a/swad_user.c +++ b/swad_user.c @@ -57,11 +57,11 @@ #include "swad_notification.h" #include "swad_parameter.h" #include "swad_password.h" -#include "swad_preference.h" #include "swad_privacy.h" #include "swad_QR.h" #include "swad_record.h" #include "swad_role.h" +#include "swad_setting.h" #include "swad_tab.h" #include "swad_table.h" #include "swad_user.h" @@ -549,7 +549,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs) "NotifNtfEvents," // row[24] "EmailNtfEvents," // row[25] - // Preferences (usually not necessary + // Settings (usually not necessary // when getting another user's data) "Language," // row[26] "FirstDayOfWeek," // row[27] @@ -666,7 +666,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs) if (UsrDat->NtfEvents.SendEmail >= (1 << Ntf_NUM_NOTIFY_EVENTS)) // Maximum binary value for NotifyEvents is 000...0011...11 UsrDat->NtfEvents.SendEmail = 0; - /***** Get user's preferences *****/ + /***** Get user's settings *****/ if (GetPrefs == Usr_GET_PREFS) { /* Get language (row[26]) */ @@ -2999,8 +2999,8 @@ void Usr_ChkUsrAndGetUsrData (void) Act_AdjustCurrentAction (); Ses_CreateSession (); - /* Set preferences from current IP */ - Pre_SetPrefsFromIP (); + /* Set settings from current IP */ + Set_SetSettingsFromIP (); /* Send message via email to confirm the new email address */ Mai_SendMailMsgToConfirmEmail (); @@ -3040,7 +3040,7 @@ void Usr_ChkUsrAndGetUsrData (void) Act_AdjustCurrentAction (); Ses_CreateSession (); - Pre_SetPrefsFromIP (); // Set preferences from current IP + Set_SetSettingsFromIP (); // Set settings from current IP } else { @@ -3065,7 +3065,7 @@ void Usr_ChkUsrAndGetUsrData (void) Act_AdjustCurrentAction (); Ses_CreateSession (); - Pre_SetPrefsFromIP (); // Set preferences from current IP + Set_SetSettingsFromIP (); // Set settings from current IP } else FormLogin.PutForm = true; @@ -3314,7 +3314,7 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void) } /*****************************************************************************/ -/********************* Set my preferences and my roles ***********************/ +/********************** Set my settings and my roles *************************/ /*****************************************************************************/ static void Usr_SetMyPrefsAndRoles (void) @@ -3329,7 +3329,7 @@ static void Usr_SetMyPrefsAndRoles (void) if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Lan_LANGUAGE_UNKNOWN) // I have not chosen language Lan_UpdateMyLanguageToCurrentLanguage (); // Update my language in database - /***** Set preferences from my preferences *****/ + /***** Set settings from my settings *****/ Gbl.Prefs.FirstDayOfWeek = Gbl.Usrs.Me.UsrDat.Prefs.FirstDayOfWeek; Gbl.Prefs.DateFormat = Gbl.Usrs.Me.UsrDat.Prefs.DateFormat; Gbl.Prefs.Menu = Gbl.Usrs.Me.UsrDat.Prefs.Menu; @@ -5948,8 +5948,8 @@ void Usr_FreeListOtherRecipients (void) void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) { - Pre_StartPrefsHead (); - Pre_StartOnePrefSelector (); + Set_StartSettingsHead (); + Set_StartOneSettingSelector (); /***** Select Usr_LIST_AS_CLASS_PHOTO *****/ fprintf (Gbl.F.Out,"
", @@ -5982,8 +5982,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) Frm_EndForm (); fprintf (Gbl.F.Out,"
"); - Pre_EndOnePrefSelector (); - Pre_EndPrefsHead (); + Set_EndOneSettingSelector (); + Set_EndSettingsHead (); } /*****************************************************************************/ @@ -6509,7 +6509,7 @@ void Usr_ListAllDataGsts (void) /***** Get and update type of list, number of columns in class photo - and preference about view photos *****/ + and preference about viewing photos *****/ Usr_GetAndUpdatePrefsAboutUsrList (); /***** Get scope *****/ @@ -6627,7 +6627,7 @@ void Usr_ListAllDataStds (void) /***** Get and update type of list, number of columns in class photo - and preference about view photos *****/ + and preference about viewing photos *****/ Usr_GetAndUpdatePrefsAboutUsrList (); /***** Get scope *****/ @@ -6865,7 +6865,7 @@ void Usr_ListAllDataTchs (void) /***** Get and update type of list, number of columns in class photo - and preference about view photos *****/ + and preference about viewing photos *****/ Usr_GetAndUpdatePrefsAboutUsrList (); /***** Get scope *****/ @@ -7133,7 +7133,7 @@ void Usr_ListDataAdms (void) /***** Get and update type of list, number of columns in class photo - and preference about view photos *****/ + and preference about viewing photos *****/ Usr_GetAndUpdatePrefsAboutUsrList (); /***** Get scope *****/ @@ -7222,9 +7222,9 @@ void Usr_ListDataAdms (void) } /*****************************************************************************/ -/****************** Put hidden parameters with type of list, *****************/ -/****************** number of columns in class photo *************************/ -/****************** and preference about view photos *************************/ +/**************** Put hidden parameters with type of list, *******************/ +/**************** number of columns in class photo *******************/ +/**************** and preference about viewing photos *******************/ /*****************************************************************************/ void Usr_PutParamsPrefsAboutUsrList (void) @@ -7235,9 +7235,9 @@ void Usr_PutParamsPrefsAboutUsrList (void) } /*****************************************************************************/ -/********************* Get and update type of list, **********************/ -/********************* number of columns in class photo **********************/ -/********************* and preference about view photos **********************/ +/****************** Get and update type of list, **********************/ +/****************** number of columns in class photo **********************/ +/****************** and preference about viewing photos **********************/ /*****************************************************************************/ void Usr_GetAndUpdatePrefsAboutUsrList (void) @@ -7248,7 +7248,7 @@ void Usr_GetAndUpdatePrefsAboutUsrList (void) /***** Get and update number of columns in class photo *****/ Usr_GetAndUpdateColsClassPhoto (); - /***** Get and update preference about view photos *****/ + /***** Get and update preference about viewing photos *****/ Usr_GetAndUpdatePrefAboutListWithPhotos (); }