Problems with demos

2008-02-18 Thread Alexander Vasiliev
I biult gtk+-2.10.13 with DirectFB1.1.1. Examples of DirectFB work
well. Gtk demos also work, but the image on the display is wrong. It
seems like width of image doesn't fit screen width and lines are
shifting. But for all that testpixbuf-drawable demo also works well.
Any suggestions about correcting it?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


question on using GtkCellRendererProgress

2008-02-18 Thread Gregory Hosler
-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 ?)

Many thanks, and kind regards,

- -Greg Hosler

- --
+-+

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

| Greg Hosler   [EMAIL PROTECTED]|
+-+
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHuYgz404fl/0CV/QRAjlhAJ96ppkA0y9Yn409ZBsZBEWXefXcrwCfZUtz
pELWyEtKVCc44NNBh/oNU+s=
=yKbS
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: question on using GtkCellRendererProgress

2008-02-18 Thread Gregory Hosler
-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   [EMAIL PROTECTED]|
+-+
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHuZW1404fl/0CV/QRAiiFAJ0YeqvnKtwF9TQ8zU246FP8gSm3jQCeJjSn
bhEeA5Qgknh4ubPjEGJHtkI=
=XCSx
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: question on using GtkCellRendererProgress

2008-02-18 Thread Mike Massonnet
On Mon, Feb 18, 2008 at 10:27:03PM +0800, Gregory Hosler wrote:
 -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.

There can be several columns just for a single cell renderer.
Those are the column numbers, I use the next enum for a gtk list store:

 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. :(

enum
{
  COLUMN_VALUE,
  COLUMN_TEXT,
  N_COLUMNS,
};

store = gtk_list_store_new (N_COLUMNS,
G_TYPE_INT,
G_TYPE_STRING);

cell = gtk_cell_renderer_progress_new ();
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
 -1, progress, cell,
 value, COLUMN_VALUE,
 text, COLUMN_TEXT,
 NULL);

GtkTreeIter iter;
gtk_list_store_append (store, iter);
gtk_list_store_set (store, iter,
COLUMN_VALUE, 40,
COLUMN_TEXT, blah, /* see 
http://library.gnome.org/devel/gtk/unstable/GtkCellRendererProgress.html#GtkCellRendererProgress--text
 */
-1);

VoilĂ , something that uses these function.

 thx, and best rgds,

 - -Greg

mike
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: question on using GtkCellRendererProgress

2008-02-18 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mike Massonnet wrote:
| On Mon, Feb 18, 2008 at 10:27:03PM +0800, Gregory Hosler wrote:
| -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.
|
| There can be several columns just for a single cell renderer.
| Those are the column numbers, I use the next enum for a gtk list store:
|
| 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. :(
|
| enum
| {
|   COLUMN_VALUE,
|   COLUMN_TEXT,
|   N_COLUMNS,
| };
|
| store = gtk_list_store_new (N_COLUMNS,
| G_TYPE_INT,
| G_TYPE_STRING);
|
| cell = gtk_cell_renderer_progress_new ();
| gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (treeview),
|  -1, progress, cell,
|  value, COLUMN_VALUE,
|  text, COLUMN_TEXT,
|  NULL);

Ahh. This was the part I was missing.

| GtkTreeIter iter;
| gtk_list_store_append (store, iter);
| gtk_list_store_set (store, iter,
| COLUMN_VALUE, 40,
| COLUMN_TEXT, blah, /* see
http://library.gnome.org/devel/gtk/unstable/GtkCellRendererProgress.html#GtkCellRendererProgress--text
*/
| -1);
|

And thanks for the reference above!

best rgds,

- -Greg

| VoilĂ , something that uses these function.
|
| thx, and best rgds,
|
| - -Greg
|
| mike


- --
+-+

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

| Greg Hosler   [EMAIL PROTECTED]|
+-+
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHuaGz404fl/0CV/QRAqryAJ9P6qb+2RV3kDn5QKeQF6YDmcesdACeO3IU
KXfS+HgzQuMqiCThwhZ/t5s=
=hkY4
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


how to tell if to GtkTreeIter's point to the same row, or not?

2008-02-18 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I have an application, where, to facilitate looks deep inside callbacks, I 
store the Iter
of a row as and when I gtk_list_store_append() it. This allows me to 
gtk_list_store_set()
using the saved iter, and it works quite well.

Now, I have a case, where I want to popup a popup-menu when the user clicks on 
a row.
So I attached a button-press-event to the gtk_tree_view. In my callback I do a
gtk_tree_view_get_path_at_pos(), and then I map the path to a row/iter using
gtk_tree_model_get_iter(). This appears to work fine, except that the iter I 
get returned
is not identical to the iter that was earlier saved when row was first
gtk_list_store_append()'ed (the stamp, and user_data are the same, the other 
fields differ).

I am using the saved iter to locate a private data structure relating to the 
row.

I suppose that I could g_object_set_data() a pointer to my private data 
structure insize
the iter, but that seems otherwise unnecessary. (My list private data 
structures have the
saved iter in them, so was just comparing the saved iter against the one from 
the
model_get_iter() returned iter.)

Is there a way to compare iter's, or am i better to store a g_object_set_data() 
inside the
iter to point to my private data structure ?

thanks and best rgds,

- -Greg

- --
+-+

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

| Greg Hosler   [EMAIL PROTECTED]|
+-+
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHumQo404fl/0CV/QRAnl3AJ4//YPUp7vcIel+4GLEDrxzEM6hXwCgwyp9
bxs/c6YQMQpFGplYRUO4GzY=
=+V6b
-END PGP SIGNATURE-
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list