Skip to content

Commit

Permalink
Merge pull request #26 from DoctorSelar/patch-1
Browse files Browse the repository at this point in the history
GtkTreeTorrentView.cpp - add "Leechers"
  • Loading branch information
benwaffle committed Jul 16, 2014
2 parents 55b459a + d25a428 commit 83c1e35
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/gtk/GtkTreeTorrentView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ void GtkTorrentTreeView::setupColumns()
col = this->get_column(cid - 1);
col->set_alignment(0.5);
col->set_fixed_width(90);

cid = this->append_column("Leechers", m_cols.m_col_leechers);
col = this->get_column(cid - 1);
col->set_alignment(0.5);
col->set_fixed_width(90);

Gtk::CellRendererProgress *cell = Gtk::manage(new Gtk::CellRendererProgress());
cid = this->append_column("Progress", *cell);
Expand Down Expand Up @@ -50,6 +55,7 @@ void GtkTorrentTreeView::addCell(t_ptr &t)
row[m_cols.m_col_percent] = t->getTotalProgress();
row[m_cols.m_col_percent_text] = t->getTextState();
row[m_cols.m_col_seeders] = t->getTotalSeeders();
row[m_cols.m_col_leechers] = t->getTotalLeechers();
}

void GtkTorrentTreeView::updateCells()
Expand All @@ -62,7 +68,7 @@ void GtkTorrentTreeView::updateCells()
c[m_cols.m_col_percent] = t->getTotalProgress();
c[m_cols.m_col_seeders] = t->getTotalSeeders();
c[m_cols.m_col_percent_text] = t->getTextState();

c[m_cols.m_col_leechers] = t->getTotalLeechers();
// TODO: Handle with events

//m_cells[i]->property_text() = t->getTextState();
Expand Down

0 comments on commit 83c1e35

Please sign in to comment.