Comments here and there

This commit is contained in:
Tomasz Melcer 2007-06-27 00:51:38 +00:00
parent 86798a56f0
commit 7a399e980b
3 changed files with 13 additions and 1 deletions

View File

@ -76,7 +76,9 @@ def ExtendForm(node):
return SimpleDataForm(extend=node)
class DataField(ExtendedNode):
""" Keeps data about one field - var, field type, labels, instructions... """
""" Keeps data about one field - var, field type, labels, instructions...
Base class for different kinds of fields. Use Field() function to
construct one of these. """
def __init__(self, typ=None, var=None, value=None, label=None, desc=None, required=False,
options=None, extend=None):

View File

@ -13,6 +13,8 @@
## GNU General Public License for more details.
##
''' This module allows to access the on-disk database of logs. '''
import os
import sys
import time
@ -627,3 +629,7 @@ class Logger:
for result in results:
answer[result[0]] = self.convert_api_values_to_human_transport_type(result[1])
return answer
# initial interface for accessing logs of stored caps
def get_stored_caps(self): pass
def add_caps_entry(self): pass

View File

@ -65,6 +65,7 @@ class RosterWindow:
'''Class for main window of the GTK+ interface'''
def get_account_iter(self, name):
''' Returns a gtk.TreeIter of accounts in roster data model or None '''
model = self.tree.get_model()
if model is None:
return
@ -79,6 +80,7 @@ class RosterWindow:
return account_iter
def get_group_iter(self, name, account):
''' Returns a gtk.TreeIter of groups in roster data model or None '''
model = self.tree.get_model()
root = self.get_account_iter(account)
group_iter = model.iter_children(root)
@ -164,10 +166,12 @@ class RosterWindow:
self.tree.set_cursor(path)
def add_account_to_roster(self, account):
''' Add an account to roster data model. '''
model = self.tree.get_model()
if self.get_account_iter(account):
return
# if we merge accounts...
if self.regroup:
show = helpers.get_global_show()
model.append(None, [self.jabber_state_images['16'][show],