From 57730e8161a159fdb5a38b9dd0d19dda3bdde8e5 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 1 Nov 2004 14:39:24 +0000 Subject: Remove seconds remaining display from tooltip of tray icon. Fixes bug 2004-11-01 Christian Persch * embed/downloader-view.c: (update_status_icon): Remove seconds remaining display from tooltip of tray icon. Fixes bug #145955. --- ChangeLog | 7 +++++++ embed/downloader-view.c | 52 +++---------------------------------------------- 2 files changed, 10 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1f466e5f..ead73d540 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-11-01 Christian Persch + + * embed/downloader-view.c: (update_status_icon): + + Remove seconds remaining display from tooltip of tray icon. + Fixes bug #145955. + 2004-11-01 Christian Persch * configure.ac: 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, @@ -373,44 +365,11 @@ update_download_row (DownloaderView *dv, EphyDownload *download) update_buttons (dv); } -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 -- cgit v1.2.3