Module groupchat_control :: Class GroupchatControl
[hide private]
[frames] | no frames]

Class GroupchatControl

source code


Instance Methods [hide private]
 
__init__(self, parent_win, contact, acct, is_continued=False)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
tree_compare_iters(self, model, iter1, iter2)
Compare two iters to sort them
source code
 
on_msg_textview_populate_popup(self, textview, menu)
Override the default context menu and we prepend Clear and the ability to insert a nick
source code
 
resize_occupant_treeview(self, position) source code
 
on_treeview_size_allocate(self, widget, allocation)
The MUC treeview has resized.
source code
 
iter_contact_rows(self)
Iterate over all contact rows in the tree model
source code
 
on_list_treeview_style_set(self, treeview, style)
When style (theme) changes, redraw all contacts
source code
 
on_list_treeview_selection_changed(self, selection) source code
 
get_tab_label(self, chatstate)
Markup the label if necessary.
source code
 
get_tab_image(self, count_unread=True) source code
 
update_ui(self)
Derived types SHOULD implement this
source code
 
_change_style(self, model, path, iter_) source code
 
change_roster_style(self) source code
 
repaint_themed_widgets(self)
Derived types MAY implement this
source code
 
_update_banner_state_image(self)
Derived types MAY implement this
source code
 
get_continued_conversation_name(self)
Get the name of a continued conversation.
source code
 
draw_banner_text(self)
Draw the text in the fat line at the top of the window that houses the room jid, subject
source code
 
prepare_context_menu(self, hide_buttonbar_items=False)
Set sensitivity state for configure_room
source code
 
destroy_menu(self, menu, change_nick_menuitem, change_subject_menuitem, bookmark_room_menuitem, history_menuitem) source code
 
on_message(self, nick, msg, tim, has_timestamp=False, xhtml=None, status_code=[], displaymarking=None, captcha=None) source code
 
on_private_message(self, nick, msg, tim, xhtml, session, msg_id=None, encrypted=False, displaymarking=None) source code
 
get_contact_iter(self, nick) source code
 
print_old_conversation(self, text, contact='', tim=None, xhtml=None, displaymarking=None) source code
 
print_conversation(self, text, contact='', tim=None, xhtml=None, graphics=True, displaymarking=None)
Print a line in the conversation
source code
 
get_nb_unread(self) source code
 
get_nb_unread_pm(self) source code
 
highlighting_for_message(self, text, tim)
Returns a 2-Tuple.
source code
 
check_and_possibly_add_focus_out_line(self)
Check and possibly add focus out line for room_jid if it needs it and does not already have it as last event.
source code
 
needs_visual_notification(self, text)
Check text to see whether any of the words in (muc_highlight_words and nick) appear
source code
 
set_subject(self, subject) source code
 
got_connected(self) source code
 
got_disconnected(self) source code
 
rejoin(self) source code
 
draw_roster(self) source code
 
on_send_pm(self, widget=None, model=None, iter_=None, nick=None, msg=None)
Open a chat window and if msg is not None - send private message to a contact in a room
source code
 
on_send_file(self, widget, gc_contact)
Send a file to a contact in the room
source code
 
draw_contact(self, nick, selected=False, focus=False) source code
 
draw_avatar(self, nick) source code
 
draw_role(self, role) source code
 
draw_all_roles(self) source code
 
chg_contact_status(self, nick, show, status, role, affiliation, jid, reason, actor, statusCode, new_nick, avatar_sha, tim=None)
When an occupant changes his or her status
source code
 
add_contact_to_roster(self, nick, show, role, affiliation, status, jid='') source code
 
get_role_iter(self, role) source code
 
remove_contact(self, nick)
Remove a user from the contacts_list
source code
 
send_message(self, message, xhtml=None, process_commands=True)
Call this function to send our message
source code
 
get_role(self, nick) source code
 
minimizable(self)
Called to check if control can be minimized
source code
 
minimize(self, status='offline') source code
 
shutdown(self, status='offline')
Derived classes MUST implement this
source code
 
safe_shutdown(self)
Called to check if control can be closed without loosing data.
source code
 
allow_shutdown(self, method, on_yes, on_no, on_minimize)
Called to check is a control is allowed to shutdown.
source code
 
set_control_active(self, state)
Called when the control becomes active (state is True) or inactive (state is False)
source code
 
get_specific_unread(self) source code
 
_on_change_subject_menuitem_activate(self, widget) source code
 
_on_change_nick_menuitem_activate(self, widget) source code
 
_on_configure_room_menuitem_activate(self, widget) source code
 
_on_destroy_room_menuitem_activate(self, widget) source code
 
_on_bookmark_room_menuitem_activate(self, widget)
Bookmark the room, without autojoin and not minimized
source code
 
_on_drag_data_received(self, widget, context, x, y, selection, target_type, timestamp)
Derived types SHOULD implement this
source code
 
handle_message_textview_mykey_press(self, widget, event_keyval, event_keymod)
Derives types SHOULD implement this, rather than connection to the even itself
source code
 
on_list_treeview_key_press_event(self, widget, event) source code
 
on_list_treeview_row_expanded(self, widget, iter_, path)
When a row is expanded: change the icon of the arrow
source code
 
on_list_treeview_row_collapsed(self, widget, iter_, path)
When a row is collapsed: change the icon of the arrow
source code
 
kick(self, widget, nick)
Kick a user
source code
 
mk_menu(self, event, iter_)
Make contact's popup menu
source code
 
_start_private_message(self, nick) source code
 
on_row_activated(self, widget, path)
When an iter is activated (dubblick or single click if gnome is set this way
source code
 
on_list_treeview_row_activated(self, widget, path, col=0)
When an iter is double clicked: open the chat window
source code
 
on_list_treeview_button_press_event(self, widget, event)
Popup user's group's or agent menu
source code
 
append_nick_in_msg_textview(self, widget, nick) source code
 
on_list_treeview_motion_notify_event(self, widget, event) source code
 
on_list_treeview_leave_notify_event(self, widget, event) source code
 
show_tooltip(self, contact) source code
 
grant_voice(self, widget, nick)
Grant voice privilege to a user
source code
 
revoke_voice(self, widget, nick)
Revoke voice privilege to a user
source code
 
grant_moderator(self, widget, nick)
Grant moderator privilege to a user
source code
 
revoke_moderator(self, widget, nick)
Revoke moderator privilege to a user
source code
 
ban(self, widget, jid)
Ban a user
source code
 
grant_membership(self, widget, jid)
Grant membership privilege to a user
source code
 
revoke_membership(self, widget, jid)
Revoke membership privilege to a user
source code
 
grant_admin(self, widget, jid)
Grant administrative privilege to a user
source code
 
revoke_admin(self, widget, jid)
Revoke administrative privilege to a user
source code
 
grant_owner(self, widget, jid)
Grant owner privilege to a user
source code
 
revoke_owner(self, widget, jid)
Revoke owner privilege to a user
source code
 
on_info(self, widget, nick)
Call vcard_information_window class to display user's information
source code
 
on_history(self, widget, nick) source code
 
on_add_to_roster(self, widget, jid) source code
 
on_block(self, widget, nick) source code
 
on_unblock(self, widget, nick) source code
 
on_voice_checkmenuitem_activate(self, widget, nick) source code
 
on_moderator_checkmenuitem_activate(self, widget, nick) source code
 
on_member_checkmenuitem_activate(self, widget, jid) source code
 
on_admin_checkmenuitem_activate(self, widget, jid) source code
 
on_owner_checkmenuitem_activate(self, widget, jid) source code

Inherited from chat_control.ChatControlBase: append_emoticon, bring_scroll_to_end, chat_buttons_set_visible, clear, connect_style_event, disconnect_style_event, draw_banner, get_font_attrs, get_seclabel, lighten_color, make_href, on_actions_button_clicked, on_banner_label_populate_popup, on_color_menuitem_activale, on_conversation_vadjustment_changed, on_conversation_vadjustment_value_changed, on_emoticons_button_clicked, on_font_menuitem_activale, on_formattings_button_clicked, on_minimize_menuitem_toggled, on_quote, on_seclabels_ready, print_conversation_line, redraw_after_event_removed, save_sent_message, scroll_to_end_iter, sent_messages_scroll, set_speller, setup_seclabel, show_emoticons_menu, size_request, status_url_clicked, toggle_emoticons, update_font, update_tags, widget_set_visible

Inherited from message_control.MessageControl: get_full_jid, set_session

Inherited from command_system.implementation.middleware.ChatCommandProcessor: command_postprocessor, command_preprocessor, execute_command, looks_like_command, process_as_command

Inherited from command_system.framework.CommandProcessor: get_command, list_commands

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from command_system.implementation.middleware.CommandTools: add_history, append_with_tags, clear_input, echo, echo_error, install_tags, send, set_input, shift_line

Class Variables [hide private]
  TYPE_ID = 'gc'
  COMMAND_HOST = GroupChatCommands

Inherited from chat_control.ChatControlBase: keycode_c, keycode_ins, keymap

Inherited from command_system.framework.CommandProcessor: COMMAND_PREFIX

Properties [hide private]

Inherited from object: __class__

Inherited from command_system.implementation.middleware.CommandTools: connection, full_jid

Method Details [hide private]

__init__(self, parent_win, contact, acct, is_continued=False)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: command_system.implementation.middleware.CommandTools.__init__

tree_compare_iters(self, model, iter1, iter2)

source code 
Compare two iters to sort them

on_msg_textview_populate_popup(self, textview, menu)

source code 
Override the default context menu and we prepend Clear and the ability to insert a nick
Overrides: chat_control.ChatControlBase.on_msg_textview_populate_popup

resize_occupant_treeview(self, position)

source code 

on_treeview_size_allocate(self, widget, allocation)

source code 
The MUC treeview has resized. Move the hpaned in all tabs to match

iter_contact_rows(self)

source code 
Iterate over all contact rows in the tree model

on_list_treeview_style_set(self, treeview, style)

source code 
When style (theme) changes, redraw all contacts

on_list_treeview_selection_changed(self, selection)

source code 

get_tab_label(self, chatstate)

source code 
Markup the label if necessary. Returns a tuple such as: (new_label_str, color) either of which can be None if chatstate is given that means we have HE SENT US a chatstate
Overrides: message_control.MessageControl.get_tab_label

get_tab_image(self, count_unread=True)

source code 
Overrides: message_control.MessageControl.get_tab_image

update_ui(self)

source code 
Derived types SHOULD implement this
Overrides: message_control.MessageControl.update_ui
(inherited documentation)

_change_style(self, model, path, iter_)

source code 

change_roster_style(self)

source code 

repaint_themed_widgets(self)

source code 
Derived types MAY implement this
Overrides: message_control.MessageControl.repaint_themed_widgets
(inherited documentation)

_update_banner_state_image(self)

source code 
Derived types MAY implement this
Overrides: chat_control.ChatControlBase._update_banner_state_image
(inherited documentation)

get_continued_conversation_name(self)

source code 
Get the name of a continued conversation. Will return Continued Conversation if there isn't any other contact in the room

draw_banner_text(self)

source code 
Draw the text in the fat line at the top of the window that houses the room jid, subject
Overrides: chat_control.ChatControlBase.draw_banner_text

prepare_context_menu(self, hide_buttonbar_items=False)

source code 
Set sensitivity state for configure_room
Overrides: message_control.MessageControl.prepare_context_menu

destroy_menu(self, menu, change_nick_menuitem, change_subject_menuitem, bookmark_room_menuitem, history_menuitem)

source code 

on_message(self, nick, msg, tim, has_timestamp=False, xhtml=None, status_code=[], displaymarking=None, captcha=None)

source code 

on_private_message(self, nick, msg, tim, xhtml, session, msg_id=None, encrypted=False, displaymarking=None)

source code 

get_contact_iter(self, nick)

source code 

print_old_conversation(self, text, contact='', tim=None, xhtml=None, displaymarking=None)

source code 

print_conversation(self, text, contact='', tim=None, xhtml=None, graphics=True, displaymarking=None)

source code 

Print a line in the conversation

If contact is set: it's a message from someone or an info message (contact = 'info' in such a case). If contact is not set: it's a message from the server or help.

get_nb_unread(self)

source code 
Overrides: chat_control.ChatControlBase.get_nb_unread

get_nb_unread_pm(self)

source code 

highlighting_for_message(self, text, tim)

source code 
Returns a 2-Tuple. The first says whether or not to highlight the text, the second, what sound to play

check_and_possibly_add_focus_out_line(self)

source code 
Check and possibly add focus out line for room_jid if it needs it and does not already have it as last event. If it goes to add this line - remove previous line first

needs_visual_notification(self, text)

source code 
Check text to see whether any of the words in (muc_highlight_words and nick) appear

set_subject(self, subject)

source code 

got_connected(self)

source code 
Overrides: message_control.MessageControl.got_connected

got_disconnected(self)

source code 
Overrides: message_control.MessageControl.got_disconnected

rejoin(self)

source code 

draw_roster(self)

source code 

on_send_pm(self, widget=None, model=None, iter_=None, nick=None, msg=None)

source code 
Open a chat window and if msg is not None - send private message to a contact in a room

on_send_file(self, widget, gc_contact)

source code 
Send a file to a contact in the room

draw_contact(self, nick, selected=False, focus=False)

source code 

draw_avatar(self, nick)

source code 

draw_role(self, role)

source code 

draw_all_roles(self)

source code 

chg_contact_status(self, nick, show, status, role, affiliation, jid, reason, actor, statusCode, new_nick, avatar_sha, tim=None)

source code 
When an occupant changes his or her status

add_contact_to_roster(self, nick, show, role, affiliation, status, jid='')

source code 

get_role_iter(self, role)

source code 

remove_contact(self, nick)

source code 
Remove a user from the contacts_list

send_message(self, message, xhtml=None, process_commands=True)

source code 
Call this function to send our message
Overrides: message_control.MessageControl.send_message

get_role(self, nick)

source code 

minimizable(self)

source code 

Called to check if control can be minimized

Derived classes MAY implement this.

Overrides: message_control.MessageControl.minimizable
(inherited documentation)

minimize(self, status='offline')

source code 

shutdown(self, status='offline')

source code 
Derived classes MUST implement this
Overrides: message_control.MessageControl.shutdown
(inherited documentation)

safe_shutdown(self)

source code 

Called to check if control can be closed without loosing data. returns True if control can be closed safely else False

Derived classes MAY implement this.

Overrides: message_control.MessageControl.safe_shutdown
(inherited documentation)

allow_shutdown(self, method, on_yes, on_no, on_minimize)

source code 

Called to check is a control is allowed to shutdown. If a control is not in a suitable shutdown state this method should call on_response_no, else on_response_yes or on_response_minimize

Derived classes MAY implement this.

Overrides: message_control.MessageControl.allow_shutdown
(inherited documentation)

set_control_active(self, state)

source code 
Called when the control becomes active (state is True) or inactive (state is False)
Overrides: message_control.MessageControl.set_control_active
(inherited documentation)

get_specific_unread(self)

source code 
Overrides: message_control.MessageControl.get_specific_unread

_on_change_subject_menuitem_activate(self, widget)

source code 

_on_change_nick_menuitem_activate(self, widget)

source code 

_on_configure_room_menuitem_activate(self, widget)

source code 

_on_destroy_room_menuitem_activate(self, widget)

source code 

_on_bookmark_room_menuitem_activate(self, widget)

source code 
Bookmark the room, without autojoin and not minimized

_on_drag_data_received(self, widget, context, x, y, selection, target_type, timestamp)

source code 
Derived types SHOULD implement this
Overrides: chat_control.ChatControlBase._on_drag_data_received
(inherited documentation)

handle_message_textview_mykey_press(self, widget, event_keyval, event_keymod)

source code 
Derives types SHOULD implement this, rather than connection to the even itself
Overrides: chat_control.ChatControlBase.handle_message_textview_mykey_press
(inherited documentation)

on_list_treeview_key_press_event(self, widget, event)

source code 

on_list_treeview_row_expanded(self, widget, iter_, path)

source code 
When a row is expanded: change the icon of the arrow

on_list_treeview_row_collapsed(self, widget, iter_, path)

source code 
When a row is collapsed: change the icon of the arrow

kick(self, widget, nick)

source code 
Kick a user

mk_menu(self, event, iter_)

source code 
Make contact's popup menu

_start_private_message(self, nick)

source code 

on_row_activated(self, widget, path)

source code 
When an iter is activated (dubblick or single click if gnome is set this way

on_list_treeview_row_activated(self, widget, path, col=0)

source code 
When an iter is double clicked: open the chat window

on_list_treeview_button_press_event(self, widget, event)

source code 
Popup user's group's or agent menu

append_nick_in_msg_textview(self, widget, nick)

source code 

on_list_treeview_motion_notify_event(self, widget, event)

source code 

on_list_treeview_leave_notify_event(self, widget, event)

source code 

show_tooltip(self, contact)

source code 

grant_voice(self, widget, nick)

source code 
Grant voice privilege to a user

revoke_voice(self, widget, nick)

source code 
Revoke voice privilege to a user

grant_moderator(self, widget, nick)

source code 
Grant moderator privilege to a user

revoke_moderator(self, widget, nick)

source code 
Revoke moderator privilege to a user

ban(self, widget, jid)

source code 
Ban a user

grant_membership(self, widget, jid)

source code 
Grant membership privilege to a user

revoke_membership(self, widget, jid)

source code 
Revoke membership privilege to a user

grant_admin(self, widget, jid)

source code 
Grant administrative privilege to a user

revoke_admin(self, widget, jid)

source code 
Revoke administrative privilege to a user

grant_owner(self, widget, jid)

source code 
Grant owner privilege to a user

revoke_owner(self, widget, jid)

source code 
Revoke owner privilege to a user

on_info(self, widget, nick)

source code 
Call vcard_information_window class to display user's information

on_history(self, widget, nick)

source code 

on_add_to_roster(self, widget, jid)

source code 

on_block(self, widget, nick)

source code 

on_unblock(self, widget, nick)

source code 

on_voice_checkmenuitem_activate(self, widget, nick)

source code 

on_moderator_checkmenuitem_activate(self, widget, nick)

source code 

on_member_checkmenuitem_activate(self, widget, jid)

source code 

on_admin_checkmenuitem_activate(self, widget, jid)

source code 

on_owner_checkmenuitem_activate(self, widget, jid)

source code 

Class Variable Details [hide private]

TYPE_ID

Value:
'gc'

COMMAND_HOST

Value:
GroupChatCommands