How do I know which of the menu items I have clicked in appindicator?
<p>I have created a program in which I created several menu items and stored them in 'ci' last. Whenever I click one of the menu items it executes the 'checkStatus' function .I want to know which of the menu items I have clicked( ci[0] or ci[1] or something else) because my function will work as per the item I clicked.</p>

<pre><code>#!/usr/bin/python

import requests
from bs4 import BeautifulSoup
import appindicator
import pynotify
import gtk

appindicator.CATEGORY_APPLICATION_STATUS)
a = appindicator.Indicator('tubecheck', 'indicator-messages', appindicator.CATEGORY_APPLICATION_STATUS)
a.set_label('Live cricket score')
a.set_status( appindicator.STATUS_ACTIVE )
m = gtk.Menu()
ci = []
url = 'http://static.cricinfo.com/rss/livescores.xml'
sc = requests.get(url)
soup = BeautifulSoup(sc.text,'lxml')
data = soup.select('item')
for i in range(len(data)):
    ci.append(gtk.MenuItem(str(i+1)+'. '+data[i].find('title').text))
    m.append(ci[i])
qi = gtk.MenuItem( str(i+2)+'. '+'Quit' )
m.append(qi)

a.set_menu(m)
for i in range(len(ci)):
    ci[i].show()
qi.show()

def checkStatus(item):
    pynotify.init('test')
    n = pynotify.Notification('Live Cricket score',data[i].text)
    n.show()


ci[i].connect('activate', checkStatus)

def quit(item):
    gtk.main_quit()

qi.connect('activate', quit)

gtk.main()
</code></pre>