gtk_ctree_node_get_text bug?

2000-11-01 Thread Esquibel, Rick

There appears to be a bug in the gtk_ctree_node_get_text function when a 
GtkCTree is defined with only one column.  More specifically, this statement
in gtk_ctree_node_get_text() will return 0 when column = 0.

   if (column < 0 || column >= GTK_CLIST (ctree)->columns)
 return 0;

Others have used the GTK_CELL_TEXT macro to resolve this bug when the
ctree_tree_select_row signal is used (see below).

void 
ctree_tree_select_row(GtkCTree *ctree, 
   GList *node, 
   gint column, 
   gpointer user_data)
{
  gchar *text = NULL;

  text = GTK_CELL_TEXT (GTK_CTREE_ROW (node)->row.cell[column])->text;
}


Is this bug going to be fixed in the next release of Gtk+?


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: gchar to char

2000-11-16 Thread Esquibel, Rick

While gchar is defined as a char, I've run into this problem as well.
However, I've cast the gchar to a char to "fix:" the problem.  For example:

gchar cf[3] = {"100"};
float ff = 0.0;

ff = atof((const char *)cf);

As a result: ff = 100.0.

Hope this helps, good luck...


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



OpenGL

2000-12-07 Thread Esquibel, Rick

Hello Everyone,

Does Gtk+ or will GTK+ support OpenGL ?

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



RE: Pixmaps/Bitmaps

2001-02-21 Thread Esquibel, Rick

Here is some sample code using gdk_pixmap_colormap_create_from_xpm():

  
  GdkPixmap *close = NULL;
  GdkPixmap *open = NULL;
  GdkBitmap *transparent;

  /*-
  -- Create Pixmap from a file.
  ---*/

  close = gdk_pixmap_colormap_create_from_xpm(NULL,
gdk_colormap_get_system(), 
 &transparent, NULL, "../pixmaps/dir.xpm");

  open = gdk_pixmap_colormap_create_from_xpm(NULL,
gdk_colormap_get_system(), 
  &transparent, NULL, "../pixmaps/info.xpm");

Hope that helps...


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: GtkText Problems Update

2001-03-08 Thread Esquibel, Rick

You can also use gtk_text_get_length(GTK_TEXT(text)) to get the number of
characters.

Cheers.
Rick Esquibel
Embedded Software/Engineer
5000 E. McDowell Road
Mesa, AZ 85215-9797
(480) 891-8423
[EMAIL PROTECTED]

> --
> From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]]
> Reply To: [EMAIL PROTECTED]
> Sent: Thursday, March 08, 2001 2:35 AM
> To:   [EMAIL PROTECTED]
> Subject:  gtk-list digest, Vol 1 #378 - 20 msgs
> 
> Send gtk-list mailing list submissions to
>   [EMAIL PROTECTED]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://mail.gnome.org/mailman/listinfo/gtk-list
> or, via email, send a message with subject or body 'help' to
>   [EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>   [EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gtk-list digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: GtkText Problems Update ([EMAIL PROTECTED])
>   2. Re: drawing speed under Windows (Ron Steinke)
>   3. Re: Position of TOP_LEVEL window (Havoc Pennington)
>   4. Re: drawing speed under Windows (Havoc Pennington)
>   5. gammaCurve resetting (Elie Jamaa)
>   6. Re: drawing speed under Windows (Deborah Swayne)
>   7. Re: drawing speed under Windows (Havoc Pennington)
>   8. Re: drawing speed under Windows ([EMAIL PROTECTED])
>   9. Re: drawing speed under Windows (Havoc Pennington)
>   10. RE: GtkText Problems Update (Dugas, Alan)
>   11. A question on GtkText bindings (Eamonn Martin Galvin)
>   12. How to access to a check button label (Germano Rizzo)
>   13. Re: How to access to a check button label (Jeff Shipman)
>   14. Re: Position of TOP_LEVEL window (porte cyril)
>   15. Re: How to access to a check button label (Germano Rizzo)
>   16. Re: How to access to a check button label (Sven Neumann)
>   17. Re: [Slashem-devel] Re: GTK+-1.2.9 Released (Peter Makholm)
>   18. Re: GTK+-1.2.9 Released (Dave Benson)
>   19. Re: GTK+-1.2.9 Released (J. Ali Harlow)
>   20. normal button labels ([EMAIL PROTECTED])
> 
> --__--__--
> 
> Message: 1
> Date: Wed, 07 Mar 2001 12:04:42 -0500
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: GtkText Problems Update
> 
> Ignore the last question. I figured it out I hope.
> 
> 
> char *temp = gtk_editable_get_chars( GTK_EDITABLE( text ), 0, -1);
> int size = strlen(temp);
> gtk_text_backward_delete( GTK_TEXT( text ), size );
> 
> I think that this should work.
> Is there a better way.
> 
> 
> [EMAIL PROTECTED] wrote:
> >
> > Hello.
> >  I am having a problem with GtkText. I have a Text Box, which is
> updated bu a function finding errors in a script. If errors are found a
> dialog box appears with all the errors in the Text Box. If I close this
> dialog box, and try to parse the script again, naturally it should have
> the same errors and does, however the errors are added on to the end of
> the existing information in the text box, meaning that the smae errors are
> printed twice. I want the Text Box to be cleared before each parseing. I
> tried gtk_entry_set_text() but it would not accept the typecasting of a
> GtkText to GtkEntry. 
> > I then tried gtk_text_backward_delete(), however I do not know how
> many characters will be in the textBox, therefore cannot specify this. I
> tried setting a very high value such as 1, but this didn't work. I
> also tried -1, thinking that it might mean delete all character as in
> gtk_text_insert, which also didnt work.
> > 
> > Any ideas how I can empyt the TextBox.
> > Thanks
> > 
> > Ciaran
> > __
> > Get your own FREE, personal Netscape Webmail account today at
> http://webmail.netscape.com/
> > 
> > ___
> > gtk-list mailing list
> > [EMAIL PROTECTED]
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> > 
> __
> Get your own FREE, personal Netscape Webmail account today at
> http://webmail.netscape.com/
> 
> 
> --__--__--
> 
> Message: 2
> Date: Wed, 07 Mar 2001 07:29:19 -0800
> To: [EMAIL PROTECTED], [EMAIL PROTECTED]
> Subject: Re: drawing speed under Windows
> Cc: [EMAIL PROTECTED]
> <[EMAIL PROTECTED]>
> From: Ron Steinke <[EMAIL PROTECTED]>
> 
> > From: Havoc Pennington <[EMAIL PROTECTED]>
> >
> > Deborah Swayne <[EMAIL PROTECTED]> writes:
> > > 
> > > The use of plural drawing routines (draw_points instead of
> > > draw_point, etc) improves drawing speed **twenty-fold** for
> > > Windows versions of gtk programs.
> >
> > The reason draw_points() etc. have never been included is that the
> > patch has always been for X11. Under X, multiple draw_point() requests
> > in a row get compressed by Xlib anyhow, so draw_points() is not faster
> > in any way.
> >
> > On Windows, the first and best option would be to do something
> > similar, i.e. transparently do the compr

RE: Save CTree to file?

2001-03-23 Thread Esquibel, Rick

Try using XML or an ASCII file using dot notation (i.e.
parent.node1.node2.node3.node4).

Cheers.
Rick Esquibel
Embedded Software/Engineer
5000 E. McDowell Road
Mesa, AZ 85215-9797
(480) 891-8423
[EMAIL PROTECTED]



___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list