/usr/share/stackapplet/pymm.py is in stackapplet 1.5.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #===================================
# pymm
# Copyright 2010 - Nathan Osman
#
# A small wrapper around
# the messaging menu
#
# StackApplet is released under
# the MIT license
#===================================
# Import the indicate module
import indicate
class pymm:
def __init__(self, desktop_file):
# Create the server
self.server = indicate.indicate_server_ref_default()
# Set the server's desktop file
self.server.set_desktop_file(desktop_file)
# Set the type
self.server.set_type("message.im")
# Now show the item
self.server.show()
class pymm_source:
def __init__(self, name, icon = None):
self.source = indicate.Indicator()
self.source.set_property("subtype", "im")
self.source.set_property("sender", name)
if icon:
self.source.set_property("icon", icon)
self.source.show()
def set_count(self, count):
self.source.set_property("count", str(count))
def set_notify(self, notify):
if notify:
self.source.set_property("draw-attention", "true")
else:
self.source.set_property("draw-attention", "false")
|