Entropy Notification Applet: inform user when repos are being updated

This commit is contained in:
Fabio Erculiani
2009-05-09 21:18:32 +02:00
parent 8f79c28ee6
commit 76d12c12a8
@@ -189,6 +189,7 @@ class EntropyApplet:
self.__dbus_interface = "org.entropy.Client"
self.__dbus_path = "/notifier"
self.__signal_name = "signal_updates"
self.__updating_signal_name = "signal_updating"
self._dbus_service_available = self.setup_dbus()
if etp_applet_config.settings['APPLET_ENABLED'] and \
@@ -216,6 +217,10 @@ class EntropyApplet:
self.__signal_name, self.new_updates_signal,
dbus_interface = self.__dbus_interface
)
self.__entropy_dbus_object.connect_to_signal(
self.__updating_signal_name, self.updating_signal,
dbus_interface = self.__dbus_interface
)
except dbus.exceptions.DBusException, e:
self.__dbus_init_error_msg = unicode(e)
# service not avail
@@ -282,6 +287,16 @@ class EntropyApplet:
_("No updates available at this time, cool!")
)
def updating_signal(self):
if not etp_applet_config.settings['APPLET_ENABLED']:
return
# all fine, no updates
self.update_tooltip(_("Repositories are being updated"))
self.show_alert(_("Sabayon repositories status"),
_("Repositories are being updated automatically")
)
def do_first_check(self):
def _do_check():