mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
minor tweaks
This commit is contained in:
parent
f6863b7b7a
commit
cf6a220cb7
@ -1183,9 +1183,13 @@ make_splash_window() {
|
|||||||
// Don't know where to put it yet.
|
// Don't know where to put it yet.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (_wparams.get_window_type() == P3D_WT_toplevel && !_stuff_to_download) {
|
if (_wparams.get_window_type() == P3D_WT_hidden) {
|
||||||
// If it's a toplevel window, then we don't want a splash window
|
// We're hidden, and so is the splash window.
|
||||||
// until we have stuff to download.
|
return;
|
||||||
|
}
|
||||||
|
if (_wparams.get_window_type() != P3D_WT_embedded && !_stuff_to_download) {
|
||||||
|
// If it's a toplevel or fullscreen window, then we don't want a
|
||||||
|
// splash window until we have stuff to download.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,8 +78,9 @@ set_wparams(const P3DWindowParams &wparams) {
|
|||||||
r.top = _wparams.get_win_y();
|
r.top = _wparams.get_win_y();
|
||||||
r.left = _wparams.get_win_x();
|
r.left = _wparams.get_win_x();
|
||||||
if (r.top == 0 && r.left == 0) {
|
if (r.top == 0 && r.left == 0) {
|
||||||
r.top = 250;
|
// These are the same defaults used by Panda's osxGraphicsWindow.
|
||||||
r.left = 210;
|
r.top = 50;
|
||||||
|
r.left = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
r.right = r.left + _wparams.get_win_width();
|
r.right = r.left + _wparams.get_win_width();
|
||||||
|
@ -191,9 +191,7 @@ new_stream(NPMIMEType type, NPStream *stream, bool seekable, uint16 *stype) {
|
|||||||
|
|
||||||
// We don't want the rest of this stream any more, but we can't
|
// We don't want the rest of this stream any more, but we can't
|
||||||
// just return NPERR_GENERIC_ERROR, though--that seems to freak
|
// just return NPERR_GENERIC_ERROR, though--that seems to freak
|
||||||
// out Mozilla. Instead, we'll "accept" it for now, and then
|
// out Firefox.
|
||||||
// immediately stop it when we get the first write_stream()
|
|
||||||
// call.
|
|
||||||
stream->notifyData = new PPDownloadRequest(PPDownloadRequest::RT_instance_data);
|
stream->notifyData = new PPDownloadRequest(PPDownloadRequest::RT_instance_data);
|
||||||
|
|
||||||
*stype = NP_NORMAL;
|
*stype = NP_NORMAL;
|
||||||
@ -255,11 +253,10 @@ write_stream(NPStream *stream, int offset, int len, void *buffer) {
|
|||||||
return len;
|
return len;
|
||||||
|
|
||||||
case PPDownloadRequest::RT_instance_data:
|
case PPDownloadRequest::RT_instance_data:
|
||||||
// Here's a stream we don't really want. But stopping it early
|
// Here's a stream we don't really want. But stopping it here
|
||||||
// seems to freak out Safari. (And stopping it before it starts
|
// seems to freak out Safari. (And stopping it before it starts
|
||||||
// freaks out Firefox.)
|
// freaks out Firefox.) Whatever. We'll just quietly ignore the
|
||||||
|
// data.
|
||||||
// Whatever. We'll just quietly ignore the data.
|
|
||||||
return len;
|
return len;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -301,8 +298,6 @@ destroy_stream(NPStream *stream, NPReason reason) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PPDownloadRequest::RT_instance_data:
|
case PPDownloadRequest::RT_instance_data:
|
||||||
// We won't get a url_notify on this one, so delete it now.
|
|
||||||
delete req;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -386,7 +386,6 @@ read_contents_file(Filename contents_filename, const string &download_url,
|
|||||||
ifstream in;
|
ifstream in;
|
||||||
contents_filename.set_text();
|
contents_filename.set_text();
|
||||||
if (!contents_filename.open_read(in)) {
|
if (!contents_filename.open_read(in)) {
|
||||||
cerr << "Couldn't read " << contents_filename.to_os_specific() << "\n";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user