You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

401 lines
17 KiB

* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
15 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
* KIWAY Milestone A): Make major modules into DLL/DSOs. ! The initial testing of this commit should be done using a Debug build so that all the wxASSERT()s are enabled. Also, be sure and keep enabled the USE_KIWAY_DLLs option. The tree won't likely build without it. Turning it off is senseless anyways. If you want stable code, go back to a prior version, the one tagged with "stable". * Relocate all functionality out of the wxApp derivative into more finely targeted purposes: a) DLL/DSO specific b) PROJECT specific c) EXE or process specific d) configuration file specific data e) configuration file manipulations functions. All of this functionality was blended into an extremely large wxApp derivative and that was incompatible with the desire to support multiple concurrently loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects. An amazing amount of organization come from simply sorting each bit of functionality into the proper box. * Switch to wxConfigBase from wxConfig everywhere except instantiation. * Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD, PGM_SINGLE_TOP, * Remove "Return" prefix on many function names. * Remove obvious comments from CMakeLists.txt files, and from else() and endif()s. * Fix building boost for use in a DSO on linux. * Remove some of the assumptions in the CMakeLists.txt files that windows had to be the host platform when building windows binaries. * Reduce the number of wxStrings being constructed at program load time via static construction. * Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that these functions are useful even when the wxConfigBase comes from another source, as is the case in the KICAD_MANAGER_FRAME. * Move the setting of the KIPRJMOD environment variable into class PROJECT, so that it can be moved into a project variable soon, and out of FP_LIB_TABLE. * Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all its child wxFrames and wxDialogs now have a Kiway() member function which returns a KIWAY& that that window tree branch is in support of. This is like wxWindows DNA in that child windows get this member with proper value at time of construction. * Anticipate some of the needs for milestones B) and C) and make code adjustments now in an effort to reduce work in those milestones. * No testing has been done for python scripting, since milestone C) has that being largely reworked and re-thought-out.
12 years ago
12 years ago
  1. /*
  2. * This program source code file is part of KiCad, a free EDA CAD application.
  3. *
  4. * Copyright (C) 2010 Rafael Sokolowski <Rafael.Sokolowski@web.de>
  5. * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, you may find one here:
  19. * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  20. * or you may search the http://www.gnu.org website for the version 2 license,
  21. * or you may write to the Free Software Foundation, Inc.,
  22. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  23. */
  24. #include <dialog_about.h>
  25. #include <aboutinfo.h>
  26. #include <wx/aboutdlg.h>
  27. #include <wx/textctrl.h>
  28. /* Used icons:
  29. * lang_xx_xpm[]; // Icons of various national flags
  30. * show_3d_xpm[]; // 3D icon
  31. * edit_module_xpm[];
  32. * icon_kicad_xpm[]; // Icon of the application
  33. */
  34. #include <bitmaps.h>
  35. #include <wxstruct.h>
  36. #include <common.h>
  37. #include <pgm_base.h>
  38. #include <build_version.h>
  39. #include <wx/arrimpl.cpp>
  40. WX_DEFINE_OBJARRAY( Contributors )
  41. // Helper functions:
  42. static wxString HtmlHyperlink( const wxString& url, const wxString& description = wxEmptyString );
  43. static wxString HtmlNewline( const unsigned int amount = 1 );
  44. /**
  45. * Initializes the <code>AboutAppInfo</code> object with applicaion specific information.
  46. *
  47. * This the object which holds all information about the application
  48. */
  49. static void InitKiCadAboutNew( AboutAppInfo& info )
  50. {
  51. // Set application specific icon
  52. const wxTopLevelWindow* const tlw = wxDynamicCast( Pgm().App().GetTopWindow(), wxTopLevelWindow);
  53. if( tlw )
  54. info.SetIcon( tlw->GetIcon() );
  55. else
  56. {
  57. wxBitmap bitmap = KiBitmap( icon_kicad_xpm );
  58. wxIcon icon;
  59. icon.CopyFromBitmap( bitmap );
  60. info.SetIcon( icon );
  61. }
  62. /* Set title */
  63. info.SetAppName( wxT( ".: " ) + Pgm().App().GetAppName() + wxT( " :." ) );
  64. /* Copyright information */
  65. info.SetCopyright( wxT( "(C) 1992-2015 KiCad Developers Team" ) );
  66. /* KiCad build version */
  67. wxString version;
  68. version << wxT( "Build: " ) << GetBuildVersion();
  69. info.SetBuildVersion( version );
  70. /* wxWidgets version */
  71. wxString libVersion;
  72. libVersion
  73. << wxT( "wxWidgets " )
  74. << wxMAJOR_VERSION << wxT( "." )
  75. << wxMINOR_VERSION << wxT( "." )
  76. << wxRELEASE_NUMBER
  77. /* Unicode or Ansi version */
  78. #if wxUSE_UNICODE
  79. << wxT( " Unicode " );
  80. #else
  81. << wxT( " Ansi " );
  82. #endif
  83. libVersion << wxT( "and boost C++ libraries" );
  84. libVersion << wxT( "\n" );
  85. /* Operating System Information */
  86. #if defined __WIN64__
  87. libVersion << wxT( "on 64 Bits Windows" );
  88. # elif defined __WINDOWS__
  89. libVersion << wxT( "on 32 Bits Windows" );
  90. /* Check for wxMAC */
  91. # elif defined __WXMAC__
  92. libVersion << wxT( "on Macintosh" );
  93. /* Linux 64 bits */
  94. # elif defined _LP64 && __LINUX__
  95. libVersion << wxT( "on 64 Bits GNU/Linux" );
  96. /* Linux 32 bits */
  97. # elif defined __LINUX__
  98. libVersion << wxT( "on 32 Bits GNU/Linux" );
  99. /* OpenBSD */
  100. # elif defined __OpenBSD__
  101. libVersion << wxT( "on OpenBSD" );
  102. /* FreeBSD */
  103. # elif defined __FreeBSD__
  104. libVersion << wxT( "on FreeBSD" );
  105. #endif
  106. info.SetLibVersion( libVersion );
  107. /* info/description part HTML formatted */
  108. wxString description;
  109. /* short description */
  110. description << wxT( "<p>" );
  111. description << wxT( "<b><u>" ) << _( "Description" ) << wxT( "</u></b>" ); // bold & underlined font for caption
  112. description << wxT( "<p>" ) <<
  113. _(
  114. "The KiCad EDA Suite is a set of open source applications for the creation of electronic schematics and to design printed circuit boards." )
  115. << wxT( "</p>" );
  116. description << wxT( "</p>" );
  117. /* websites */
  118. description << wxT( "<p>" );
  119. description << wxT( "<b><u>" ) << _( "KiCad on the web" ) << wxT( "</u></b>" ); // bold & underlined font for caption
  120. // bulletet list with some http links
  121. description << wxT( "<ul>" );
  122. description << wxT( "<li>" ) << HtmlHyperlink( wxT(
  123. "http://iut-tice.ujf-grenoble.fr/kicad" ),
  124. _( "The original site of the initiator of Kicad" ) )
  125. << wxT( "</li>" );
  126. description << wxT( "<li>" ) <<
  127. HtmlHyperlink( wxT( "https://launchpad.net/kicad" ), _( "Project on Launchpad" ) ) << wxT(
  128. "</li>" );
  129. description << wxT( "<li>" ) <<
  130. HtmlHyperlink( wxT( "http://www.kicad-pcb.org" ),
  131. _( "The new KiCad site" ) ) << wxT( "</li>" );
  132. description << wxT( "<li>" ) <<
  133. HtmlHyperlink( wxT( "http://www.kicadlib.org" ),
  134. _( "Repository with additional component libraries" ) ) << wxT( "</li>" );
  135. description << wxT( "</ul>" );
  136. description << wxT( "</p>" );
  137. description << wxT( "<p>" );
  138. description << wxT( "<b><u>" ) << _( "Contribute to KiCad" ) << wxT( "</u></b>" ); // bold & underlined font caption
  139. // bulletet list with some http links
  140. description << wxT( "<ul>" );
  141. description << wxT( "<li>" ) <<
  142. HtmlHyperlink( wxT( "https://bugs.launchpad.net/kicad" ),
  143. _( "Report bugs if you found any" ) ) << wxT( "</li>" );
  144. description << wxT( "<li>" ) << HtmlHyperlink( wxT(
  145. "https://blueprints.launchpad.net/kicad" ),
  146. _( "File an idea for improvement" ) ) << wxT(
  147. "</li>" );
  148. description << wxT( "<li>" ) <<
  149. HtmlHyperlink( wxT( "http://www.kicadlib.org/Kicad_related_links.html" ),
  150. _( "KiCad links to user groups, tutorials and much more" ) ) << wxT( "</li>" );
  151. description << wxT( "</ul>" );
  152. description << wxT( "</p>" );
  153. info.SetDescription( description );
  154. /* License information also HTML formatted */
  155. wxString license;
  156. license
  157. << wxT( "<div align='center'>" )
  158. << HtmlNewline( 4 )
  159. << _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
  160. << HtmlHyperlink( wxT( "http://www.gnu.org/licenses" ),
  161. _( "GNU General Public License (GPL) version 2" ) )
  162. << wxT( "</div>" );
  163. info.SetLicense( license );
  164. /* A contributor consists of the following information:
  165. * Mandatory:
  166. * - Name
  167. * - EMail address
  168. * Optional:
  169. * - Category
  170. * - Category specific icon
  171. *
  172. * All contributors of the same category will be enumerated under this category
  173. * which should be represented by the same icon.
  174. */
  175. // The core developers
  176. info.AddDeveloper(
  177. new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) );
  178. info.AddDeveloper(
  179. new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) );
  180. info.AddDeveloper(
  181. new Contributor( wxT( "Wayne Stambaugh" ), wxT( "stambaughw@verizon.net" ) ) );
  182. // alphabetically by last name after main 3 above:
  183. info.AddDeveloper(
  184. new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) );
  185. info.AddDeveloper(
  186. new Contributor( wxT( "Cirilo Bernardo" ), wxT( "cirilo_bernardo@yahoo.com" ) ) );
  187. info.AddDeveloper(
  188. new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) );
  189. info.AddDeveloper(
  190. new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) );
  191. info.AddDeveloper(
  192. new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) );
  193. info.AddDeveloper(
  194. new Contributor( wxT( "Torsten Hüter" ), wxT( "torstenhtr@gmx.de" ) ) );
  195. info.AddDeveloper(
  196. new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ) ) );
  197. info.AddDeveloper(
  198. new Contributor( wxT( "Daniel Majewski" ), wxT( "lordblick@gmail.com" ) ) );
  199. info.AddDeveloper(
  200. new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) );
  201. info.AddDeveloper(
  202. new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) );
  203. info.AddDeveloper(
  204. new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) );
  205. info.AddDeveloper(
  206. new Contributor( wxT( "Miguel Angel Ajo Pelayo" ), wxT( "miguelangel@nbee.es" ) ) );
  207. info.AddDeveloper(
  208. new Contributor( wxT( "Jacobo Aragunde Perez" ), wxT( "jaragunde@igalia.com" ) ) );
  209. info.AddDeveloper(
  210. new Contributor( wxT( "Mark Roszko" ), wxT( "mark.roszko@gmail.com" ) ) );
  211. info.AddDeveloper(
  212. new Contributor( wxT( "Marco Serantoni" ), wxT( "marco.serantoni@gmail.com" ) ) );
  213. info.AddDeveloper(
  214. new Contributor( wxT( "Brian Sidebotham" ), wxT( "brian.sidebotham@gmail.com" ) ) );
  215. info.AddDeveloper(
  216. new Contributor( wxT( "Orson (Maciej Sumiński)" ), wxT( "maciej.suminski@cern.ch" ) ) );
  217. info.AddDeveloper(
  218. new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ) ) );
  219. info.AddDeveloper(
  220. new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) );
  221. info.AddDeveloper(
  222. new Contributor( wxT( "Tomasz Wlostowski" ), wxT( "tomasz.wlostowski@cern.ch" ) ) );
  223. info.AddDeveloper(
  224. new Contributor( wxT( "Alexander Zakamaldin" ), wxT( "zaka62@mail.ru" ) ) );
  225. info.AddDeveloper(
  226. new Contributor( wxT( "Henner Zeller" ), wxT( "h.zeller@acm.org" ) ) );
  227. info.AddDeveloper(
  228. new Contributor( wxT( "Andrew Zonenberg" ), wxT( "azonenberg@drawersteak.com" ) ) );
  229. info.AddDeveloper(
  230. new Contributor( wxT( "Nick Østergaard" ), wxT( "toe.nick@gmail.com" ) ) );
  231. // The document writers
  232. info.AddDocWriter(
  233. new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) );
  234. info.AddDocWriter(
  235. new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ) ) );
  236. info.AddDocWriter(
  237. new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ) ) );
  238. /* The translators
  239. * As category the language to which the translation was done is used
  240. * and as icon the national flag of the corresponding country.
  241. */
  242. info.AddTranslator(
  243. new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ), wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) );
  244. info.AddTranslator(
  245. new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ),wxT( "Dutch (NL)" ), KiBitmapNew( lang_nl_xpm ) ) );
  246. info.AddTranslator(
  247. new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ), wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) );
  248. info.AddTranslator(
  249. new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ), wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) );
  250. info.AddTranslator(
  251. new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ), wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) );
  252. info.AddTranslator(
  253. new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) );
  254. info.AddTranslator(
  255. new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
  256. info.AddTranslator(
  257. new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) );
  258. info.AddTranslator(
  259. new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
  260. info.AddTranslator(
  261. new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) );
  262. info.AddTranslator(
  263. new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ), KiBitmapNew( lang_de_xpm ) ) );
  264. info.AddTranslator(
  265. new Contributor( wxT( "Kenta Yonekura" ), wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ), KiBitmapNew( lang_jp_xpm ) ) );
  266. info.AddTranslator(
  267. new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ),
  268. wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ), KiBitmapNew( lang_gr_xpm ) ) );
  269. info.AddTranslator(
  270. new Contributor( wxT( "Massimo Cioce" ), wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ), KiBitmapNew( lang_it_xpm ) ) );
  271. info.AddTranslator(
  272. new Contributor( wxT( "Evgeniy Ivanov" ), wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ),KiBitmapNew( lang_bg_xpm ) ) );
  273. // TODO: are these all russian translators,
  274. // placed them here now,
  275. // or else align them below other language maintainer with mail adress
  276. info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) );
  277. info.AddTranslator( new Contributor( wxT( "David Briscoe" ), wxEmptyString, wxT( "Others" ) ) );
  278. info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) );
  279. info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) );
  280. // Programm credits for icons
  281. info.AddArtist(
  282. new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) );
  283. info.AddArtist(
  284. new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ), wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) );
  285. info.AddArtist(
  286. new Contributor( wxT( "Konstantin Baranovskiy" ), wxT( "baranovskiykonstantin@gmail.com" ), wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) );
  287. info.AddArtist(
  288. new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
  289. info.AddArtist(
  290. new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) );
  291. }
  292. bool ShowAboutDialog( wxWindow* parent )
  293. {
  294. AboutAppInfo info;
  295. InitKiCadAboutNew( info );
  296. dialog_about* dlg = new dialog_about( parent, info );
  297. dlg->SetIcon( info.GetIcon() );
  298. dlg->Show();
  299. return true;
  300. }
  301. ///////////////////////////////////////////////////////////////////////////////
  302. /// Helper functions
  303. ///////////////////////////////////////////////////////////////////////////////
  304. /**
  305. * Wraps the given url with a HTML anchor tag containing a hyperlink text reference
  306. * to form a HTML hyperlink.
  307. *
  308. * @param url the url that will be embedded in an anchor tag containing a hyperlink reference
  309. * @param description the optional describing text that will be represented as a hyperlink.
  310. * If not specified the url will be used as hyperlink.
  311. * @return a HTML conform hyperlink like <a href='url'>description</a>
  312. */
  313. static wxString HtmlHyperlink( const wxString& url, const wxString& description )
  314. {
  315. wxString hyperlink = wxEmptyString;
  316. if( description.IsEmpty() )
  317. hyperlink << wxT( "<a href='" ) << url << wxT( "'>" ) << url << wxT( "</a>" );
  318. else
  319. hyperlink << wxT( "<a href='" ) << url << wxT( "'>" ) << description << wxT( "</a>" );
  320. return hyperlink;
  321. }
  322. /**
  323. * Creates a HTML newline character sequence.
  324. *
  325. * @param amount - the amount of HTML newline tags to concatenate, default is to return just
  326. * one <br> tag
  327. * @return the concatenated amount of HTML newline tag(s) <br>
  328. */
  329. static wxString HtmlNewline( const unsigned int amount )
  330. {
  331. wxString newlineTags = wxEmptyString;
  332. for( size_t i = 0; i<amount; ++i )
  333. newlineTags << wxT( "<br>" );
  334. return newlineTags;
  335. }