diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-11-01 22:39:24 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-11-01 22:39:24 +0800 |
commit | 57730e8161a159fdb5a38b9dd0d19dda3bdde8e5 (patch) | |
tree | 3cbc70d2271faa923f2dd2d9469e90a539f016e2 /embed | |
parent | a9f5f6a3a6f6de18242e6e0e89b93bfa70e1a535 (diff) | |
download | gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar.gz gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar.bz2 gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar.lz gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar.xz gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.tar.zst gsoc2013-epiphany-57730e8161a159fdb5a38b9dd0d19dda3bdde8e5.zip |
Remove seconds remaining display from tooltip of tray icon. Fixes bug
2004-11-01 Christian Persch <chpe@cvs.gnome.org>
* embed/downloader-view.c: (update_status_icon):
Remove seconds remaining display from tooltip of tray icon.
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 040d4cbda..1b47227c7 100644 --- a/embed/downloader-view.c +++ b/embed/downloader-view.c @@ -77,16 +77,8 @@ struct DownloaderViewPrivate GtkWidget *abort_button; EggStatusIcon *status_icon; - - long remaining_secs; }; -typedef struct -{ - gboolean is_paused; - DownloaderViewPrivate *priv; -} ControlsInfo; - enum { PROP_WINDOW, @@ -374,43 +366,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); @@ -418,15 +377,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 |