aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui')
-rw-r--r--main/src/ui/add_conversation/roster_list.vala9
-rw-r--r--main/src/ui/add_conversation/select_contact_dialog.vala2
2 files changed, 6 insertions, 5 deletions
diff --git a/main/src/ui/add_conversation/roster_list.vala b/main/src/ui/add_conversation/roster_list.vala
index 25827d67..bb338ce5 100644
--- a/main/src/ui/add_conversation/roster_list.vala
+++ b/main/src/ui/add_conversation/roster_list.vala
@@ -14,7 +14,7 @@ protected class RosterList {
private ulong[] handler_ids = new ulong[0];
private ListBox list_box = new ListBox();
- private HashMap<Account, HashMap<Jid, ListRow>> rows = new HashMap<Account, HashMap<Jid, ListRow>>(Account.hash_func, Account.equals_func);
+ private HashMap<Account, HashMap<Jid, ListBoxRow>> rows = new HashMap<Account, HashMap<Jid, ListBoxRow>>(Account.hash_func, Account.equals_func);
public RosterList(StreamInteractor stream_interactor, Gee.List<Account> accounts) {
this.stream_interactor = stream_interactor;
@@ -47,14 +47,15 @@ protected class RosterList {
private void on_updated_roster_item(Account account, Jid jid, Roster.Item roster_item) {
on_removed_roster_item(account, jid, roster_item);
ListRow row = new ListRow.from_jid(stream_interactor, roster_item.jid, account, accounts.size > 1);
- rows[account][jid] = row;
- list_box.append(row);
+ ListBoxRow list_box_row = new ListBoxRow() { child=row };
+ rows[account][jid] = list_box_row;
+ list_box.append(list_box_row);
list_box.invalidate_sort();
list_box.invalidate_filter();
}
private void fetch_roster_items(Account account) {
- rows[account] = new HashMap<Jid, ListRow>(Jid.hash_func, Jid.equals_func);
+ rows[account] = new HashMap<Jid, ListBoxRow>(Jid.hash_func, Jid.equals_func);
foreach (Roster.Item roster_item in stream_interactor.get_module(RosterManager.IDENTITY).get_roster(account)) {
on_updated_roster_item(account, roster_item.jid, roster_item);
}
diff --git a/main/src/ui/add_conversation/select_contact_dialog.vala b/main/src/ui/add_conversation/select_contact_dialog.vala
index 09ac1636..b18f4c10 100644
--- a/main/src/ui/add_conversation/select_contact_dialog.vala
+++ b/main/src/ui/add_conversation/select_contact_dialog.vala
@@ -80,7 +80,7 @@ public class SelectContactDialog : Gtk.Dialog {
add_contact_dialog.present();
});
select_jid_fragment.remove_jid.connect((row) => {
- ListRow list_row = roster_list_box.get_selected_row() as ListRow;
+ ListRow list_row = roster_list_box.get_selected_row().child as ListRow;
stream_interactor.get_module(RosterManager.IDENTITY).remove_jid(list_row.account, list_row.jid);
});
select_jid_fragment.notify["done"].connect(() => {