diff --git a/plugins/gtkgui/dialogs.py b/plugins/gtkgui/dialogs.py index bbd1134ac..7e970b6d4 100644 --- a/plugins/gtkgui/dialogs.py +++ b/plugins/gtkgui/dialogs.py @@ -490,12 +490,32 @@ class confirm_dialog: class warning_dialog: """Class for warning dialog""" def __init__(self, label): - self.dialog = gtk.MessageDialog(None,\ + dialog = gtk.MessageDialog(None,\ gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\ gtk.MESSAGE_WARNING, gtk.BUTTONS_CLOSE, label) - response = self.dialog.run() - self.dialog.destroy() + dialog.run() + dialog.destroy() + +class information_dialog: + """Class for information dialog""" + def __init__(self, label): + dialog = gtk.MessageDialog(None,\ + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\ + gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, label) + + dialog.run() + dialog.destroy() + +class error_dialog: + """Class for error dialog""" + def __init__(self, label): + dialog = gtk.MessageDialog(None,\ + gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,\ + gtk.MESSAGE_ERROR, gtk.BUTTONS_CLOSE, label) + + dialog.run() + dialog.destroy() class subscription_request_window: """Class for authorization window : diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index 72a92dc4e..3a56eef86 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -8403,4 +8403,23 @@ send a chat message to + + True + Edit Groups + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 4f3e7e2cc..5c55a43dc 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1656,7 +1656,7 @@ class roster_window: return accounts = self.plugin.accounts.keys() if len(accounts) == 0: - warning_dialog(_("You must setup an account before connecting to jabber network.")) + error_dialog(_("You must setup an account before connecting to jabber network.")) self.set_cb() return status = model[active][0] @@ -2590,10 +2590,10 @@ class plugin: 'online', 'to', '', array[1], 0, '') self.roster.contacts[account][jid] = [user1] self.roster.add_user_to_roster(jid, account) - warning_dialog(_("You are now authorized by %s") % jid) + information_dialog(_("You are now authorized by %s") % jid) def handle_event_unsubscribed(self, account, jid): - warning_dialog(_("You are now unsubscribed by %s") % jid) + information_dialog(_("You are now unsubscribed by %s") % jid) def handle_event_agents(self, account, agents): #('AGENTS', account, agents) @@ -2609,7 +2609,7 @@ class plugin: def handle_event_reg_agent_info(self, account, array): #('REG_AGENTS_INFO', account, (agent, infos)) if not array[1].has_key('instructions'): - warning_dialog(_("error contacting %s") % array[0]) + error_dialog(_("error contacting %s") % array[0]) else: agent_registration_window(array[0], array[1], self, account)