diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-11-11 00:36:25 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-11-11 00:36:25 +0800 |
commit | 9dfacae0cdadd0125e80fca0b253c80b227839ab (patch) | |
tree | 5507e2cc8c084daf58afb13440db9b905abc70c9 /embed | |
parent | 0d02edbb22c34cb936accb0cab05d9d30694a559 (diff) | |
download | gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar.gz gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar.bz2 gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar.lz gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar.xz gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.tar.zst gsoc2013-epiphany-9dfacae0cdadd0125e80fca0b253c80b227839ab.zip |
Remove the remaining time string from tray icon trooltip. Fixes bug #
2004-11-10 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (update_status_icon):
Remove the remaining time string from tray icon trooltip.
Fixes bug # 145955.
Diffstat (limited to 'embed')
-rw-r--r-- | embed/downloader-view.c | 52 |
1 files changed, 3 insertions, 49 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c index fd6611716..9ffee7eeb 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -76,16 +76,8 @@ struct DownloaderViewPrivate GtkWidget *abort_button; EggStatusIcon *status_icon; - - long remaining_secs; }; -typedef struct -{ - gboolean is_paused; - DownloaderViewPrivate *priv; -} ControlsInfo; - enum { PROP_WINDOW, @@ -378,43 +370,10 @@ update_download_row (DownloaderView *dv, EphyDownload *download) } static void -seconds_remaining_total (EphyDownload *download, gpointer data, DownloaderView *dv) -{ - long secs; - - secs = ephy_download_get_remaining_time (download); - if (secs > 0) - { - dv->priv->remaining_secs += secs; - } -} - -static void update_status_icon (DownloaderView *dv) { - char *tooltip, *downloadstring, *remainingstring; - int downloads, remaining; - - dv->priv->remaining_secs = 0; - g_hash_table_foreach (dv->priv->downloads_hash, - (GHFunc) seconds_remaining_total, dv); - - remaining = (dv->priv->remaining_secs); - - if (remaining < 60) - { - remainingstring = g_strdup_printf (ngettext ("About %d second left", - "About %d seconds left", remaining), - remaining); - } - else - { - remaining /= 60; - - remainingstring = g_strdup_printf (ngettext ("About %d minute left", - "About %d minutes left", remaining), - remaining); - } + char *downloadstring; + int downloads; downloads = g_hash_table_size (dv->priv->downloads_hash); @@ -422,15 +381,10 @@ update_status_icon (DownloaderView *dv) "%d downloads", downloads), downloads); - tooltip = g_strdup_printf ("%s\n%s", - downloadstring, remainingstring); - egg_status_icon_set_tooltip (dv->priv->status_icon, - tooltip, NULL); + downloadstring, NULL); - g_free (tooltip); g_free (downloadstring); - g_free (remainingstring); } static void |