commiting, yann take a look at the FIXME: bla bla Yann (in new_message_window class)

This commit is contained in:
Nikos Kouremenos 2005-03-03 17:14:37 +00:00
parent a00c53e96d
commit ccfafcd432
2 changed files with 217 additions and 11 deletions

View File

@ -596,18 +596,21 @@ class new_message_window: #FIXME: NOT READY
def on_chat_button_clicked(self, widget):
"""When Chat button is clicked"""
#FIXME: either make it simple entry, or find a way to handle windows the easy way
userid_comboboxentry = self.xml.get_widget('userid_comboboxentry')
userid_comboboxentry.child.set_activates_default(True)
userid = self.xml.get_widget('userid_comboboxentry').child.get_text()
#FIXME: if the user doesn't give jid, but name look in the roster
#DO IT WITH AUTOCOMPLETE
#SO USER ID SHOULD BECOME JID and sent to new_chat()
jid = userid
if not self.contacts[account].has_key(jid):
# use User class, new_chat expects it that way
user = gtkgui.User(jid, jid, ['not in the roster'], \
'not in the roster', 'not in the roster', 'none', None, '', 0, '')
self.plugin.roster.contacts[self.account][jid] = [user]
self.plugin.roster.add_user_to_roster(user.jid, self.account)
#FIXME: if user is there, use that instance IF POSSIBLE [is it Yann?]
#if not self.plugin.roster.contacts[self.account].has_key(jid):
# use User class, new_chat expects it that way
user = gtkgui.User(jid, jid, ['not in the roster'], \
'not in the roster', 'not in the roster', 'none', None, '', 0, '')
self.plugin.roster.contacts[self.account][jid] = [user]
self.plugin.roster.add_user_to_roster(user.jid, self.account)
self.plugin.roster.new_chat(user, self.account)
widget.get_toplevel().destroy()

View File

@ -8319,7 +8319,7 @@ send a chat message to</property>
<widget class="GtkHButtonBox" id="hbuttonbox16">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">5</property>
<property name="spacing">10</property>
<child>
<widget class="GtkButton" id="cancel_button">
@ -8416,22 +8416,225 @@ send a chat message to</property>
</child>
</widget>
<widget class="GtkWindow" id="edit_groups_window">
<widget class="GtkDialog" id="edit_groups_dialog">
<property name="border_width">4</property>
<property name="visible">True</property>
<property name="title" translatable="yes">Edit Groups</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="resizable">False</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="has_separator">False</property>
<child>
<placeholder/>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox6">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area5">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="applybutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-apply</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-10</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="cancelbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-cancel</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-6</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="okbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="response_id">-5</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox51">
<property name="border_width">6</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
<child>
<widget class="GtkVBox" id="vbox52">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="nickname_label">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Edit groups for Nickname&lt;/b&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="jid_label">
<property name="visible">True</property>
<property name="label" translatable="yes">jid_label</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2926">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">5</property>
<child>
<widget class="GtkEntry" id="entry2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">True</property>
<property name="visibility">True</property>
<property name="max_length">0</property>
<property name="text" translatable="yes"></property>
<property name="has_frame">True</property>
<property name="invisible_char">*</property>
<property name="activates_default">False</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="button32">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-add</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow32">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="groups_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">False</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>