Spellcheck some comments and docstrings
This commit is contained in:
parent
3c1490a306
commit
1870f560a4
5 changed files with 18 additions and 18 deletions
|
@ -550,7 +550,7 @@ class CommandWindow:
|
||||||
progressbar.pulse()
|
progressbar.pulse()
|
||||||
return True # important to keep callback be called back!
|
return True # important to keep callback be called back!
|
||||||
|
|
||||||
# 12 times per second (80 miliseconds)
|
# 12 times per second (80 milliseconds)
|
||||||
self.pulse_id = GLib.timeout_add(80, callback)
|
self.pulse_id = GLib.timeout_add(80, callback)
|
||||||
|
|
||||||
def remove_pulsing(self):
|
def remove_pulsing(self):
|
||||||
|
|
|
@ -1893,7 +1893,7 @@ class ManageBookmarksWindow:
|
||||||
|
|
||||||
self.ignore_events = False
|
self.ignore_events = False
|
||||||
|
|
||||||
# Account-JID, RoomName, Room-JID, Autojoin, Minimize, Passowrd, Nick,
|
# Account-JID, RoomName, Room-JID, Autojoin, Minimize, Password, Nick,
|
||||||
# Show_Status
|
# Show_Status
|
||||||
self.treestore = Gtk.TreeStore(str, str, str, bool, bool, str, str, str)
|
self.treestore = Gtk.TreeStore(str, str, str, bool, bool, str, str, str)
|
||||||
self.treestore.set_sort_column_id(1, Gtk.SortType.ASCENDING)
|
self.treestore.set_sort_column_id(1, Gtk.SortType.ASCENDING)
|
||||||
|
|
|
@ -211,7 +211,7 @@ class Closure(object):
|
||||||
"""
|
"""
|
||||||
A weak reference to a callback with arguments as an object
|
A weak reference to a callback with arguments as an object
|
||||||
|
|
||||||
Weak references to methods immediatly die, even if the object is still
|
Weak references to methods immediately die, even if the object is still
|
||||||
alive. Besides a handy way to store a callback, this provides a workaround
|
alive. Besides a handy way to store a callback, this provides a workaround
|
||||||
that keeps a reference to the object instead.
|
that keeps a reference to the object instead.
|
||||||
|
|
||||||
|
@ -1248,7 +1248,7 @@ class ToplevelAgentBrowser(AgentBrowser):
|
||||||
|
|
||||||
def _create_treemodel(self):
|
def _create_treemodel(self):
|
||||||
# JID, node, icon, description, state
|
# JID, node, icon, description, state
|
||||||
# state is None on sucess or has a string
|
# state is None on success or has a string
|
||||||
# from LABELS on error or while fetching
|
# from LABELS on error or while fetching
|
||||||
view = self.window.services_treeview
|
view = self.window.services_treeview
|
||||||
self.model = Gtk.TreeStore(str, str, GdkPixbuf.Pixbuf, str, str)
|
self.model = Gtk.TreeStore(str, str, GdkPixbuf.Pixbuf, str, str)
|
||||||
|
@ -1441,7 +1441,7 @@ class ToplevelAgentBrowser(AgentBrowser):
|
||||||
self.execute_button.set_sensitive(True)
|
self.execute_button.set_sensitive(True)
|
||||||
if self.search_button and nbxmpp.NS_SEARCH in features:
|
if self.search_button and nbxmpp.NS_SEARCH in features:
|
||||||
self.search_button.set_sensitive(True)
|
self.search_button.set_sensitive(True)
|
||||||
# Don't autorize to register with a server via disco
|
# Don't authorize to register with a server via disco
|
||||||
if self.register_button and nbxmpp.NS_REGISTER in features and \
|
if self.register_button and nbxmpp.NS_REGISTER in features and \
|
||||||
jid != self.jid:
|
jid != self.jid:
|
||||||
# We can register this agent
|
# We can register this agent
|
||||||
|
@ -1824,7 +1824,7 @@ class MucBrowser(AgentBrowser):
|
||||||
|
|
||||||
def on_scroll(self, *args):
|
def on_scroll(self, *args):
|
||||||
"""
|
"""
|
||||||
Scrollwindow callback to trigger new queries on scolling
|
Scrollwindow callback to trigger new queries on scrolling
|
||||||
"""
|
"""
|
||||||
# This apparently happens when inactive sometimes
|
# This apparently happens when inactive sometimes
|
||||||
self._query_visible()
|
self._query_visible()
|
||||||
|
@ -1958,7 +1958,7 @@ class DiscussionGroupsBrowser(AgentBrowser):
|
||||||
"""
|
"""
|
||||||
Create treemodel for the window
|
Create treemodel for the window
|
||||||
"""
|
"""
|
||||||
# JID, node, name (with description) - pango markup, dont have info?, subscribed?
|
# JID, node, name (with description) - pango markup, don't have info?, subscribed?
|
||||||
self.model = Gtk.TreeStore(str, str, str, bool, bool)
|
self.model = Gtk.TreeStore(str, str, str, bool, bool)
|
||||||
# sort by name
|
# sort by name
|
||||||
self.model.set_sort_column_id(2, Gtk.SortType.ASCENDING)
|
self.model.set_sort_column_id(2, Gtk.SortType.ASCENDING)
|
||||||
|
|
|
@ -311,7 +311,7 @@ class EmoticonPopover(Gtk.Popover):
|
||||||
def do_destroy(self):
|
def do_destroy(self):
|
||||||
# Remove the references we hold to other objects
|
# Remove the references we hold to other objects
|
||||||
self.text_widget = None
|
self.text_widget = None
|
||||||
# Even though we dont destroy the Popover, handlers are getting
|
# Even though we don't destroy the Popover, handlers are getting
|
||||||
# still disconnected, which makes the handler_id invalid
|
# still disconnected, which makes the handler_id invalid
|
||||||
# FIXME: find out how we can prevent handlers getting disconnected
|
# FIXME: find out how we can prevent handlers getting disconnected
|
||||||
self.handler_id = None
|
self.handler_id = None
|
||||||
|
|
|
@ -75,7 +75,7 @@ log = logging.getLogger('gajim.groupchat_control')
|
||||||
@unique
|
@unique
|
||||||
class Column(IntEnum):
|
class Column(IntEnum):
|
||||||
IMG = 0 # image to show state (online, new message etc)
|
IMG = 0 # image to show state (online, new message etc)
|
||||||
NICK = 1 # contact nickame or ROLE name
|
NICK = 1 # contact nickname or ROLE name
|
||||||
TYPE = 2 # type of the row ('contact' or 'role')
|
TYPE = 2 # type of the row ('contact' or 'role')
|
||||||
TEXT = 3 # text shown in the cellrenderer
|
TEXT = 3 # text shown in the cellrenderer
|
||||||
AVATAR_IMG = 4 # avatar of the contact
|
AVATAR_IMG = 4 # avatar of the contact
|
||||||
|
@ -725,7 +725,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
def _on_minimize(self, action, param):
|
def _on_minimize(self, action, param):
|
||||||
"""
|
"""
|
||||||
When a grouchat is minimized, unparent the tab, put it in roster etc
|
When a groupchat is minimized, unparent the tab, put it in roster etc
|
||||||
"""
|
"""
|
||||||
action.set_state(param)
|
action.set_state(param)
|
||||||
non_minimized_gc = app.config.get_per(
|
non_minimized_gc = app.config.get_per(
|
||||||
|
@ -843,7 +843,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
def tree_compare_iters(self, model, iter1, iter2, data=None):
|
def tree_compare_iters(self, model, iter1, iter2, data=None):
|
||||||
"""
|
"""
|
||||||
Compare two iters to sort them
|
Compare two iterators to sort them
|
||||||
"""
|
"""
|
||||||
type1 = model[iter1][Column.TYPE]
|
type1 = model[iter1][Column.TYPE]
|
||||||
type2 = model[iter2][Column.TYPE]
|
type2 = model[iter2][Column.TYPE]
|
||||||
|
@ -2315,7 +2315,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
return
|
return
|
||||||
includes = app.config.get('confirm_close_muc_rooms').split(' ')
|
includes = app.config.get('confirm_close_muc_rooms').split(' ')
|
||||||
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
|
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
|
||||||
# whether to ask for comfirmation before closing muc
|
# whether to ask for confirmation before closing muc
|
||||||
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
|
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
|
||||||
and app.gc_connected[self.account][self.room_jid] and self.room_jid \
|
and app.gc_connected[self.account][self.room_jid] and self.room_jid \
|
||||||
not in excludes:
|
not in excludes:
|
||||||
|
@ -2460,7 +2460,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
fjid = self.room_jid + '/' + nick
|
fjid = self.room_jid + '/' + nick
|
||||||
if nick.lower().startswith(begin.lower()) and not \
|
if nick.lower().startswith(begin.lower()) and not \
|
||||||
helpers.jid_is_blocked(self.account, fjid):
|
helpers.jid_is_blocked(self.account, fjid):
|
||||||
# the word is the begining of a nick
|
# the word is the beginning of a nick
|
||||||
self.nick_hits.append(nick)
|
self.nick_hits.append(nick)
|
||||||
if len(self.nick_hits):
|
if len(self.nick_hits):
|
||||||
if len(splitted_text) < 2 or with_refer_to_nick_char:
|
if len(splitted_text) < 2 or with_refer_to_nick_char:
|
||||||
|
@ -2472,13 +2472,13 @@ class GroupchatControl(ChatControlBase):
|
||||||
start_iter = end_iter.copy()
|
start_iter = end_iter.copy()
|
||||||
if self.last_key_tabs and with_refer_to_nick_char or (text and \
|
if self.last_key_tabs and with_refer_to_nick_char or (text and \
|
||||||
text[-1] == ' '):
|
text[-1] == ' '):
|
||||||
# have to accomodate for the added space from last
|
# have to accommodate for the added space from last
|
||||||
# completion
|
# completion
|
||||||
# gc_refer_to_nick_char may be more than one char!
|
# gc_refer_to_nick_char may be more than one char!
|
||||||
start_iter.backward_chars(len(begin) + len(add))
|
start_iter.backward_chars(len(begin) + len(add))
|
||||||
elif self.last_key_tabs and not app.config.get(
|
elif self.last_key_tabs and not app.config.get(
|
||||||
'shell_like_completion'):
|
'shell_like_completion'):
|
||||||
# have to accomodate for the added space from last
|
# have to accommodate for the added space from last
|
||||||
# completion
|
# completion
|
||||||
start_iter.backward_chars(len(begin) + \
|
start_iter.backward_chars(len(begin) + \
|
||||||
len(gc_refer_to_nick_char))
|
len(gc_refer_to_nick_char))
|
||||||
|
@ -2730,8 +2730,8 @@ class GroupchatControl(ChatControlBase):
|
||||||
|
|
||||||
def on_row_activated(self, widget, path):
|
def on_row_activated(self, widget, path):
|
||||||
"""
|
"""
|
||||||
When an iter is activated (dubblick or single click if gnome is set this
|
When an iter is activated (double click or single click if gnome
|
||||||
way
|
is set this way)
|
||||||
"""
|
"""
|
||||||
if path.get_depth() == 1: # It's a group
|
if path.get_depth() == 1: # It's a group
|
||||||
if (widget.row_expanded(path)):
|
if (widget.row_expanded(path)):
|
||||||
|
|
Loading…
Add table
Reference in a new issue