From 3e454ea51f77469a3d325aecaeb189a6682d9852 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sun, 3 Apr 2005 02:19:52 +0000 Subject: [PATCH] vcard needs more work. did some gui stuff --- plugins/gtkgui/config.py | 2 +- plugins/gtkgui/dialogs.py | 24 +++++++++++++++++++++++- plugins/gtkgui/gtkgui.glade | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/plugins/gtkgui/config.py b/plugins/gtkgui/config.py index 324d80471..04b479e93 100644 --- a/plugins/gtkgui/config.py +++ b/plugins/gtkgui/config.py @@ -1430,7 +1430,7 @@ class Accounts_window: self.plugin.windows['account_modification_window'] = \ Account_modification_window(self.plugin, infos) # may it messes with this one else: - self.plugin.windows[account_modification_window].window.present() + self.plugin.windows['account_modification_window'].window.present() def on_sync_with_global_status_checkbutton_toggled(self, widget): if widget.get_active(): diff --git a/plugins/gtkgui/dialogs.py b/plugins/gtkgui/dialogs.py index 826dfacf4..464bf999b 100644 --- a/plugins/gtkgui/dialogs.py +++ b/plugins/gtkgui/dialogs.py @@ -139,6 +139,7 @@ class vcard_information_window: for e in entries: txt = self.xml.get_widget(e+'_entry').get_text() if txt != '': + print 'text:', txt vcard = self.add_to_vcard(vcard, e, txt) buffer = self.xml.get_widget('DESC_textview').get_buffer() start_iter = buffer.get_start_iter() @@ -160,6 +161,7 @@ class vcard_information_window: nick = self.plugin.accounts[self.account]['name'] self.plugin.nicks[self.account] = nick self.plugin.send('VCARD', self.account, vcard) + print 'finished with vcard' def on_retrieve_button_clicked(self, widget): if self.plugin.connected[self.account] > 1: @@ -188,6 +190,26 @@ class vcard_information_window: #close button at the end button = self.xml.get_widget('close_button') information_hbuttonbox.reorder_child(button, 2) + + #make all entries editable + self.xml.get_widget('FN_entry').set_property('editable', True) + self.xml.get_widget('NICKNAME_entry').set_property('editable', True) + self.xml.get_widget('BDAY_entry').set_property('editable', True) + self.xml.get_widget('EMAIL_USERID_entry').set_property('editable', True) + self.xml.get_widget('URL_entry').set_property('editable', True) + self.xml.get_widget('TEL_NUMBER_entry').set_property('editable', True) + self.xml.get_widget('ADR_STREET_entry').set_property('editable', True) + self.xml.get_widget('ADR_EXTADR_entry').set_property('editable', True) + self.xml.get_widget('ADR_LOCALITY_entry').set_property('editable', True) + self.xml.get_widget('ADR_REGION_entry').set_property('editable', True) + self.xml.get_widget('ADR_PCODE_entry').set_property('editable', True) + self.xml.get_widget('ADR_CTRY_entry').set_property('editable', True) + self.xml.get_widget('ORG_ORGNAME_entry').set_property('editable', True) + self.xml.get_widget('ORG_ORGUNIT_entry').set_property('editable', True) + self.xml.get_widget('TITLE_entry').set_property('editable', True) + self.xml.get_widget('ROLE_entry').set_property('editable', True) + self.xml.get_widget('DESC_textview').set_editable(True) + self.xml.get_widget('DESC_textview').set_cursor_visible(True) #the user variable is the jid if vcard is true def __init__(self, user, plugin, account, vcard=False): @@ -518,7 +540,7 @@ class Add_new_contact_window: liststore = gtk.ListStore(str) self.group_comboboxentry.set_model(liststore) for g in self.plugin.roster.groups[account].keys(): - if g != 'not in the roster': + if g != 'not in the roster' and g != 'Agents': self.group_comboboxentry.append_text(g) self.xml.signal_autoconnect(self) diff --git a/plugins/gtkgui/gtkgui.glade b/plugins/gtkgui/gtkgui.glade index e80a61fee..3f97b2a1a 100644 --- a/plugins/gtkgui/gtkgui.glade +++ b/plugins/gtkgui/gtkgui.glade @@ -6683,7 +6683,7 @@ Custom True - + Extra Address False False GTK_JUSTIFY_LEFT