Fix traceback on focus changes

This commit is contained in:
Dan Williams 2006-06-07 12:22:28 -04:00
parent 55d863fc71
commit f7cd0939c4
4 changed files with 5 additions and 11 deletions

View File

@ -2,12 +2,7 @@ sugardir = $(pythondir)/sugar/browser
sugar_PYTHON = \ sugar_PYTHON = \
__init__.py \ __init__.py \
browser.py \ browser.py \
NotificationBar.py \ NotificationBar.py
BrowserShell.py \
WebActivity.py \
AddressItem.py \
BrowserActivity.py \
NavigationToolbar.py
icondir = $(pkgdatadir) icondir = $(pkgdatadir)
icon_DATA = \ icon_DATA = \

View File

@ -1,6 +1,6 @@
# -*- tab-width: 4; indent-tabs-mode: t -*- # -*- tab-width: 4; indent-tabs-mode: t -*-
import avahi, dbus, dbus.glib, dbus.dbus_bindings import avahi, dbus, dbus.glib, dbus_bindings
ACTION_SERVICE_NEW = 'new' ACTION_SERVICE_NEW = 'new'
ACTION_SERVICE_REMOVED = 'removed' ACTION_SERVICE_REMOVED = 'removed'
@ -97,7 +97,7 @@ class PresenceAnnounce(object):
"", "", # domain, host (let the system figure it out) "", "", # domain, host (let the system figure it out)
dbus.UInt16(rs_port), info,) dbus.UInt16(rs_port), info,)
g.Commit() g.Commit()
except dbus.dbus_bindings.DBusException, exc: except dbus_bindings.DBusException, exc:
# FIXME: ignore local name collisions, since that means # FIXME: ignore local name collisions, since that means
# the zeroconf service is already registered. Ideally we # the zeroconf service is already registered. Ideally we
# should un-register it an re-register with the correct info # should un-register it an re-register with the correct info

View File

@ -2,5 +2,4 @@ sugardir = $(pythondir)/sugar/shell
sugar_PYTHON = \ sugar_PYTHON = \
__init__.py \ __init__.py \
activity.py \ activity.py \
shell.py \ shell.py
PresenceWindow.py

View File

@ -246,7 +246,7 @@ class Activity(object):
"""Marks this Activity as having changes. This usually means """Marks this Activity as having changes. This usually means
that this Activity's tab turns a red color or something else that this Activity's tab turns a red color or something else
to notify the user that this Activity needs attention.""" to notify the user that this Activity needs attention."""
if not self.get_has_focus() and has_changes: if not self.has_focus() and has_changes:
self._activity_object.set_has_changes(True) self._activity_object.set_has_changes(True)
else: else:
self._activity_object.set_has_changes(False) self._activity_object.set_has_changes(False)