Re: question on using GtkCellRendererProgress



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Massonnet wrote:
| On Mon, Feb 18, 2008 at 09:29:26PM +0800, Gregory Hosler wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Hi all,
|>
|> I've got a gtk_list_store, and one of the columns I want to make a progress meter.
|>
|> I'm gathering that I use teh cell rendered GtkCellRendererProgress for this column. But I
|> have 2 points of confusion.
|>
|> 1) When I create the table (gtk_list_store_new()), what is the G_TYPE I use for this
|> particular column defn ?
|>
|> 2) How do I refer to this column in a gtk_list_store_set() (i.e. yes, I know I refer to
|> the column number, but what do I pass in for a value ?)
|
| Progress bars have two properties: value and text.  value should be of
| G_TYPE_INT, while text is STRING and can print text onto the progress
| bar.
|
| You can then set the values with:
| gtk_list_store_set (..., COLUMN_PERCENT, new_value, COLUMN_TEXT, new_text);

confusion again... :( COLUMN_PERCENT, and COLUMN_TEXT -- would these be the same column or
different columns. The progress bar is only 1 column, as I understand.

With your above example, what would my gtk_list_store_new() look like ? 2 columns for the
progress bar ?

any code snippets for the column(s) creation ?

(or code / projects that you know use this ? (I can look it up if I know the project... :)

I looked at Pidghin, but they created their own custom cell render class. I really prefer
not to do that. :(

thx, and best rgds,

- -Greg


|> Many thanks, and kind regards,
|>
|> - -Greg Hosler
|
| HTH,
| mike


- --
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
                (from /var/log/Xorg.setup.log)

| Greg Hosler                                   ghosler redhat com    |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHuZW1404fl/0CV/QRAiiFAJ0YeqvnKtwF9TQ8zU246FP8gSm3jQCeJjSn
bhEeA5Qgknh4ubPjEGJHtkI=
=XCSx
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]