From 9a15705aa295cbaeaf07cf092b2ad7bb43af2a37 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 26 Sep 2008 14:55:12 +0000 Subject: report DBus errors git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@246740 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- draksnapshot-applet | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'draksnapshot-applet') 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); } -- cgit v1.2.1