Commit 1bb04ca4 authored by Philipp Hörist's avatar Philipp Hörist

Dont use hide() after show_all()

rather use no_show_all. This reduces flickering when we show the window
parent 042d8aa6
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.0 -->
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkListStore" id="account_liststore">
......@@ -48,8 +48,8 @@
<property name="baseline_position">top</property>
<child>
<object class="GtkLabel" id="prompt_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">center</property>
<property name="margin_top">18</property>
<property name="use_markup">True</property>
......@@ -94,7 +94,7 @@
<property name="halign">end</property>
<property name="label" translatable="yes">_Nickname</property>
<property name="use_underline">True</property>
<property name="xalign">0.03999999910593033</property>
<property name="xalign">0.5</property>
<style>
<class name="dim-label"/>
</style>
......@@ -167,8 +167,8 @@
</child>
<child>
<object class="GtkLabel" id="account_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes">A_ccount</property>
......@@ -184,8 +184,8 @@
</child>
<child>
<object class="GtkLabel" id="protocol_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="label" translatable="yes">_Protocol</property>
<property name="use_underline">True</property>
......@@ -206,8 +206,8 @@
<property name="spacing">12</property>
<child>
<object class="GtkComboBox" id="protocol_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="model">protocol</property>
<signal name="changed" handler="on_protocol_combobox_changed" swapped="no"/>
<child>
......@@ -233,7 +233,6 @@
</child>
<child>
<object class="GtkComboBox" id="protocol_jid_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="model">protocol_jid</property>
......@@ -259,8 +258,8 @@
</child>
<child>
<object class="GtkComboBox" id="account_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="margin_bottom">12</property>
<property name="model">account_liststore</property>
<property name="entry_text_column">1</property>
......
......@@ -168,25 +168,18 @@ class AddNewContactWindow(Gtk.ApplicationWindow):
self.group_comboboxentry.set_active(i)
i += 1
self.show_all()
self.prompt_label.hide()
self.save_message_revealer.hide()
if len(accounts) > 1:
liststore = self.account_combobox.get_model()
for acc in accounts:
liststore.append(acc)
self.account_combobox.set_active_id(self.account)
else:
self.account_label.hide()
self.account_combobox.hide()
self.account_label.show()
self.account_combobox.show()
if len(self.agents) == 1:
self.protocol_label.hide()
self.protocol_combobox.hide()
self.protocol_jid_combobox.hide()
if len(self.agents) > 1:
self.protocol_label.show()
self.protocol_combobox.show()
if self.account:
message_buffer = self.message_textview.get_buffer()
......@@ -194,6 +187,8 @@ class AddNewContactWindow(Gtk.ApplicationWindow):
self.account))
message_buffer.set_text(msg)
self.show_all()
app.ged.register_event_handler('gateway-prompt-received', ged.GUI1,
self._nec_gateway_prompt_received)
app.ged.register_event_handler('presence-received', ged.GUI1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment