Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ def __open_on_journal(self, widget, url):
'icon-color': profile.get_color().to_string(),
'mime_type': 'text/uri-list',
}
for k, v in metadata.items():
for k, v in list(metadata.items()):
jobject.metadata[k] = v
file_path = os.path.join(get_activity_root(), 'instance',
'%i_' % time.time())
open(file_path, 'w').write(url + '\r\n')
os.chmod(file_path, 0755)
os.chmod(file_path, 0o755)
jobject.set_file_path(file_path)
datastore.write(jobject)
show_object_in_journal(jobject.object_id)
Expand Down
2 changes: 1 addition & 1 deletion activity/activity.info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Activity]
name = Chat
icon = activity-icon
exec = sugar-activity activity.Chat
exec = sugar-activity3 activity.Chat
activity_version = 85
max_participants = 20
bundle_id = org.laptop.Chat
Expand Down
6 changes: 3 additions & 3 deletions chat/smilies.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def parse(text):

result = [text]

for smiley in sorted(_catalog.keys(), lambda x, y: cmp(len(y), len(x))):
for smiley in sorted(list(_catalog.keys()), key = lambda x: - len(x)):
new_result = []
for word in result:
if isinstance(word, GdkPixbuf.Pixbuf):
Expand Down Expand Up @@ -213,7 +213,7 @@ def init():

def _generate_svg(letter):
# TODO: Adjust font size and character positioning
return '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + \
return ('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + \
'<svg\n' + \
' xmlns:dc="http://purl.org/dc/elements/1.1/"\n' + \
' xmlns:cc="http://creativecommons.org/ns#"\n' + \
Expand All @@ -235,4 +235,4 @@ def _generate_svg(letter):
' y="42">\n' + \
letter + \
'</tspan></text>\n' + \
'</svg>\n'
'</svg>\n').encode('utf-8')