Skip to content

Commit

Permalink
Extra fixes (#575)
Browse files Browse the repository at this point in the history
Closes #563
  • Loading branch information
vktr committed Apr 14, 2018
1 parent f34388b commit e9226a0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/picotorrent/filespage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ FilesPage::FilesPage(wxWindow* parent, wxWindowID id, std::shared_ptr<pt::Transl
80,
wxALIGN_RIGHT);

// Ugly hack to prevent the last "real" column from stretching.
m_filesView->AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewTextRenderer(), -1, 0));

nameCol->GetRenderer()->EnableEllipsize(wxELLIPSIZE_END);

m_filesView->AssociateModel(m_viewModel);
Expand Down
2 changes: 1 addition & 1 deletion src/picotorrent/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void OverviewPage::Update(lt::torrent_status const& ts)
wxString savePath = wxString::FromUTF8(ts.save_path);
savePath.Replace("&", "&&");

m_name->SetLabel(ts.name);
m_name->SetLabel(wxString::FromUTF8(ts.name));
m_infoHash->SetLabel(ih.str());
m_savePath->SetLabel(savePath);
m_pieces->SetLabel(wxString::Format("%d (of %d)", ts.pieces.count(), ts.pieces.size()));
Expand Down
3 changes: 3 additions & 0 deletions src/picotorrent/peerspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ PeersPage::PeersPage(wxWindow* parent, wxWindowID id, std::shared_ptr<pt::Transl
m_peersView->AppendTextColumn(i18n(tr, "ul"), PeersViewModel::Columns::UploadRate, wxDATAVIEW_CELL_INERT, 80, wxALIGN_RIGHT);
m_peersView->AppendProgressColumn(i18n(tr, "progress"), PeersViewModel::Columns::Progress, wxDATAVIEW_CELL_INERT, 100);

// Ugly hack to prevent the last "real" column from stretching.
m_peersView->AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewTextRenderer(), -1, 0));

m_peersView->AssociateModel(m_viewModel);
m_viewModel->DecRef();

Expand Down
3 changes: 3 additions & 0 deletions src/picotorrent/torrentlistview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ TorrentListView::TorrentListView(wxWindow* parent, wxWindowID id, std::shared_pt
wxALIGN_RIGHT,
wxDATAVIEW_COL_RESIZABLE | wxDATAVIEW_COL_SORTABLE);

// Ugly hack to prevent the last "real" column from stretching.
AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewTextRenderer(), -1, 0));

nameCol->GetRenderer()->EnableEllipsize(wxELLIPSIZE_END);
statusCol->GetRenderer()->EnableEllipsize(wxELLIPSIZE_END);
}
Expand Down
3 changes: 3 additions & 0 deletions src/picotorrent/trackerspage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ TrackersPage::TrackersPage(wxWindow* parent, wxWindowID id, std::shared_ptr<pt::
100,
wxALIGN_RIGHT)->SetMinWidth(100);

// Ugly hack to prevent the last "real" column from stretching.
m_trackersView->AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewTextRenderer(), -1, 0));

m_trackersView->AssociateModel(m_viewModel);
m_viewModel->DecRef();

Expand Down

0 comments on commit e9226a0

Please sign in to comment.