diff --git a/src/dialogs.py b/src/dialogs.py index 225167411..b1377afb3 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -2238,3 +2238,27 @@ _('Connection with peer cannot be established.')) def on_remove_menuitem_activate(self, widget): self.on_remove_button_clicked(widget) + + +class InvitationDialog: + def __init__(self, plugin, account, room_jid, contact_jid, password = None, comment = None): + self.plugin = plugin + self.account = account + self.xml = gtk.glade.XML(GTKGUI_GLADE, 'invitation_dialog', APP) + self.window = self.xml.get_widget('invitation_dialog') + self.invitation_label = self.xml.get_widget('invitation_label') + + #FIXME: add pango markup + #DO_NOT_TRANSLATE_4_08 + string = _('You have been invited to the %s room by %s') % (room_jid, contact_jid) + if comment is not None: + #DO_NOT_TRANSLATE_4_08 + string += '\n' + _('Comment: %s') % comment + + self.invitation_label.set_text(string) + + def on_accept_button_clicked(self, widget): + pass # join room + + def on_decline_button_clicked(self, widget): + self.window.destroy() diff --git a/src/gtkgui.glade b/src/gtkgui.glade index db423643d..004b9fdad 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -17769,4 +17769,206 @@ Maybe I'll refactor later + + True + Invitation Received + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + + + + True + False + 0 + + + + True + GTK_BUTTONBOX_END + + + + True + True + True + GTK_RELIEF_NORMAL + True + 0 + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-cancel + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Decline + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + + + + True + True + True + GTK_RELIEF_NORMAL + True + -10 + + + + + True + 0.5 + 0.5 + 0 + 0 + 0 + 0 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-apply + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Accept + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + + + 0 + False + True + GTK_PACK_END + + + + + + True + + False + True + GTK_JUSTIFY_LEFT + True + False + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + +