mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-26 19:35:30 +02:00
Fix build for platforms without libopk
This commit is contained in:
parent
0ee45d5054
commit
6947997d44
@ -231,7 +231,9 @@ GMenu2X::GMenu2X()
|
||||
layers.insert(layers.begin(), make_shared<Background>(*this));
|
||||
initMenu();
|
||||
|
||||
#ifdef ENABLE_INOTIFY
|
||||
monitor = new MediaMonitor(CARD_ROOT);
|
||||
#endif
|
||||
|
||||
if (!fileExists(confStr["wallpaper"])) {
|
||||
DEBUG("No wallpaper defined; we will take the default one.\n");
|
||||
@ -267,7 +269,9 @@ GMenu2X::~GMenu2X() {
|
||||
quit();
|
||||
|
||||
delete font;
|
||||
#ifdef ENABLE_INOTIFY
|
||||
delete monitor;
|
||||
#endif
|
||||
}
|
||||
|
||||
void GMenu2X::quit() {
|
||||
|
@ -71,7 +71,9 @@ class GMenu2X {
|
||||
private:
|
||||
Touchscreen ts;
|
||||
std::shared_ptr<Menu> menu;
|
||||
#ifdef ENABLE_INOTIFY
|
||||
MediaMonitor *monitor;
|
||||
#endif
|
||||
|
||||
LinkApp *appToLaunch;
|
||||
std::string fileToLaunch;
|
||||
|
@ -185,6 +185,7 @@ bool InputManager::getButton(Button *button, bool wait) {
|
||||
#endif
|
||||
case SDL_USEREVENT:
|
||||
switch ((enum EventCode) event.user.code) {
|
||||
#ifdef HAVE_LIBOPK
|
||||
case REMOVE_LINKS:
|
||||
menu->removePackageLink((const char *) event.user.data1);
|
||||
break;
|
||||
@ -196,6 +197,7 @@ bool InputManager::getButton(Button *button, bool wait) {
|
||||
((string) (const char *) event.user.data1
|
||||
+ "/apps").c_str());
|
||||
break;
|
||||
#endif /* HAVE_LIBOPK */
|
||||
case REPAINT_MENU:
|
||||
default:
|
||||
break;
|
||||
|
@ -107,9 +107,10 @@ Menu::Menu(GMenu2X *gmenu2x, Touchscreen &ts)
|
||||
Menu::~Menu() {
|
||||
freeLinks();
|
||||
|
||||
for (vector<Monitor *>::iterator it = monitors.begin();
|
||||
it < monitors.end(); it++)
|
||||
delete *it;
|
||||
#ifdef ENABLE_INOTIFY
|
||||
for (auto it : monitors)
|
||||
delete it;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Menu::readSections(std::string parentDir)
|
||||
|
Loading…
Reference in New Issue
Block a user