diff --git a/src/gtkgui.glade b/src/gtkgui.glade
index bbf0cb3e7..e8b75e2f7 100644
--- a/src/gtkgui.glade
+++ b/src/gtkgui.glade
@@ -7865,7 +7865,7 @@ Custom
True
True
True
- Set Avatar
+ Set _Avatar
True
GTK_RELIEF_NORMAL
True
@@ -7936,7 +7936,149 @@ Custom
True
GTK_BUTTONBOX_END
- 10
+ 12
+
+
+
+ True
+ True
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ gtk-go-up
+ 4
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ _Publish
+ True
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ gtk-go-down
+ 4
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ _Retrieve
+ True
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
@@ -11055,7 +11197,7 @@ JID: whatever@jabber.org
True
True
True
- Set Image...
+ _Set Image...
True
GTK_RELIEF_NORMAL
True
diff --git a/src/vcard.py b/src/vcard.py
index b98122f7a..41a811862 100644
--- a/src/vcard.py
+++ b/src/vcard.py
@@ -41,6 +41,12 @@ class VcardWindow:
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard_information_window', APP)
self.window = self.xml.get_widget('vcard_information_window')
self.xml.get_widget('photo_vbuttonbox').set_no_show_all(True)
+
+ self.publish_button = self.xml.get_widget('publish_button')
+ self.retrieve_button = self.xml.get_widget('retrieve_button')
+ self.publish_button.set_no_show_all(True)
+ self.retrieve_button.set_no_show_all(True)
+
self.plugin = plugin
self.user = user #don't use it if vcard is true
self.account = account
@@ -50,9 +56,12 @@ class VcardWindow:
if vcard:
self.jid = user
- self.change_to_vcard() # remove Jabber Tab so it has vcard-only info
+ # remove Jabber tab & show publish/retrieve/set_avatar buttons
+ self.change_to_vcard()
else:
self.jid = user.jid
+ self.publish_button.hide()
+ self.retrieve_button.hide()
self.fill_jabber_page()
self.xml.signal_autoconnect(self)
@@ -150,9 +159,10 @@ class VcardWindow:
if file:
filesize = os.path.getsize(file) # in bytes
- if filesize > 8192:
- dialogs.ErrorDialog(_('The filesize of image "%s" is too large') % file,
- _('The file must not be more than 8 kilobytes.')).get_response()
+ if filesize > 8192: # 8 kb
+ dialogs.ErrorDialog(_('The filesize of image "%s" is too large')\
+ % file,
+ _('The file must not be more than 8 kilobytes.')).get_response()
return
fd = open(file)
data = fd.read()
@@ -381,23 +391,10 @@ class VcardWindow:
self.xml.get_widget('information_notebook').remove_page(0)
self.xml.get_widget('nickname_label').set_text('Personal details')
information_hbuttonbox = self.xml.get_widget('information_hbuttonbox')
- #publish button
- button = gtk.Button(stock = gtk.STOCK_GOTO_TOP)
- button.get_children()[0].get_children()[0].get_children()[1].set_text(
- _('_Publish'))
- button.connect('clicked', self.on_publish_button_clicked)
- button.show_all()
- information_hbuttonbox.pack_start(button)
- #retrieve button
- button = gtk.Button(stock = gtk.STOCK_GOTO_BOTTOM)
- button.get_children()[0].get_children()[0].get_children()[1].set_text(
- _('_Retrieve'))
- button.connect('clicked', self.on_retrieve_button_clicked)
- button.show_all()
- information_hbuttonbox.pack_start(button)
- #close button at the end
- button = self.xml.get_widget('close_button')
- information_hbuttonbox.reorder_child(button, 2)
+
+ self.publish_button.show()
+ self.retrieve_button.show()
+
#photo_vbuttonbox visible
self.xml.get_widget('photo_vbuttonbox').show()