diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-05-21 06:43:09 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-05-21 06:43:09 +0800 |
commit | c47ab000bf17336ea1b862977a781c4dfd48e7a9 (patch) | |
tree | bfa236d6c8b84e823cd6718e4b0a80e3ed267b6f /src/ephy-tab.c | |
parent | c62226f7741fc863ca0fc5222f631790b19f15b6 (diff) | |
download | gsoc2013-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.
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r-- | src/ephy-tab.c | 14 |
1 files changed, 5 insertions, 9 deletions
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; } |