mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Popup windows stuff for QGeckoEmbed
This commit is contained in:
parent
0eb81df954
commit
9ad7f07e13
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user