Home | History | Annotate | Line # | Download | only in hello-ycp
      1  1.1  christos // Example for use of GNU gettext.
      2  1.1  christos // Copyright (C) 2003 Free Software Foundation, Inc.
      3  1.1  christos // This file is in the public domain.
      4  1.1  christos 
      5  1.1  christos // Source code of the YCP program.
      6  1.1  christos 
      7  1.1  christos UI(``{
      8  1.1  christos     textdomain "hello-ycp";
      9  1.1  christos 
     10  1.1  christos     map bash_out = SCR::Execute (.target.bash_output, "echo $PPID");
     11  1.1  christos     integer pid = tointeger (bash_out["stdout"]:"99999");
     12  1.1  christos 
     13  1.1  christos     OpenDialog (
     14  1.1  christos         `VBox (
     15  1.1  christos              `HBox (
     16  1.1  christos                   `Label (_("Hello, world!")),
     17  1.1  christos                   `HStretch ()
     18  1.1  christos                   ),
     19  1.1  christos              `HBox (
     20  1.1  christos                   `Label (sformat (_("This program is running as process number %1."), pid)),
     21  1.1  christos                   `HStretch ()
     22  1.1  christos                   ),
     23  1.1  christos              `HBox (
     24  1.1  christos                   `HStretch (),
     25  1.1  christos                   `PushButton (`opt(`default), "&OK")
     26  1.1  christos                   )
     27  1.1  christos              )
     28  1.1  christos         );
     29  1.1  christos     UserInput();
     30  1.1  christos     CloseDialog();
     31  1.1  christos })
     32