Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 235600 - properties of cell renderer are not recognized by g_object_set
Summary: properties of cell renderer are not recognized by g_object_set
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-07 18:37 UTC by Need Real Name
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-08 23:29:23 UTC

Attachments (Terms of Use)

Description Need Real Name 2007-04-07 18:37:56 UTC
Description of problem: g_object_set will recognize some properties of
cell_renderer_text but not others.  Specifically, alignment, width-chars, rise,
xalign, and scale did not work when inserted with g_object_set().  May be others
that do or do not work -- I did not try all.  All should work.  GTK2 version
with FC6 used is 2.10.8-1.

Version-Release number of selected component (if applicable):

How reproducible: Code in program with gtk_tree_view list.  Attempt to set
properties on cell created with gtk_cell_renderer_text,

  namecell = gtk_cell_renderer_text_new ();
   // g_object_set(G_OBJECT(namecell),"alignment",2,NULL);  // Doesn't work!!!
  g_object_set(G_OBJECT(namecell),"alignment",PANGO_ALIGN_RIGHT,NULL);  //
Doesn't work!!!
   namecol = gtk_tree_view_column_new_with_attributes ("Vendor\n  Name",
namecell, "text", 1, NULL);
   gtk_tree_view_column_set_alignment (namecol, .5); // centers the col heading
- works OK
   gtk_tree_view_append_column (GTK_TREE_VIEW (list_view), GTK_TREE_VIEW_COLUMN

Steps to Reproduce:
1.Code as above. (or, if this is not right, as it should be.)
Actual results: Does not work, default alignment is left and is not effected.

Expected results: Expect alignment to be either right or center depending on

Additional info:  Cell alignment is supposed to be new property in gtk2-2.10. . .

Comment 1 Need Real Name 2007-04-07 18:41:32 UTC
All other aspects of creating a list and filling cells with data work OK as far
as I have tried.  Above code snippet is for reference only and is not complete
list code.

Comment 2 Matthias Clasen 2007-04-08 23:29:23 UTC
Please file this as an upstream bug in

Note You need to log in before you can comment on or make changes to this bug.