aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-28 03:42:55 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-28 03:42:55 +0800
commit78fc10863afdecaee83eaa18c9766fffd5dd9e23 (patch)
treeccab86f5d0fdedc94ff6da64cf5bb3888d80c865
parenta0393b9cd91a4978bcae1e757d520d158b8b2610 (diff)
downloadgsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar.gz
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar.bz2
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar.lz
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar.xz
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.tar.zst
gsoc2013-epiphany-78fc10863afdecaee83eaa18c9766fffd5dd9e23.zip
Remove an useless check.
2004-02-27 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozDownload.h: Remove an useless check. * lib/ephy-state.c: (ephy_state_window_set_size): Make sure window is never bigger than screen.
-rw-r--r--ChangeLog11
-rw-r--r--embed/mozilla/MozDownload.cpp12
-rw-r--r--embed/mozilla/MozDownload.h1
-rw-r--r--lib/ephy-state.c12
4 files changed, 22 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 239d55c3e..7aed6efc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2004-02-27 Marco Pesenti Gritti <marco@gnome.org>
+
+ * embed/mozilla/MozDownload.cpp:
+ * embed/mozilla/MozDownload.h:
+
+ Remove an useless check.
+
+ * lib/ephy-state.c: (ephy_state_window_set_size):
+
+ Make sure window is never bigger than screen.
+
2004-02-27 Christian Persch <chpe@cvs.gnome.org>
* configure.in:
diff --git a/embed/mozilla/MozDownload.cpp b/embed/mozilla/MozDownload.cpp
index f6a592d6d..b3cc63ec8 100644
--- a/embed/mozilla/MozDownload.cpp
+++ b/embed/mozilla/MozDownload.cpp
@@ -64,8 +64,6 @@ const char* const persistContractID = "@mozilla.org/embedding/browser/nsWebBrows
MozDownload::MozDownload() :
mMaxSize(-1),
- mGotFirstStateChange(false),
- mIsNetworkTransfer(false),
mStatus(NS_OK),
mEmbedPersist(nsnull),
mDownloadState(EPHY_DOWNLOAD_DOWNLOADING)
@@ -272,19 +270,11 @@ MozDownload::OnStateChange (nsIWebProgress *aWebProgress, nsIRequest *aRequest,
{
nsresult rv;
- /* For a file download via the external helper app service, we will never get a start
- notification. The helper app service has gotten that notification before it created us. */
- if (!mGotFirstStateChange)
- {
- mIsNetworkTransfer = ((aStateFlags & STATE_IS_NETWORK) != 0);
- mGotFirstStateChange = PR_TRUE;
- }
-
if (NS_FAILED(aStatus) && NS_SUCCEEDED(mStatus))
mStatus = aStatus;
/* We will get this even in the event of a cancel */
- if ((aStateFlags & STATE_STOP) && (!mIsNetworkTransfer || (aStateFlags & STATE_IS_NETWORK)))
+ if (aStateFlags & STATE_STOP)
{
/* Keep us alive */
nsCOMPtr<nsIDownload> kungFuDeathGrip(this);
diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h
index e7f51b2e0..ad5cfb169 100644
--- a/embed/mozilla/MozDownload.h
+++ b/embed/mozilla/MozDownload.h
@@ -124,7 +124,6 @@ protected:
PRInt32 mCurrentProgress;
PRInt32 mMaxSize;
- bool mGotFirstStateChange, mIsNetworkTransfer;
nsresult mStatus;
nsCOMPtr<nsIObserver> mObserver;
diff --git a/lib/ephy-state.c b/lib/ephy-state.c
index 9c2abb7d0..d0bf34d31 100644
--- a/lib/ephy-state.c
+++ b/lib/ephy-state.c
@@ -130,8 +130,16 @@ ephy_state_window_set_size (GtkWidget *window, EphyNode *node)
if (size)
{
- gtk_window_set_default_size
- (GTK_WINDOW (window), width, height);
+ GdkScreen *screen;
+ int screen_width, screen_height;
+
+ screen = gdk_screen_get_default ();
+ screen_width = gdk_screen_get_width (screen);
+ screen_height = gdk_screen_get_height (screen);
+
+ gtk_window_set_default_size (GTK_WINDOW (window),
+ MIN (width, screen_width),
+ MIN (height, screen_height));
}
if (maximize)