aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-05-21 06:43:09 +0800
committerChristian Persch <chpe@src.gnome.org>2004-05-21 06:43:09 +0800
commitc47ab000bf17336ea1b862977a781c4dfd48e7a9 (patch)
treebfa236d6c8b84e823cd6718e4b0a80e3ed267b6f
parentc62226f7741fc863ca0fc5222f631790b19f15b6 (diff)
downloadgsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar.gz
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar.bz2
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar.lz
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar.xz
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.tar.zst
gsoc2013-epiphany-c47ab000bf17336ea1b862977a781c4dfd48e7a9.zip
Elimiate indeterminate progress, fixes bugs #142303 and #142305.
2004-05-21 Christian Persch <chpe@cvs.gnome.org> * src/ephy-statusbar.c: (ephy_statusbar_set_progress): * src/ephy-tab.c: (ephy_tab_class_init), (build_load_percent), (ephy_tab_net_state_cb), (ephy_tab_get_load_percent): Elimiate indeterminate progress, fixes bugs #142303 and #142305.
-rw-r--r--ChangeLog8
-rwxr-xr-xsrc/ephy-statusbar.c14
-rw-r--r--src/ephy-tab.c14
3 files changed, 16 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 782250679..c76b7f741 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-05-21 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-statusbar.c: (ephy_statusbar_set_progress):
+ * src/ephy-tab.c: (ephy_tab_class_init), (build_load_percent),
+ (ephy_tab_net_state_cb), (ephy_tab_get_load_percent):
+
+ Elimiate indeterminate progress, fixes bugs #142303 and #142305.
+
2004-05-20 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-history.c: (ephy_history_set_property),
diff --git a/src/ephy-statusbar.c b/src/ephy-statusbar.c
index a3b62e575..1e8d22259 100755
--- a/src/ephy-statusbar.c
+++ b/src/ephy-statusbar.c
@@ -227,8 +227,7 @@ ephy_statusbar_set_security_state (EphyStatusbar *statusbar,
/**
* ephy_statusbar_set_progress:
* @statusbar: a #EphyStatusbar
- * @progress: the progress as an integer between 0 and 100, or -1 to show
- * interminate progress
+ * @progress: the progress as an integer between 0 and 100 per cent.
*
* Sets the statusbar's progress.
**/
@@ -236,15 +235,8 @@ void
ephy_statusbar_set_progress (EphyStatusbar *statusbar,
int progress)
{
- if (progress == -1)
- {
- gtk_progress_bar_pulse (GTK_PROGRESS_BAR (statusbar->priv->progressbar));
- }
- else
- {
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (statusbar->priv->progressbar),
- (float) (progress) / 100.0);
- }
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (statusbar->priv->progressbar),
+ (float) (progress) / 100.0);
if (progress < 100)
{
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 63df67cdd..1ef36aae6 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -307,7 +307,7 @@ ephy_tab_class_init (EphyTabClass *class)
g_param_spec_int ("load-progress",
"Load progress",
"The tab's load progress in percent",
- -1,
+ 0,
100,
0,
G_PARAM_READABLE));
@@ -762,7 +762,7 @@ ephy_tab_title_cb (EphyEmbed *embed, EphyTab *tab)
static int
build_load_percent (int requests_done, int requests_total)
{
- int percent;
+ int percent= 0;
if (requests_total > 0)
{
@@ -772,10 +772,6 @@ build_load_percent (int requests_done, int requests_total)
total requests. Their progress widget clamp the value */
percent = CLAMP (percent, 0, 100);
}
- else
- {
- percent = -1;
- }
return percent;
}
@@ -913,7 +909,7 @@ ephy_tab_net_state_cb (EphyEmbed *embed, const char *uri,
tab->priv->cur_requests = 0;
ensure_page_info (tab, embed, uri);
- ephy_tab_set_load_percent (tab, -1);
+ ephy_tab_set_load_percent (tab, 0);
ephy_tab_set_load_status (tab, TRUE);
ephy_tab_update_navigation_flags (tab, embed);
}
@@ -1322,12 +1318,12 @@ ephy_tab_set_load_percent (EphyTab *tab, int percent)
*
* Returns the page load percentage (displayed in the progressbar).
*
- * Return value: a percentage from 0 to 100, or -1 for indeterminate.
+ * Return value: a percentage from 0 to 100.
**/
int
ephy_tab_get_load_percent (EphyTab *tab)
{
- g_return_val_if_fail (EPHY_IS_TAB (tab), -1);
+ g_return_val_if_fail (EPHY_IS_TAB (tab), 0);
return tab->priv->load_percent;
}