diff options
Diffstat (limited to 'draksnapshot-applet')
-rwxr-xr-x | draksnapshot-applet | 25 |
1 files changed, 25 insertions, 0 deletions
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); } |