Ticket #32: CodeExamples.diff

File CodeExamples.diff, 1.6 kB (added by Mike Wey, 7 months ago)

A diff with the needed changes

  • CodeExamples.txt

    old new  
    77{{{ 
    88import gtk.MainWindow; 
    99import gtk.Label; 
    10 import gtk.GtkD
     10import gtk.Main
    1111 
    1212void main(char[][] args) 
    1313{ 
    14     GtkD.init(args); 
     14    Main.init(args); 
    1515    MainWindow win = new MainWindow("Hello World"); 
    1616    win.setDefaultSize(200, 100); 
    1717    win.add(new Label("Hello World")); 
    1818    win.showAll(); 
    1919 
    20     GtkD.main(); 
     20    Main.run(); 
    2121} 
    2222}}} 
    2323 
     
    2626{{{ 
    2727import gtk.MainWindow; 
    2828import gtk.Button; 
    29 import gtk.GtkD
     29import gtk.Main
    3030 
    3131class ExitButton : MainWindow 
    3232{ 
     
    4242    } 
    4343    void exitProg(Button button) 
    4444    { 
    45         GtkD.exit(0); 
     45        Main.exit(0); 
    4646    } 
    4747} 
    4848 
    4949void main(char[][] args) 
    5050{ 
    51     GtkD.init(args); 
     51    Main.init(args); 
    5252    new ExitButton(); 
    53     GtkD.main(); 
     53    Main.run(); 
    5454} 
    5555}}} 
    5656 
     
    6060import gtk.MainWindow; 
    6161import gtk.Button; 
    6262import gtk.MessageDialog; 
    63 import gtk.GtkD
     63import gtk.Main
    6464 
    6565class PopupMessage : MainWindow 
    6666{ 
     
    8181 
    8282void main(char[][] args) 
    8383{ 
    84     GtkD.init(args); 
     84    Main.init(args); 
    8585    new PopupMessage(); 
    86     GtkD.main(); 
     86    Main.run(); 
    8787} 
    8888}}} 
    8989 
     
    9595import gtk.Label; 
    9696import gtk.Button; 
    9797import gtk.VBox; 
    98 import gtk.GtkD
     98import gtk.Main
    9999 
    100100class ButtonUsage : MainWindow 
    101101{ 
     
    119119    } 
    120120    void onBtn2(Button button) 
    121121    { 
    122         GtkD.exit(0); 
     122        Main.exit(0); 
    123123    } 
    124124    void onBtn3(Button button) 
    125125    { 
     
    137137 
    138138void main(char[][] args) 
    139139{ 
    140     GtkD.init(args); 
     140    Main.init(args); 
    141141    new ButtonUsage(); 
    142     GtkD.main(); 
     142    Main.run(); 
    143143} 
    144144}}}