1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 17:51:34 +02:00

Sort links once they have all been added to the menu

This commit is contained in:
Paul Cercueil 2014-01-19 23:07:54 +01:00
parent 1d532c9b44
commit 8bb58f6270
3 changed files with 2 additions and 3 deletions

View File

@ -394,6 +394,7 @@ void GMenu2X::initMenu() {
} }
menu->skinUpdated(); menu->skinUpdated();
menu->orderLinks();
menu->setSectionIndex(confInt["section"]); menu->setSectionIndex(confInt["section"]);
menu->setLinkIndex(confInt["link"]); menu->setLinkIndex(confInt["link"]);

View File

@ -98,8 +98,6 @@ Menu::Menu(GMenu2X *gmenu2x, Touchscreen &ts)
} }
#endif #endif
orderLinks();
btnContextMenu->setPosition(gmenu2x->resX - 38, gmenu2x->bottomBarIconY); btnContextMenu->setPosition(gmenu2x->resX - 38, gmenu2x->bottomBarIconY);
btnContextMenu->setAction(std::bind(&GMenu2X::showContextMenu, gmenu2x)); btnContextMenu->setAction(std::bind(&GMenu2X::showContextMenu, gmenu2x));
} }

View File

@ -75,7 +75,6 @@ private:
void readLinks(); void readLinks();
void freeLinks(); void freeLinks();
void orderLinks();
// Load all the sections of the given "sections" directory. // Load all the sections of the given "sections" directory.
void readSections(std::string parentDir); void readSections(std::string parentDir);
@ -123,6 +122,7 @@ public:
void deleteSelectedSection(); void deleteSelectedSection();
void skinUpdated(); void skinUpdated();
void orderLinks();
// Layer implementation: // Layer implementation:
virtual bool runAnimations(); virtual bool runAnimations();