ginebra2/ChromeWidget.cpp
changeset 9 b39122337a00
parent 3 0954f5dd2cd0
child 12 afcd8e6d025b
equal deleted inserted replaced
7:a1f515018ac1 9:b39122337a00
   116     QObject::connect(this, SIGNAL(popupHidden(const QString &)), m_jsObject, SIGNAL(popupHidden(const QString &)));
   116     QObject::connect(this, SIGNAL(popupHidden(const QString &)), m_jsObject, SIGNAL(popupHidden(const QString &)));
   117 
   117 
   118     //addJSObjectToEngine(this);
   118     //addJSObjectToEngine(this);
   119 
   119 
   120     m_app = new GinebraApplication();
   120     m_app = new GinebraApplication();
       
   121     QObject::connect(this, SIGNAL(goToBackground()), m_app, SLOT(sendToBackground()));
   121 
   122 
   122     //addJSObjectToEngine(m_app);
   123     //addJSObjectToEngine(m_app);
   123 
   124 
   124     QObject::connect(
   125     QObject::connect(
   125             WebPageController::getSingleton(), SIGNAL(pageCreated(WRT::WrtBrowserContainer*)),
   126             WebPageController::getSingleton(), SIGNAL(pageCreated(WRT::WrtBrowserContainer*)),
   343   {
   344   {
   344     //TODO: get the list of containers form m_dom (via new method to be added).
   345     //TODO: get the list of containers form m_dom (via new method to be added).
   345     QList <QWebElement> initialSnippets = m_dom->getInitialElements();
   346     QList <QWebElement> initialSnippets = m_dom->getInitialElements();
   346     foreach(QWebElement element, initialSnippets) {
   347     foreach(QWebElement element, initialSnippets) {
   347       ChromeSnippet * s = getSnippet(element.attribute("id"));
   348       ChromeSnippet * s = getSnippet(element.attribute("id"));
   348       if (s->initiallyVisible())
   349       if (s && s->initiallyVisible())
   349         s->setVisible(true);
   350         s->setVisible(true);
   350     }
   351     }
   351   }
   352   }
   352 
   353 
   353   //TODO: check new logic
   354   //TODO: check new logic