diff --git a/wicd/translations.py b/wicd/translations.py index 327951c..b92bf44 100644 --- a/wicd/translations.py +++ b/wicd/translations.py @@ -226,4 +226,6 @@ language['raw_screen_arg'] = _('use urwid\'s raw screen controller') language['ok'] = _('OK') language['cancel'] = _('Cancel') - +language['disconnected'] = _('Disconnected') +language['connection_established'] = _('Connection established') +language['establishing_connection'] = _('Establishing connection...') diff --git a/wicd/wicd-client.py b/wicd/wicd-client.py index 143d9e5..da3b173 100755 --- a/wicd/wicd-client.py +++ b/wicd/wicd-client.py @@ -166,13 +166,13 @@ class TrayIcon(object): handle_no_dbus() self.set_not_connected_state() - def _show_notification(self, status_string): + def _show_notification(self, title, details): if self.should_notify: if not self._last_bubble: - self._last_bubble = pynotify.Notification("Network status", status_string) + self._last_bubble = pynotify.Notification(title, details) self._last_bubble.show() else: - self._last_bubble.update("Network status", status_string) + self._last_bubble.update(title, details) self._last_bubble.show() self.should_notify = False @@ -190,7 +190,8 @@ class TrayIcon(object): status_string = language['connected_to_wired'].replace('$A', wired_ip) self.tr.set_tooltip(status_string) - self._show_notification(status_string) + self._show_notification(language['wired_network'], + language['connection_established']) @catchdbus def set_wireless_state(self, info): @@ -210,7 +211,8 @@ class TrayIcon(object): .replace('$C', str(wireless_ip))) self.tr.set_tooltip(status_string) self.set_signal_image(int(strength), lock) - self._show_notification(status_string) + self._show_notification(self.network, + language['connection_established']) def set_connecting_state(self, info): @@ -223,7 +225,8 @@ class TrayIcon(object): cur_network + "..." self.tr.set_tooltip(status_string) self.tr.set_from_file(os.path.join(wpath.images, "no-signal.png")) - self._show_notification(status_string) + self._show_notification(cur_network, + language['establishing_connection']) @catchdbus def set_not_connected_state(self, info=None): @@ -237,7 +240,7 @@ class TrayIcon(object): else: status = language['not_connected'] self.tr.set_tooltip(status) - self._show_notification(status) + self._show_notification(language['disconnected'], None) @catchdbus def update_tray_icon(self, state=None, info=None):