Improve logging

This commit is contained in:
Marco Pesenti Gritti 2007-03-02 15:11:59 +01:00
parent d1a29ecf32
commit baad778406
4 changed files with 11 additions and 16 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -1,6 +1,6 @@
VERSION=0.63
DATE=`date +%Y%m%d`
RELEASE=2.29
RELEASE=2.32
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
rm sugar-$VERSION.tar.bz2