convert event_id from string to long
[enigma2.git] / main / enigma.cpp
index 0d1ce6ec788b860cfd58c08acbbda84efe10d36f..c868902f860a56434c024c6ea8d8f4fce69d44de 100644 (file)
@@ -1,7 +1,4 @@
-#undef WITH_SDL
-
 #ifdef WITH_SDL
-#error
 #define SDLDC
 #endif
 
@@ -19,7 +16,6 @@
 #include <lib/gdi/glcddc.h>
 
 #ifdef WITH_SDL
-#error
 #include <lib/gdi/sdl.h>
 #endif
 #include <lib/gdi/font.h> 
@@ -128,15 +124,11 @@ public:
                m_locale_time_handler = new eDVBLocalTimeHandler();
                m_epgcache = new eEPGCache();
                m_mgr->setChannelList(m_dvbdb);
-               
-//             m_scan = new eComponentScan();
-//             m_scan->start();
-
        }
        
        ~eMain()
        {
-               m_dvbdb->save();
+               m_dvbdb->saveServicelist();
                m_scan = 0;
        }
 };
@@ -177,7 +169,17 @@ int main(int argc, char **argv)
        ePtr<gLCDDC> my_lcd_dc;
        gLCDDC::getInstance(my_lcd_dc);
 
-       fontRenderClass::getInstance()->AddFont(FONTDIR "/arial.ttf", "Arial", 100);
+       fontRenderClass::getInstance()->AddFont(FONTDIR "/md_khmurabi_10.ttf", "Regular", 100);
+       fontRenderClass::getInstance()->AddFont(FONTDIR "/ae_AlMateen.ttf", "Replacement", 90);
+       eTextPara::setReplacementFont("Replacement");
+       
+                       /* some characters are wrong in the regular font, force them to use the replacement font */
+       for (int i = 0x60c; i <= 0x66d; ++i)
+               eTextPara::forceReplacementGlyph(i);
+       eTextPara::forceReplacementGlyph(0xfdf2);
+       for (int i = 0xfe80; i < 0xff00; ++i)
+               eTextPara::forceReplacementGlyph(i);
+       
 
        eWidgetDesktop dsk(eSize(720, 576));
        eWidgetDesktop dsk_lcd(eSize(132, 64));
@@ -219,14 +221,14 @@ int main(int argc, char **argv)
        lcd_label = new eLabel(lcd_win);
        lcd_label->move(ePoint(0, 4));
        lcd_label->resize(eSize(132, 42));
-       ePtr<gFont> font = new gFont("Arial", 19);
-       //ePtr<gFont> font = new gFont("Arial", 16);
+       ePtr<gFont> font = new gFont("Regular", 19);
+       //ePtr<gFont> font = new gFont("Regular", 16);
        lcd_label->setFont(font);
 
        lcd_clock = new eLabel(lcd_win);
        lcd_clock->move(ePoint(50, 46));
        lcd_clock->resize(eSize(132, 18));
-       ePtr<gFont> clkfont = new gFont("Arial", 16);
+       ePtr<gFont> clkfont = new gFont("Regular", 16);
        lcd_clock->setFont(clkfont);
 
        //lcd_label->setText("bla bla bla, this lcd\nSUCKS!");
@@ -240,8 +242,6 @@ int main(int argc, char **argv)
 
        python.execute("mytest", "__main__");
 
-//     eApp->exec();
-
        return exit_code;
 }
 
@@ -250,9 +250,14 @@ eWidgetDesktop *getDesktop()
        return wdsk;
 }
 
+eApplication *getApplication()
+{
+       return eApp;
+}
+
 void runMainloop()
 {
-       exit_code = eApp->exec();
+       exit_code = eApp->runLoop();
 }
 
 void quitMainloop(int exitCode)