diff options
author | tv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94> | 2008-09-26 14:55:12 +0000 |
---|---|---|
committer | tv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94> | 2008-09-26 14:55:12 +0000 |
commit | 9a15705aa295cbaeaf07cf092b2ad7bb43af2a37 (patch) | |
tree | 32737acb376a217f58a3e9fd1b37bcf684366851 | |
parent | d12f5c6a4bd9d081ff72320092a8cbad4e543742 (diff) | |
download | draksnapshot-9a15705aa295cbaeaf07cf092b2ad7bb43af2a37.tar draksnapshot-9a15705aa295cbaeaf07cf092b2ad7bb43af2a37.tar.gz draksnapshot-9a15705aa295cbaeaf07cf092b2ad7bb43af2a37.tar.bz2 draksnapshot-9a15705aa295cbaeaf07cf092b2ad7bb43af2a37.tar.xz draksnapshot-9a15705aa295cbaeaf07cf092b2ad7bb43af2a37.zip |
report DBus errors
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@246740 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | draksnapshot-applet | 25 |
2 files changed, 26 insertions, 0 deletions
@@ -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); } |