From ef7952e3969a8297330be4f8440c3d4821d58baf Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 22 Oct 2003 21:23:59 +0000 Subject: [PATCH] update gtkgui with accounts creation and about --- plugins/gtkgui.glade | 816 ++++++++++++++++++++++++++++++++++++++++--- plugins/gtkgui.py | 30 +- 2 files changed, 787 insertions(+), 59 deletions(-) diff --git a/plugins/gtkgui.glade b/plugins/gtkgui.glade index 153c4d00b..58fa5f74e 100644 --- a/plugins/gtkgui.glade +++ b/plugins/gtkgui.glade @@ -41,12 +41,63 @@ + + + True + gtk-preferences + True + + + + + + + True + Accounts + True + + + + + True + gtk-select-color + 1 + 0.5 + 0.5 + 0 + 0 + + + + + True + + + True + _About + True + + + + + True + gtk-help + 1 + 0.5 + 0.5 + 0 + 0 + + + + + True @@ -59,63 +110,6 @@ - - - - True - _? - True - - - - - - - True - _About - True - - - - - - - - - - - - 0 - False - True - - - - - - True - GTK_SHADOW_OUT - GTK_POS_LEFT - GTK_POS_TOP - - - - True - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_BOTH - True - - - - - - - - - - - - @@ -401,4 +395,712 @@ + + True + Accounts + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + 7 + True + False + 0 + + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_NONE + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + True + + + + + + 0 + True + True + + + + + + True + + + 10 + False + True + + + + + + True + 0.5 + 0.5 + 0 + 1 + + + + True + False + 20 + + + + True + True + gtk-new + True + GTK_RELIEF_NORMAL + + + + 0 + False + False + + + + + + True + False + True + gtk-delete + True + GTK_RELIEF_NORMAL + + + 0 + False + False + + + + + + True + False + True + GTK_RELIEF_NORMAL + + + + True + 0.5 + 0.5 + 0 + 0 + + + + True + False + 2 + + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + True + _Modify + True + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + + + + 0 + False + False + + + + + + + 0 + False + True + + + + + + + + True + About + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + True + False + 0 + + + + True + False + 0 + + + + True + 0.5 + 0.5 + 0 + 0 + + + 10 + False + True + + + + + + True + <b>Gajim</b> + +Copyright © 2003 Gajim Team + +<b>Gajim Team</b> +Vincent Hanquez (tab@tuxfamily.org) +Yann Le Boulanger (asterix@crans.org) +David Ferlier (david@yazzy.org) + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 10 + True + True + + + + + 0 + True + True + + + + + + True + + + 10 + False + True + + + + + + 10 + True + 0.5 + 0.5 + 0.2 + 1 + + + + True + True + gtk-close + True + GTK_RELIEF_NORMAL + + + + + 0 + False + False + + + + + + + + True + Account Modification + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + False + + + + True + False + 0 + + + + 5 + True + True + True + True + GTK_POS_TOP + False + False + + + + 5 + True + 3 + 2 + False + 5 + 5 + + + + True + Jabber ID: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 0 + 1 + + + + + + + True + Password: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + True + False + 0 + + True + * + False + + + 1 + 2 + 1 + 2 + + + + + + + True + Ressource: + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 2 + 2 + 3 + + + + + + False + True + + + + + + 5 + True + False + 5 + + + + True + gtk-home + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + <b>Account</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + tab + + + + + + True + Empty + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + False + True + + + + + + 5 + True + False + 5 + + + + True + gtk-preferences + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + <b>Preferences</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + tab + + + + + + True + Empty + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + False + True + + + + + + 5 + True + False + 5 + + + + True + gtk-refresh + 4 + 0.5 + 0.5 + 0 + 0 + + + 0 + True + True + + + + + + True + <b>Connection</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + tab + + + + + 0 + True + True + + + + + + True + + + 10 + False + True + + + + + + 10 + True + 0.5 + 0.5 + 0.2 + 1 + + + + True + True + gtk-close + True + GTK_RELIEF_NORMAL + + + + + 0 + False + False + + + + + + diff --git a/plugins/gtkgui.py b/plugins/gtkgui.py index de62d73b9..3049623ae 100644 --- a/plugins/gtkgui.py +++ b/plugins/gtkgui.py @@ -44,6 +44,22 @@ class user: self.status = args[0].status else: raise TypeError, 'bad arguments' +class about: + def delete_event(self, widget): + self.window.destroy() + + def __init__(self): + self.xml = gtk.glade.XML('plugins/gtkgui.glade', 'About') + self.xml.signal_connect('gtk_widget_destroy', self.delete_event) + +class accounts: + def delete_event(self, widget): + self.window.destroy() + + def __init__(self): + self.xml = gtk.glade.XML('plugins/gtkgui.glade', 'Accounts') + self.xml.signal_connect('gtk_widget_destroy', self.delete_event) + class message: def delete_event(self, widget): del self.roster.tab_messages[self.jid] @@ -169,6 +185,12 @@ class roster: def on_status_changed(self, widget): self.queueOUT.put(('STATUS',widget.name)) + + def on_about(self, widget): + window_about = about() + + def on_accounts(self, widget): + window_accounts = accounts() def on_quit(self, widget): self.queueOUT.put(('QUIT','')) @@ -181,7 +203,7 @@ class roster: #NE FONCTIONNE PAS ! self.tab_messages[jid].window.grab_focus() else: - self.tab_messages[jid]=message(jid, self) + self.tab_messages[jid] = message(jid, self) def __init__(self, queueOUT): #initialisation des variables @@ -197,6 +219,7 @@ class roster: self.optionmenu = self.xml.get_widget('optionmenu') self.optionmenu.set_history(6) self.tab_messages = {} + #colonnes self.col = gtk.TreeViewColumn() render_pixbuf = gtk.CellRendererPixbuf() @@ -206,8 +229,11 @@ class roster: self.col.pack_start(render_text, expand = True) self.col.add_attribute(render_text, 'text', 1) self.tree.append_column(self.col) - #signales + + #signals self.xml.signal_connect('gtk_main_quit', self.on_quit) + self.xml.signal_connect('on_accounts_activate', self.on_accounts) + self.xml.signal_connect('on_about_activate', self.on_about) self.xml.signal_connect('on_quit_activate', self.on_quit) self.xml.signal_connect('on_treeview_event', self.on_treeview_event) self.xml.signal_connect('on_status_changed', self.on_status_changed)