Changeset 7984 for branches/gajim_0.11/src/disco.py
- Timestamp:
- 02/15/07 19:05:38 (22 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11/src/disco.py (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11/src/disco.py
r7888 r7984 1725 1725 ''' Create treemodel for the window. ''' 1726 1726 # JID, node, name (with description) - pango markup, dont have info?, subscribed? 1727 model = gtk.ListStore(str, str, str, bool, bool)1728 model.set_sort_column_id(3, gtk.SORT_ASCENDING)1729 self.window.services_treeview.set_model( model)1727 self.model = gtk.ListStore(str, str, str, bool, bool) 1728 self.model.set_sort_column_id(3, gtk.SORT_ASCENDING) 1729 self.window.services_treeview.set_model(self.model) 1730 1730 1731 1731 # Name column … … 1749 1749 self.window.services_treeview.set_headers_visible(True) 1750 1750 1751 def _add_item(self, model,jid, node, item, force):1751 def _add_item(self, jid, node, item, force): 1752 1752 ''' Called when we got basic information about new node from query. 1753 1753 Show the item. ''' … … 1756 1756 if self.subscriptions is not None: 1757 1757 dunno = False 1758 subscribed = n ame in self.subscriptions1758 subscribed = node in self.subscriptions 1759 1759 else: 1760 1760 dunno = True … … 1764 1764 name = '<b>%s</b>' % name 1765 1765 1766 model.append((jid, node, name, dunno, subscribed))1766 self.model.append((jid, node, name, dunno, subscribed)) 1767 1767 1768 1768 def _add_actions(self): … … 1846 1846 ''' We got the subscribed groups list stanza. Now, if we already 1847 1847 have items on the list, we should actualize them. ''' 1848 print 01849 1848 try: 1850 1849 subscriptions = request.getTag('pubsub').getTag('subscriptions') … … 1852 1851 return 1853 1852 1854 print 11855 1853 groups = set() 1856 1854 for child in subscriptions.getTags('subscription'): 1857 print 2, repr(child), str(child)1858 1855 groups.add(child['node']) 1859 print 3, groups1860 1856 1861 1857 self.subscriptions = groups … … 1863 1859 # try to setup existing items in model 1864 1860 model = self.window.services_treeview.get_model() 1865 print 41866 1861 for row in model: 1867 print 51868 1862 # 1 = group node 1869 1863 # 3 = insensitive checkbox for subscribed … … 1872 1866 row[3]=False 1873 1867 row[4]=groupnode in groups 1874 print 61875 1868 1876 1869 # we now know subscriptions, update button states
