summaryrefslogtreecommitdiffstats
path: root/src/gui/Ephraim.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Ephraim.vala')
-rw-r--r--src/gui/Ephraim.vala24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/gui/Ephraim.vala b/src/gui/Ephraim.vala
index 6474482..5130247 100644
--- a/src/gui/Ephraim.vala
+++ b/src/gui/Ephraim.vala
@@ -25,13 +25,14 @@ public class Ephraim {
rosterView.set_model(roster);
rosterView.query_tooltip.connect((x, y, keyboard_tip, tooltip) => {
+ Gtk.TreeModel model;
Gtk.TreeIter iter;
- if(!rosterView.get_tooltip_context(out x, out y, keyboard_tip, null, null, out iter))
+ if(!rosterView.get_tooltip_context(out x, out y, keyboard_tip, out model, null, out iter))
return false;
Value value;
- roster.get_value(iter, 0, out value);
+ model.get_value(iter, 0, out value);
Contact? c = value.get_object() as Contact;
if(c == null)
@@ -42,14 +43,27 @@ public class Ephraim {
if(r == null)
return false;
- tooltip.set_text("Resource: " + r.key);
+ tooltip.set_text("Resource: " + r.key + " (" + r.value.priority.to_string() + ")");
return true;
});
rosterView.has_tooltip = true;
- rosterView.append_column(new Gtk.TreeViewColumn.with_attributes("Presence", new CellRendererPresence(), "contact", 0, null));
- rosterView.append_column(new Gtk.TreeViewColumn.with_attributes("Contact", new CellRendererContact(), "contact", 0, null));
+ Gtk.TreeViewColumn presenceColumn = new Gtk.TreeViewColumn.with_attributes(null, new CellRendererPresence(), "contact", 0, null);
+ presenceColumn.min_width = 32;
+ rosterView.append_column(presenceColumn);
+
+ Gtk.TreeViewColumn contactColumn = new Gtk.TreeViewColumn();
+
+ Gtk.CellRenderer cellRendererContact = new CellRendererContact();
+ contactColumn.pack_start(cellRendererContact, true);
+ contactColumn.set_attributes(cellRendererContact, "contact", 0, null);
+
+ Gtk.CellRenderer cellRendererAvatar = new CellRendererAvatar();
+ contactColumn.pack_end(cellRendererAvatar, false);
+ contactColumn.set_attributes(cellRendererAvatar, "contact", 0, null);
+
+ rosterView.append_column(contactColumn);
window.visible = true;