summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xdraksnapshot-applet25
2 files changed, 26 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 0f43c5e..a112897 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
o delay first check by 30s so that notification goes at the right
place
o do not crash if DBus isn't reachable
+ o report DBus errors
Version 0.13 - 22 September 2008, Thierry Vignaud
diff --git a/draksnapshot-applet b/draksnapshot-applet
index 41e6df0..9cc1c50 100755
--- a/draksnapshot-applet
+++ b/draksnapshot-applet
@@ -122,6 +122,31 @@ if ($dbus) {
0;
});
$con->add_match("type='signal',interface='$hal_manager'");
+} else {
+ Glib::Timeout->add(
+ $timeout,
+ sub {
+ $icon->set_visible(1);
+ # make icon actually visible so that notification gots proper positionning:
+ gtkflush();
+ my $bubble =
+ Gtk2::Notify->new_with_status_icon(N("Error. Service disabled."),
+ join("\n",
+ formatAlaTeX(N("Error while initializing DBus:")),
+ $dbus_error,
+ '',
+ N("Disabling the service."),
+ ),
+ '/usr/share/icons/draksnapshot.png', $icon);
+ $bubble->set_urgency('critical');
+ my $timeout_bubble = 5000;
+ $bubble->set_timeout($timeout_bubble);
+ eval { $bubble->show };
+ Glib::Timeout->add($timeout_bubble + 100, sub { Gtk2->exit; exit(1) });
+ 0;
+ });
+ Gtk2->main;
+ exit(1);
}