Translated using Weblate (Chinese (Simplified))
[cygwin-setup.git] / splash.cc
blob40c1334b06c6a014c3a86853308061d64bc55524
1 /*
2 * Copyright (c) 2001, 2002, 2003 Gary R. Van Sickle.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
12 * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
16 /* This is the implementation of the SplashPage class. Since the splash page
17 * has little to do, there's not much here. */
19 #include "setup_version.h"
20 #include "resource.h"
21 #include "splash.h"
22 #include "ini.h"
24 #define SPLASH_URL "https://cygwin.com"
25 #define SPLASH_COPYRIGHT "Copyright 2000-2023"
26 #define SPLASH_TRANSLATE_URL "https://cygwin.com/setup/translate"
28 static ControlAdjuster::ControlInfo SplashControlsInfo[] = {
29 { IDC_SPLASH_TEXT, CP_STRETCH, CP_STRETCH },
30 { IDC_SPLASH_ICON, CP_LEFT, CP_TOP },
31 { IDC_VERSION, CP_LEFT, CP_BOTTOM },
32 { IDC_SPLASH_COPYR, CP_LEFT, CP_BOTTOM },
33 { IDC_SPLASH_URL, CP_LEFT, CP_BOTTOM },
34 { IDC_SPLASH_TRANSLATE, CP_LEFT, CP_BOTTOM },
35 {0, CP_LEFT, CP_TOP}
38 SplashPage::SplashPage ()
40 sizeProcessor.AddControlInfo (SplashControlsInfo);
43 bool
44 SplashPage::Create ()
46 return PropertyPage::Create (IDD_SPLASH);
49 void
50 SplashPage::OnInit ()
52 std::string ver = "Setup version ";
53 ver += (setup_version[0] ? setup_version : "[unknown]");
54 ver += is_64bit ? " (64 bit)" : " (32 bit)";
55 SetDlgItemFont(IDC_VERSION, "Arial", 10, FW_BOLD);
56 ::SetWindowText (GetDlgItem (IDC_VERSION), ver.c_str());
57 ::SetWindowText (GetDlgItem (IDC_SPLASH_COPYR), SPLASH_COPYRIGHT);
58 ::SetWindowText (GetDlgItem (IDC_SPLASH_URL), SPLASH_URL);
59 makeClickable (IDC_SPLASH_URL, SPLASH_URL);
60 makeClickable (IDC_SPLASH_TRANSLATE, SPLASH_TRANSLATE_URL);