Date:2013-07-19 18:50:20 (10 years 8 months ago)
Author:Paul Cercueil
Commit:84a987e9d52d14f308f15a02ca5a5059b86ae9c2
Message:When loading multiple OPKs, don't order links each time one is added

Files: src/menu.cpp (4 diffs)
src/menu.h (1 diff)

Change Details

src/menu.cpp
458458#endif
459459}
460460
461void Menu::openPackage(std::string path)
461void Menu::openPackage(std::string path, bool order)
462462{
463463    /* First try to remove existing links of the same OPK
464464     * (needed for instance when an OPK is modified) */
...... 
516516    }
517517
518518    opk_close(opk);
519    orderLinks();
519
520    if (order)
521        orderLinks();
520522}
521523
522524void Menu::readPackages(std::string parentDir)
...... 
548550            continue;
549551        }
550552
551        openPackage(parentDir + '/' + dptr->d_name);
553        openPackage(parentDir + '/' + dptr->d_name, false);
552554    }
553555
554556    closedir(dirp);
557    orderLinks();
555558}
556559
557560#ifdef ENABLE_INOTIFY
...... 
608611{
609612    for (std::vector< std::vector<Link *> >::iterator section = links.begin();
610613                section < links.end(); section++)
611        std::sort(section->begin(), section->end(), compare_links);
614        if (section->size() > 1)
615            std::sort(section->begin(), section->end(), compare_links);
612616}
613617
614618void Menu::readLinks() {
src/menu.h
6767    ~Menu();
6868
6969#ifdef HAVE_LIBOPK
70    void openPackage(std::string path);
70    void openPackage(std::string path, bool order = true);
7171    void openPackagesFromDir(std::string path);
7272#ifdef ENABLE_INOTIFY
7373    void removePackageLink(std::string path);

Archive Download the corresponding diff file



interactive