~ubuntu-branches/ubuntu/precise/amule-adunanza/precise

« back to all changes in this revision

Viewing changes to src/MuleListCtrl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-02-18 21:16:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100218211623-gptwe60zx1knfkmu
Tags: 2010.1+2.2.6-0ubuntu1
* New upstream release (LP: #524697)
  - Drop manpages_spelling_fixes.diff fixed by upstream
  - Drop cryptopp-reference.diff fixed by upstream
  - Bump Standards-Version no changes required
  - Update install files (amule -> amuleadunanza)
  - debian/rules: amule.xpm -> amuleadunanza.xpm
  - Add README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
// This file is part of the aMule Project.
3
3
//
4
 
// Copyright (c) 2003-2008 aMule Team ( admin@amule.org / http://www.amule.org )
 
4
// Copyright (c) 2003-2009 aMule Team ( admin@amule.org / http://www.amule.org )
5
5
// Copyright (c) 2002 Merkur ( devs@emule-project.net / http://www.emule-project.net )
6
6
//
7
7
// Any parts of this program derived from the xMule, lMule or eMule project,
178
178
                }
179
179
        }
180
180
        
181
 
        // Must have at least one sort-order specified
182
 
        if (m_sort_orders.empty()) {
 
181
        // Make sure that sort by name is in the sort order list, 
 
182
        // so clients don't get sorted under the wrong download.
 
183
        // (It should always be anyway, but you can remove it by editing the config.)
 
184
        // This also makes sure there's at least one entry in the list.
 
185
        CSortingList::const_iterator it = m_sort_orders.begin();
 
186
        bool ok = false;
 
187
        for (; !ok && it != m_sort_orders.end(); ++it) {
 
188
                ok = it->first == 0;
 
189
        }
 
190
        if (!ok) { // not found - append sort by name to the end
183
191
                m_sort_orders.push_back(CColPair(0, 0));
184
192
        }
185
193
 
527
535
 
528
536
void CMuleListCtrl::OnChar(wxKeyEvent& evt)
529
537
{
 
538
// ADUNANZA BEGIN
 
539
// GetKeyCode, almeno a partire da wx 2.8.x, restituisce un int
 
540
// Su aluni compilatori wxChar causa problemi qui
 
541
#if 0
530
542
        wxChar key = evt.GetKeyCode();
 
543
#else
 
544
        int key = evt.GetKeyCode();
 
545
#endif
 
546
// ADUNANZA END
531
547
        if (key == 0) {
532
548
                // We prefer GetKeyCode() to GetUnicodeKey(), in order to work
533
549
                // around a bug in the GetUnicodeKey(), that causes values to