summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-24 03:31:33 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-24 03:31:33 +0200
commit22be7e82e20a972b0e2338ee9af11a79033a8db4 (patch)
tree53d3a854cb7c9b685ccf264f4df2052b47c7320e
parent716f158c5697e35a7eefd903eacc61fadfa506d0 (diff)
systemadm: show proper message boxes when something goes wrong
-rw-r--r--systemadm.vala18
1 files changed, 9 insertions, 9 deletions
diff --git a/systemadm.vala b/systemadm.vala
index 167340cc9c..bdff0d4259 100644
--- a/systemadm.vala
+++ b/systemadm.vala
@@ -486,7 +486,7 @@ public class MainWindow : Window {
try {
u.start("replace");
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -499,7 +499,7 @@ public class MainWindow : Window {
try {
u.stop("replace");
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -512,7 +512,7 @@ public class MainWindow : Window {
try {
u.reload("replace");
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -525,7 +525,7 @@ public class MainWindow : Window {
try {
u.restart("replace");
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -538,7 +538,7 @@ public class MainWindow : Window {
try {
j.cancel();
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -683,7 +683,7 @@ public class MainWindow : Window {
try {
manager.reload();
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
@@ -695,7 +695,7 @@ public class MainWindow : Window {
unit_type_combo_box.set_active(8);
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(this, DialogFlags.DESTROY_WITH_PARENT, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
}
}
@@ -716,9 +716,9 @@ int main (string[] args) {
Gtk.main();
} catch (DBus.Error e) {
- message("%s", e.message);
+ new MessageDialog(null, 0, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
} catch (GLib.Error e) {
- message("%s", e.message);
+ new MessageDialog(null, 0, MessageType.ERROR, ButtonsType.CLOSE, "%s", e.message).run();
}
return 0;