Fix layout in AddNewContact window

This commit is contained in:
lovetox 2016-10-05 22:51:06 +02:00
parent 80de2e45c6
commit bc3210ec65
2 changed files with 14 additions and 11 deletions

View File

@ -41,6 +41,8 @@
<object class="GtkLabel" id="prompt_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -57,9 +59,9 @@
<object class="GtkLabel" id="account_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">A_ccount:</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -105,9 +107,9 @@
<object class="GtkLabel" id="protocol_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Protocol:</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -164,9 +166,9 @@
<object class="GtkLabel" id="uid_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_User ID:</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -177,9 +179,9 @@
<object class="GtkLabel" id="label188">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Nickname:</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -190,9 +192,9 @@
<object class="GtkLabel" id="label223">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Group:</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
@ -271,6 +273,7 @@
</child>
<child>
<object class="GtkScrolledWindow" id="message_scrolledwindow">
<property name="height_request">60</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="no_show_all">True</property>
@ -319,12 +322,12 @@
<object class="GtkLabel" id="label224">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">You have to register with this transport
to be able to add a contact from this
protocol. Click on Register button to
proceed.</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>

View File

@ -890,12 +890,12 @@ class AddNewContactWindow:
'group_comboboxentry', 'auto_authorize_checkbutton'):
self.__dict__[w] = self.xml.get_object(w)
if account and len(gajim.connections) >= 2:
self.default_desc = _('Please fill in the data of the contact you '
'want to add in account %s') % account
self.default_desc = _('Please fill in the data of the contact you want\n'
'to add to your account <b>%s</b>') % account
else:
self.default_desc = _('Please fill in the data of the contact you '
'want to add')
self.xml.get_object('prompt_label').set_text(self.default_desc)
self.xml.get_object('prompt_label').set_markup(self.default_desc)
self.agents = {'jabber': []}
self.gateway_prompt = {}
# types to which we are not subscribed but account has an agent for it
@ -1161,7 +1161,7 @@ class AddNewContactWindow:
desc = self.gateway_prompt[jid_]['desc']
if not desc:
desc = self.default_desc
self.xml.get_object('prompt_label').set_text(desc)
self.xml.get_object('prompt_label').set_markup(desc)
prompt = None
if self.agents[type_] and jid_ in self.gateway_prompt:
@ -1190,7 +1190,7 @@ class AddNewContactWindow:
desc = self.gateway_prompt[jid_]['desc']
if not desc:
desc = self.default_desc
self.xml.get_object('prompt_label').set_text(desc)
self.xml.get_object('prompt_label').set_markup(desc)
if len(self.agents[type_]) > 1:
self.protocol_jid_combobox.show()
else: