1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
/* -*- C -*- */ 
class GTK2.MessageDialog; 
inherit GTK2.Dialog; 
 
//! A dialog with an image representing the type of message (Error, Question). 
//! alongside some message text.  It's simply a convenience widget; you could 
//! construct the equivalent of GTK2.MessageDialog from GTK2.Dialog without too 
//! much effort, but GTK2.MessageDialog saves typing. 
 
//! Properties: 
//! int buttons 
require gtk210; 
//! GTK2.Widget image 
endrequire; 
//! int message-type 
require gtk210; 
//! string secondary-text 
endrequire; 
//! <p> 
//! Style properties: 
//! int message-border 
//! int use-separator 
 
void create(mapping(string:mixed)|int flags, ?int type, ?int buttons, 
            ?string message, ?GTK2.Window parent) 
//! Creates a new message dialog, which is a simple dialog with an icon 
//! indicating the dialog type (error, warning, etc) and some text the user 
//! may want to see.  When the user clicks a button a "response" signal is 
//! emitted with response IDs from CONST(GTK2.RESPONSE_).  See 
//! GTK2.Dialog for more details. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args>1) { 
    INT_TYPE flags,type,buttons; 
    struct object *o1=NULL; 
    struct pike_string *message; 
    const gchar *msg2; 
    GtkWidget *gmd; 
 
    get_all_args("create",args,"%i%i%i%t.%o",&flags,&type,&buttons, 
                 &message,&o1); 
    ref_push_string(message); 
    f_string_to_utf8(1); 
    msg2=GSTR0(Pike_sp[-1].u.string); 
    gmd=gtk_message_dialog_new(GTK_WINDOW(get_gobject(o1)),flags,type, 
                               buttons,msg2,NULL); 
    THIS->obj=G_OBJECT(gmd); 
  } else { 
    INIT_WITH_PROPS(GTK_TYPE_MESSAGE_DIALOG); 
  } 
  pgtk2_pop_n_elems(args+1); 
  pgtk2__init_this_object(); 
} 
 
require gtk24; 
void set_markup(string text); 
//! Sets the text of the message dialog to be text, which is marked up with 
//! the Pango text markup language. 
endrequire; 
 
require gtk210; 
void set_image(GTK2.Widget image); 
//! Sets the dialog's image to image. 
endrequire; 
 
require gtk26; 
void format_secondary_text(string text) 
//! Sets the secondary text of the message dialog to be text. 
//! <p> 
//! Note that setting a secondary text makes the primary text become bold, 
//! unless you have provided explicit markup. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct pike_string *t; 
    const gchar *t2; 
    get_all_args("format_secondary_text",args,"%t",&t); 
    ref_push_string(t); 
    f_string_to_utf8(1); 
    t2=GSTR0(Pike_sp[-1].u.string); 
    gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(THIS->obj), 
                t2,NULL); 
    pop_stack(); 
  } 
  RETURN_THIS(); 
} 
 
void format_secondary_markup(string text) 
//! Sets the secondary text of the message dialog to be text, which is 
//! marked up with the Pango text markup language. 
//! <p> 
//! Note tha tsetting a secondary text makes the primary text become bold, 
//! unless you have provided explicit markup. 
{ 
  pgtk2_verify_inited(); 
  { 
    struct pike_string *t; 
    const gchar *t2; 
    get_all_args("format_secondary_markup",args,"%t",&t); 
    ref_push_string(t); 
    f_string_to_utf8(1); 
    t2=GSTR0(Pike_sp[-1].u.string); 
    gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(THIS->obj), 
                t2,NULL); 
    pop_stack(); 
  } 
  RETURN_THIS(); 
} 
endrequire;