comparison mde/menus.d @ 153:2934fcacbb97

Fixed a bug preventing log messages from being displayed. Added a Help->About menu (logs copyright info).
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 10 Apr 2009 18:09:55 +0200
parents 6f69a9c111eb
children e45226d3deae
comparison
equal deleted inserted replaced
152:c67d074a7111 153:2934fcacbb97
20 *****************************************************************************/ 20 *****************************************************************************/
21 module mde.menus; 21 module mde.menus;
22 22
23 import mde.content.miscContent; 23 import mde.content.miscContent;
24 import mde.imde; 24 import mde.imde;
25 debug {
26 import tango.util.log.Log : Log, Logger; 25 import tango.util.log.Log : Log, Logger;
27 private Logger logger; 26 private Logger logger;
28 static this () { 27 static this () {
29 logger = Log.getLogger ("mde.menus"); 28 logger = Log.getLogger ("mde.menus");
30 } 29 }
31 }
32 30
33 static this () { 31 static this () {
34 auto quit = new EventContent("menus.main.quit"); 32 auto quit = new EventContent("menus.main.quit");
35 quit.addCallback ((Content){ 33 quit.addCallback ((Content){
36 debug logger.trace ("Quit (from menu)"); 34 debug logger.trace ("Quit (from menu)");
37 run = false; 35 run = false;
38 }); 36 });
37
38 auto about = new EventContent("menus.help.about");
39 about.addCallback ((Content){
40 //TODO: popup dialog box
41 logger.info ("MDE Copyright (C) 2007-2009 Diggory Hardy");
42 logger.info ("This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.");
43 logger.info ("This is free software, and you are welcome to redistribute it under certain conditions; see COPYING for details.");
44 });
39 } 45 }