fix for Join_gc action see http://nkour.blogspot.com/2005/05/pythons-init-return-none-doesnt-return.html for more.
Also adding a FIXME: in case yann has not reply from Alexey and wants to hack sth in Gajim :)
This commit is contained in:
parent
69b279d240
commit
bc4cc346b1
|
@ -386,7 +386,7 @@ class About_dialog:
|
|||
dlg.set_logo(gtk.gdk.pixbuf_new_from_file('../data/pixmaps/logo.png'))
|
||||
dlg.set_translator_credits(_('translator_credits'))
|
||||
|
||||
rep = dlg.run() # this run doesn't crash threads.. interesting..
|
||||
rep = dlg.run()
|
||||
dlg.destroy()
|
||||
|
||||
class Confirmation_dialog:
|
||||
|
@ -474,7 +474,8 @@ class Join_groupchat_window:
|
|||
self.account = account
|
||||
if gajim.connections[account].connected < 2:
|
||||
Error_dialog(_('You must be connected to join a groupchat'))
|
||||
return
|
||||
raise RuntimeError, 'You must be connected to join a groupchat'
|
||||
|
||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'join_groupchat_window', APP)
|
||||
self.window = self.xml.get_widget('join_groupchat_window')
|
||||
self.xml.get_widget('server_entry').set_text(server)
|
||||
|
@ -506,6 +507,7 @@ class Join_groupchat_window:
|
|||
def on_join_groupchat_window_destroy(self, widget):
|
||||
'''close window'''
|
||||
del self.plugin.windows[self.account]['join_gc'] # remove us from open windows
|
||||
print 'destory'
|
||||
|
||||
def on_join_groupchat_window_key_press_event(self, widget, event):
|
||||
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
||||
|
@ -564,10 +566,6 @@ class New_message_dialog:
|
|||
self.xml.signal_autoconnect(self)
|
||||
self.window.show_all()
|
||||
|
||||
def on_delete_event(self, widget, event):
|
||||
'''close window'''
|
||||
del self.plugin.windows['new_message']
|
||||
|
||||
def on_cancel_button_clicked(self, widget):
|
||||
'''When Cancel button is clicked'''
|
||||
self.window.destroy()
|
||||
|
|
|
@ -266,6 +266,19 @@ class Groupchat_window(chat.Chat):
|
|||
room_jid = self.get_active_jid()
|
||||
gajim.connections[self.account].request_gc_config(room_jid)
|
||||
|
||||
def on_subject_entry_focus_out_event(self, widget):
|
||||
print 'FIXME: focus out'
|
||||
return
|
||||
new_child = notebook.get_nth_page(page_num)
|
||||
new_jid = ''
|
||||
for jid in self.xmls:
|
||||
if self.childs[jid] == new_child:
|
||||
new_jid = jid
|
||||
break
|
||||
subject = self.subjects[new_jid]
|
||||
self.subject_entry.set_text(subject)
|
||||
self.subject_entry_tooltip.set_tip(self.subject_entry, subject)
|
||||
|
||||
def on_message_textview_key_press_event(self, widget, event):
|
||||
"""When a key is pressed:
|
||||
if enter is pressed without the shit key, message (if not empty) is sent
|
||||
|
|
|
@ -7687,6 +7687,7 @@ Custom</property>
|
|||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
<signal name="focus_out_event" handler="on_subject_entry_focus_out_event" last_modification_time="Wed, 11 May 2005 22:06:14 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
@ -9548,7 +9549,6 @@ Custom</property>
|
|||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="has_separator">False</property>
|
||||
<signal name="delete_event" handler="on_delete_event" last_modification_time="Sat, 05 Mar 2005 18:18:47 GMT"/>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox8">
|
||||
|
|
|
@ -963,7 +963,10 @@ class Roster_window:
|
|||
if self.plugin.windows[account].has_key('join_gc'):
|
||||
self.plugin.windows[account]['join_gc'].window.present()
|
||||
else:
|
||||
self.plugin.windows[account]['join_gc'] = dialogs.Join_groupchat_window(self.plugin, account)
|
||||
try:
|
||||
self.plugin.windows[account]['join_gc'] = dialogs.Join_groupchat_window(self.plugin, account)
|
||||
except RuntimeError:
|
||||
pass
|
||||
|
||||
|
||||
def on_new_message_menuitem_activate(self, widget, account):
|
||||
|
|
Loading…
Reference in New Issue