10 [Widget
] Window PluginErrorWindow
;
11 [Widget
] Image StopImage
;
12 [Widget
] Button CloseButton
;
13 [Widget
] Label ErrorText
;
14 [Widget
] Label BottomText
;
15 [Widget
] Label TitleText
;
16 [Widget
] TextView FullErrorText
;
20 public PluginError(Exception e
, Block b
, bool setup
)
24 Glade
.XML gxml
= new Glade
.XML("PluginError.glade", "PluginErrorWindow");
25 gxml
.BindFields(this);
27 PluginErrorWindow
.IconList
= new Gdk
.Pixbuf
[2] {new Gdk.Pixbuf(null, "dialog-warning.png"), new Gdk.Pixbuf(null, "dialog-warning-16.png")}
;
29 PluginErrorWindow
.DeleteEvent
+= CloseWindow
;
30 CloseButton
.Clicked
+= CloseWindow
;
32 StopImage
.FromPixbuf
= new Gdk
.Pixbuf(null, "dialog-warning.png");
34 ErrorText
.Text
= e
.Message
;
35 TextBuffer buf
= new TextBuffer(null);
36 buf
.Text
= e
.ToString();
37 FullErrorText
.Buffer
= buf
;
41 TitleText
.Text
= String
.Format(Catalog
.GetString("<big><big><b>{0} has encountered error while trying to configure plugin.</b></big></big>"), About
.Name
);
42 BottomText
.Text
= Catalog
.GetString("Please report bug to plugin's author.");
46 TitleText
.Text
= String
.Format(Catalog
.GetString("<big><big><b>{0} has encountered error while trying to run plugin.</b></big></big>"), About
.Name
);
48 TitleText
.UseMarkup
= true;
50 PluginErrorWindow
.ShowAll();
53 private void CloseWindow(object o
, EventArgs args
)
55 PluginErrorWindow
.Destroy();
58 MainWindow
.RedrawSchematic();