Author: asterix
Date: 2006-12-29 08:32:18 +0100 (Fri, 29 Dec 2006)
New Revision: 7735
Modified:
trunk/data/glade/profile_window.glade
trunk/src/profile_window.py
Log:
remove publish / retrieve button in profile window. fixes #2471
Modified: trunk/data/glade/profile_window.glade
===================================================================
--- trunk/data/glade/profile_window.glade 2006-12-29 01:46:46 UTC (rev 7734)
+++ trunk/data/glade/profile_window.glade 2006-12-29 07:32:18 UTC (rev 7735)
@@ -1856,165 +1856,28 @@
<property name="spacing">12</property>
<child>
- <widget class="GtkButton" id="publish_button">
+ <widget class="GtkButton" id="cancel_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
+ <property name="label">gtk-cancel</property>
+ <property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_publish_button_clicked"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-go-up</property>
- <property name="icon_size">4</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Publish</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
+ <signal name="clicked" handler="on_cancel_button_clicked" last_modification_time="Fri, 29 Dec 2006 07:28:04 GMT"/>
</widget>
</child>
<child>
- <widget class="GtkButton" id="retrieve_button">
+ <widget class="GtkButton" id="ok_button">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_retrieve_button_clicked"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-go-down</property>
- <property name="icon_size">4</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Retrieve</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
+ <property name="label">gtk-ok</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
- <signal name="clicked" handler="on_close_button_clicked" last_modification_time="Mon, 25 Sep 2006 04:58:43 GMT"/>
+ <signal name="clicked" handler="on_ok_button_clicked" last_modification_time="Fri, 29 Dec 2006 07:27:45 GMT"/>
</widget>
</child>
</widget>
Modified: trunk/src/profile_window.py
===================================================================
--- trunk/src/profile_window.py 2006-12-29 01:46:46 UTC (rev 7734)
+++ trunk/src/profile_window.py 2006-12-29 07:32:18 UTC (rev 7735)
@@ -299,7 +299,7 @@
vcard['PHOTO']['TYPE'] = self.avatar_mime_type
return vcard
- def on_publish_button_clicked(self, widget):
+ def on_ok_button_clicked(self, widget):
if self.update_progressbar_timeout_id:
# Operation in progress
return
@@ -322,16 +322,11 @@
self.update_progressbar)
def vcard_published(self):
- if self.message_id:
- self.statusbar.remove(self.context_id, self.message_id)
- self.message_id = self.statusbar.push(self.context_id,
- _('Information published'))
- self.remove_statusbar_timeout_id = gobject.timeout_add(3000,
- self.remove_statusbar, self.message_id)
if self.update_progressbar_timeout_id is not None:
gobject.source_remove(self.update_progressbar_timeout_id)
self.progressbar.set_fraction(0)
self.update_progressbar_timeout_id = None
+ self.window.destroy()
def vcard_not_published(self):
if self.message_id:
@@ -348,34 +343,5 @@
_('There was an error while publishing your personal information, '
'try again later.'))
- def on_retrieve_button_clicked(self, widget):
- if self.update_progressbar_timeout_id:
- # Operation in progress
- return
- entries = ['FN', 'NICKNAME', 'BDAY', 'EMAIL_HOME_USERID', 'URL',
- 'TEL_HOME_NUMBER', 'N_FAMILY', 'N_GIVEN', 'N_MIDDLE', 'N_PREFIX',
- 'N_SUFFIX', 'ADR_HOME_STREET', 'ADR_HOME_EXTADR', 'ADR_HOME_LOCALITY',
- 'ADR_HOME_REGION', 'ADR_HOME_PCODE', 'ADR_HOME_CTRY', 'ORG_ORGNAME',
- 'ORG_ORGUNIT', 'TITLE', 'ROLE', 'ADR_WORK_STREET', 'ADR_WORK_EXTADR',
- 'ADR_WORK_LOCALITY', 'ADR_WORK_REGION', 'ADR_WORK_PCODE',
- 'ADR_WORK_CTRY']
- if gajim.connections[self.account].connected > 1:
- # clear all entries
- for e in entries:
- self.xml.get_widget(e + '_entry').set_text('')
- self.xml.get_widget('DESC_textview').get_buffer().set_text('')
- button = self.xml.get_widget('PHOTO_button')
- image = button.get_image()
- image.set_from_pixbuf(None)
- button.set_label(_('Click to set your avatar'))
- gajim.connections[self.account].request_vcard(self.jid)
- else:
- dialogs.ErrorDialog(_('You are not connected to the server'),
- _('Without a connection, you can not get your contact information.'))
- self.message_id = self.statusbar.push(self.context_id,
- _('Retrieving profile...'))
- self.update_progressbar_timeout_id = gobject.timeout_add(100,
- self.update_progressbar)
-
- def on_close_button_clicked(self, widget):
+ def on_cancel_button_clicked(self, widget):
self.window.destroy()