diff --git a/src/Mod/Start/CMakeLists.txt b/src/Mod/Start/CMakeLists.txt index 65d2681d3f..30832b0eb6 100644 --- a/src/Mod/Start/CMakeLists.txt +++ b/src/Mod/Start/CMakeLists.txt @@ -28,6 +28,7 @@ if(BUILD_GUI) StartPage.css StartPage.js StartPage.html + EnableDownload.py images/Background.jpg images/FreeCAD.png images/PartDesign.png diff --git a/src/Mod/Start/StartPage/EnableDownload.py b/src/Mod/Start/StartPage/EnableDownload.py new file mode 100644 index 0000000000..26f54de55e --- /dev/null +++ b/src/Mod/Start/StartPage/EnableDownload.py @@ -0,0 +1,26 @@ +#*************************************************************************** +#* * +#* Copyright (c) 2012 * +#* Yorik van Havre * +#* * +#* This program is free software; you can redistribute it and/or modify * +#* it under the terms of the GNU Lesser General Public License (LGPL) * +#* as published by the Free Software Foundation; either version 2 of * +#* the License, or (at your option) any later version. * +#* for detail see the LICENCE text file. * +#* * +#* 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 Library General Public License for more details. * +#* * +#* You should have received a copy of the GNU Library General Public * +#* License along with this program; if not, write to the Free Software * +#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +#* USA * +#* * +#*************************************************************************** + +import FreeCAD,FreeCADGui +rf=FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") +rf.SetBool("AllowDownload",True) diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js index 33e33ce4bb..d941bc005c 100644 --- a/src/Mod/Start/StartPage/StartPage.js +++ b/src/Mod/Start/StartPage/StartPage.js @@ -1,4 +1,5 @@ var linkDescriptions = []; +var allowDownloads = 0; function JSONscriptRequest(fullUrl) { // REST request path @@ -85,6 +86,10 @@ function stripTags(text) { function showTweets(data) { ddiv = document.getElementById('news'); + if (allowDownloads == 0) { + ddiv.innerHTML = 'text70 text71'; + return; + } ddiv.innerHTML = "Received"; var html = ['