Commit 30efb17d authored by Daniel Brötzmann's avatar Daniel Brötzmann
Browse files

ChatControlBase: Add account icon if multiple accounts are enabled

parent 2073080a
......@@ -138,6 +138,14 @@ def __init__(self, parent_win, widget_name, contact, acct,
self.on_banner_label_populate_popup)
self.handlers[id_] = self.xml.banner_label
self._accounts = app.get_enabled_accounts_with_labels()
if len(self._accounts) > 1:
self.xml.account_image.set_tooltip_text(
app.get_account_label(self.account))
account_class = app.css_config.get_dynamic_class(self.account)
self.xml.account_image.get_style_context().add_class(account_class)
self.xml.account_image.show()
# Init DND
self.TARGET_TYPE_URI_LIST = 80
uri_entry = Gtk.TargetEntry.new(
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.1 -->
<!-- Generated with glade 3.22.2 -->
<interface>
<requires lib="gtk+" version="3.20"/>
<object class="GtkAdjustment" id="adjustment1">
......@@ -547,7 +547,18 @@
</packing>
</child>
<child>
<placeholder/>
<object class="GtkImage" id="account_image">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="icon_name">org.gajim.Gajim-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
</object>
<packing>
......
......@@ -150,6 +150,23 @@
<object class="GtkActionBar" id="banner_actionbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="account_image">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="halign">end</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="hexpand">True</property>
<property name="icon_name">org.gajim.Gajim-symbolic</property>
</object>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<style>
<class name="actionbar-no-border"/>
</style>
......
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