From baad7784063a8de0c222ace5424a82aca829105b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 02 Mar 2007 14:11:59 +0000 Subject: Improve logging --- (limited to 'shell') diff --git a/shell/hardware/nmclient.py b/shell/hardware/nmclient.py index 929fc75..491f686 100644 --- a/shell/hardware/nmclient.py +++ b/shell/hardware/nmclient.py @@ -519,15 +519,23 @@ class NMClient(gobject.GObject): logging.debug('Device Activation Stage "%s" for device %s' % (NM_DEVICE_STAGE_STRINGS[stage], device)) def device_activating_sig_handler(self, device): + logging.debug('DeviceActivating for %s' % (device)) + if not self._devices.has_key(device): + logging.debug('DeviceActivating, device %s does not exist' % (device)) + return self._devices[device].set_state(DEVICE_STATE_ACTIVATING) def device_now_active_sig_handler(self, device, ssid=None): + logging.debug('DeviceNowActive for %s' % (device)) if not self._devices.has_key(device): + logging.debug('DeviceNowActive, device %s does not exist' % (device)) return self._devices[device].set_state(DEVICE_STATE_ACTIVATED) def device_no_longer_active_sig_handler(self, device): + logging.debug('DeviceNoLongerActive for %s' % (device)) if not self._devices.has_key(device): + logging.debug('DeviceNoLongerActive, device %s does not exist' % (device)) return self._devices[device].set_state(DEVICE_STATE_INACTIVE) @@ -546,9 +554,11 @@ class NMClient(gobject.GObject): self._get_initial_devices() def device_added_sig_handler(self, device): + logging.debug('DeviceAdded for %s' % (device)) self._add_device(device) def device_removed_sig_handler(self, device): + logging.debug('DeviceRemoved for %s' % (device)) self._remove_device(device) def wireless_network_appeared_sig_handler(self, device, network): diff --git a/shell/view/frame/eventframe.py b/shell/view/frame/eventframe.py index 0537df3..fd26120 100644 --- a/shell/view/frame/eventframe.py +++ b/shell/view/frame/eventframe.py @@ -14,8 +14,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import logging - import gtk import gobject import wnck @@ -81,16 +79,13 @@ class EventFrame(gobject.GObject): def _enter_notify_cb(self, widget, event): self._notify_enter(event.x, event.y) - logging.debug('EventFrame._enter_notify_cb ' + str(self._hover)) def _motion_notify_cb(self, widget, event): self._notify_enter(event.x, event.y) - logging.debug('EventFrame._motion_notify_cb ' + str(self._hover)) def _drag_motion_cb(self, widget, drag_context, x, y, timestamp): drag_context.drag_status(0, timestamp); self._notify_enter(x, y) - logging.debug('EventFrame._drag_motion_cb ' + str(self._hover)) return True def _notify_enter(self, x, y): @@ -111,11 +106,9 @@ class EventFrame(gobject.GObject): def _leave_notify_cb(self, widget, event): self._notify_leave() - logging.debug('EventFrame._leave_notify_cb ' + str(self._hover)) def _drag_leave_cb(self, widget, drag_context, timestamp): self._notify_leave() - logging.debug('EventFrame._drag_leave_cb ' + str(self._hover)) return True def _notify_leave(self): diff --git a/shell/view/frame/frame.py b/shell/view/frame/frame.py index 6cc2a17..0d2231e 100644 --- a/shell/view/frame/frame.py +++ b/shell/view/frame/frame.py @@ -14,7 +14,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -import logging import gtk import gobject import hippo @@ -151,16 +150,13 @@ class Frame: def _enter_notify_cb(self, window, event): self._enter_notify() - logging.debug('Frame._enter_notify_cb ' + str(self._mode)) def _drag_motion_cb(self, window, context, x, y, time): self._enter_notify() - logging.debug('Frame._drag_motion_cb ' + str(self._mode)) return True def _drag_leave_cb(self, window, drag_context, timestamp): self._leave_notify(window) - logging.debug('Frame._drag_leave_cb ' + str(self._mode)) def _leave_notify_cb(self, window, event): # FIXME for some reason every click cause also a leave-notify @@ -168,7 +164,6 @@ class Frame: return self._leave_notify(window) - logging.debug('Frame._leave_notify_cb ' + str(self._mode)) def _enter_notify(self): self._hover_frame = True @@ -185,17 +180,14 @@ class Frame: def _enter_edge_cb(self, event_frame): self._mode = Frame.HIDE_ON_LEAVE self._timeline.play(None, 'slide_in') - logging.debug('Frame._enter_edge_cb ' + str(self._mode)) def _enter_corner_cb(self, event_frame): self._mode = Frame.HIDE_ON_LEAVE self._timeline.play('slide_in', 'slide_in') - logging.debug('Frame._enter_corner_cb ' + str(self._mode)) def _event_frame_leave_cb(self, event_frame): if self._mode != Frame.STICKY: self._timeline.goto('slide_out', True) - logging.debug('Frame._event_frame_leave_cb ' + str(self._mode)) def show_and_hide(self, seconds): self._mode = Frame.AUTOMATIC -- cgit v0.9.1