[Aptitude-devel] [PATCH 1 of 2] Hide progress cell for the "Download started" row in the Downloads page

Obey Arthur Liu arthur at milliways.fr
Fri Dec 26 13:13:30 UTC 2008


Luca Bruno a écrit :
> # HG changeset patch
> # User Luca Bruno <lethalman88 at gmail.com>
> # Date 1230223424 -3600
> # Node ID 0730a57a88401e1af8d14505c300d61a12519ed0
> # Parent  c188bfd4515f426032c59b9c7acd2b6d475e4ad6
> Hide progress cell for the "Download started" row in the Downloads page.
> 	* src/gtk/download.cc (download_list_model::Start): do not show the
> 	  progress with "Download started"
> 	(download_list_model::maybe_new_item): show the progress on a newly
> created list item
> 	(DownloadTab::DownloadTab): added "visible" attribute
> 	(DownloadColumns::DownloadColumns): add ProgressVisible model column
> 
> 	* src/gtk/download.h (DownloadColumns): declared new model column
> 	  ProgressVisible
> 
> diff --git a/src/gtk/download.cc b/src/gtk/download.cc
> --- a/src/gtk/download.cc
> +++ b/src/gtk/download.cc
> @@ -78,6 +78,7 @@
>        row[download_columns.URI] = Itm.URI;
>        row[download_columns.ShortDesc] = Itm.ShortDesc;
>        row[download_columns.Description] = Itm.Description;
> +      row[download_columns.ProgressVisible] = true;
>      }
>    }
>  
> @@ -104,6 +105,7 @@
>      Gtk::TreeModel::Row row = *store_iter;
>      row[download_columns.URI] = "";
>      row[download_columns.ShortDesc] = "";
> +    row[download_columns.ProgressVisible] = false;
>      row[download_columns.Description] = "Download started";
>    }
>  
> @@ -161,6 +163,7 @@
>      add(URI);
>      add(Status);
>      add(ProgressPerc);
> +    add(ProgressVisible);
>      add(ShortDesc);
>      add(Description);
>    }
> @@ -206,6 +209,7 @@
>        ProgressPerc->set_sizing(Gtk::TREE_VIEW_COLUMN_FIXED);
>        ProgressPerc->set_fixed_width(100);
>        ProgressPerc->add_attribute(progress_renderer->property_value(), download_columns.ProgressPerc);
> +      ProgressPerc->add_attribute(progress_renderer->property_visible(), download_columns.ProgressVisible);
>        treeview->append_column(*ProgressPerc);
>      }
>  
> diff --git a/src/gtk/download.h b/src/gtk/download.h
> --- a/src/gtk/download.h
> +++ b/src/gtk/download.h
> @@ -47,6 +47,7 @@
>        Gtk::TreeModelColumn<Glib::ustring> URI;
>        Gtk::TreeModelColumn<Glib::ustring> Status;
>        Gtk::TreeModelColumn<int> ProgressPerc;
> +      Gtk::TreeModelColumn<bool> ProgressVisible;
>        Gtk::TreeModelColumn<Glib::ustring> Description;
>        Gtk::TreeModelColumn<Glib::ustring> ShortDesc;

Hi,

Since Daniel is on Christmas-related vacation, I'm going to handle this.
Thank you for this patch. These progress cells that always displayed 0%
always bothered me, but not enough to come up with a patch (me, lazy..).

Arthur


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.alioth.debian.org/pipermail/aptitude-devel/attachments/20081226/5b0e173d/attachment-0001.pgp 


More information about the Aptitude-devel mailing list