зеркало из https://github.com/mozilla/pjs.git
Popup windows stuff for QGeckoEmbed
This commit is contained in:
Родитель
f300a26184
Коммит
a3e5baede0
|
@ -75,7 +75,7 @@ EmbedWindowCreator::CreateChromeWindow(nsIWebBrowserChrome *aParent,
|
|||
if (!qecko)
|
||||
return NS_ERROR_FAILURE;
|
||||
newEmbed = qecko;
|
||||
emit newEmbed->newWindow(newEmbed, aChromeFlags);
|
||||
emit newEmbed->newWindow(&newEmbed, aChromeFlags);
|
||||
}
|
||||
|
||||
// check to make sure that we made a new window
|
||||
|
|
|
@ -226,7 +226,7 @@ QGeckoEmbedPrivate::init()
|
|||
|
||||
// Apply the current chrome mask
|
||||
ApplyChromeMask();
|
||||
|
||||
|
||||
window->SetVisibility(PR_TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ signals:
|
|||
void netStart();
|
||||
void netStop();
|
||||
|
||||
void newWindow(QGeckoEmbed *newWindow, int chromeMask);
|
||||
void newWindow(QGeckoEmbed **newWindow, int chromeMask);
|
||||
void visibilityChanged(bool visible);
|
||||
void destroyBrowser();
|
||||
void openURI(const QString &url);
|
||||
|
|
|
@ -81,7 +81,8 @@ MyMainWindow::MyMainWindow()
|
|||
SLOT(slotProgress(int, int)));
|
||||
connect(qecko, SIGNAL(progressAll(const QString&, int, int)),
|
||||
SLOT(slotProgress(const QString&, int, int)));
|
||||
|
||||
connect(qecko, SIGNAL(newWindow(QGeckoEmbed**, int)),
|
||||
SLOT(slotNewWindow(QGeckoEmbed**, int)));
|
||||
|
||||
connect( location, SIGNAL(returnPressed()), SLOT(changeLocation()));
|
||||
|
||||
|
@ -147,3 +148,13 @@ void MyMainWindow::slotProgress(int current, int max)
|
|||
{
|
||||
qDebug("progress %d / %d ", current, max);
|
||||
}
|
||||
|
||||
void MyMainWindow::slotNewWindow(QGeckoEmbed **newWindow, int chromeMask)
|
||||
{
|
||||
MyMainWindow *mainWindow = new MyMainWindow();
|
||||
if(!mainWindow) return;
|
||||
mainWindow->resize(400, 600);
|
||||
mainWindow->show();
|
||||
|
||||
*newWindow = mainWindow->qecko;
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
private slots:
|
||||
void slotProgress(int, int);
|
||||
void slotProgress(const QString &, int, int);
|
||||
void slotNewWindow(QGeckoEmbed**, int);
|
||||
|
||||
private:
|
||||
QLineEdit *location;
|
||||
|
|
Загрузка…
Ссылка в новой задаче