Commit 72f30bd8 authored by js's avatar js

Complete activity icon set.

Special thanks to Rederick Asher!
Fixes #4140.
parent 6fc5ffe2
......@@ -358,9 +358,13 @@ class ChangeActivityDialog:
else:
rbtns[act] = group = gtk.RadioButton()
hbox = gtk.HBox(False, 5)
hbox.pack_start(gtkgui_helpers.load_activity_icon(category),
False, False, 0)
lbl = gtk.Label('<b>' + pep.ACTIVITIES[category]['category'] + '</b>')
lbl.set_use_markup(True)
rbtns[act].add(lbl)
hbox.pack_start(lbl, False, False, 0)
rbtns[act].add(hbox)
rbtns[act].connect('toggled', self.on_rbtn_toggled,
[category, 'other'])
vbox.pack_start(rbtns[act], False, False, 0)
......@@ -381,9 +385,14 @@ class ChangeActivityDialog:
else:
rbtns[act] = group = gtk.RadioButton()
rbtns[act].set_label(pep.ACTIVITIES[category][activity])
hbox = gtk.HBox(False, 5)
hbox.pack_start(gtkgui_helpers.load_activity_icon(category,
activity), False, False, 0)
hbox.pack_start(gtk.Label(pep.ACTIVITIES[category][activity]),
False, False, 0)
rbtns[act].connect('toggled', self.on_rbtn_toggled,
[category, activity])
rbtns[act].add(hbox)
vbox.pack_start(rbtns[act], False, False, 0)
rbtns['working_other'].set_active(True)
......
......@@ -902,13 +902,17 @@ def load_mood_icon(icon_name):
icon_list = _load_icon_list([icon_name], path)
return icon_list[icon_name]
def load_activity_icon(activity, sub_activity = None):
def load_activity_icon(category, activity = None):
'''load an icon from the activity iconset in 16x16'''
print category
print activity
iconset = gajim.config.get('activity_iconset')
path = os.path.join(helpers.get_activity_iconset_path(iconset),
activity, '')
icon_list = _load_icon_list(['category'], path)
return icon_list['category']
category, '')
if activity is None:
activity = 'category'
icon_list = _load_icon_list([activity], path)
return icon_list[activity]
def load_icons_meta():
'''load and return - AND + small icons to put on top left of an icon
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment