Re: How to determine Script from given Unicode text?

2005-10-21 Thread Gaurav Jain
Hi Neelesh, Yes indeed, that should serve my purpose, but unfortunately I'm using Gtk 2.4. I'll check to see how 2.6 is implementing it... Thanks, Gaurav --- Neelesh Bodas <[EMAIL PROTECTED]> wrote: > You may find this useful > http://www.gtk.org/api/2.6/pango/pango-Scripts.html#pango-script-f

Re: Reference Book

2005-10-21 Thread MEA-Mike.Friedrichs
Thanks, I just ordered the book! MikeF - Original Message - From: "John Cupitt" <[EMAIL PROTECTED]> To: "MEA-Mike.Friedrichs" <[EMAIL PROTECTED]> Cc: Sent: Friday, October 21, 2005 8:55 PM Subject: Re: Reference Book On 10/22/05, MEA-Mike.Friedrichs <[EMAIL PROTECTED]> wrote: > I've

Re: Reference Book

2005-10-21 Thread John Cupitt
On 10/22/05, MEA-Mike.Friedrichs <[EMAIL PROTECTED]> wrote: > I've been searching for reference books that address gtk 2.x and I can't find > anything. Does anyone have some knowledge of a reference book for 2.x??? The gnome2 guide has a lot of material on gtk2, gobject, glib etc. The Official

Reference Book

2005-10-21 Thread MEA-Mike.Friedrichs
List, I've been searching for reference books that address gtk 2.x and I can't find anything. Does anyone have some knowledge of a reference book for 2.x??? Thanks, MikeF ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gn

RE: How to determine Script from given Unicode text?

2005-10-21 Thread Liam R E Quin
On Fri, 2005-10-21 at 10:50 -0700, Gaurav Jain wrote: [...] > I have a > unicode character, and I need to find out what script > it belongs to. Is it possible to determine this using > a single Unicode character? In general no, because a single Unicode character can belong to more than one scrip

gtk_text_buffer_insert_at_cursor in "insert-text"

2005-10-21 Thread Michael Matthews
Hi! I am trying to insert tab characters into a GtkTextView using gtk_text_buffer_insert_at_cursor from within the "insert-text" signal handler so that my text editor can support automatic indentation. gtk_text_buffer_insert_at_cursor ( instance ()._data,

RE: How to determine Script from given Unicode text?

2005-10-21 Thread Gaurav Jain
Hi John, Sorry about the mis-statement. In my case I have a unicode character, and I need to find out what script it belongs to. Is it possible to determine this using a single Unicode character? Thanks, Gaurav --- "Boncek, John" <[EMAIL PROTECTED]> wrote: > This is not a well-defined problem.

Re: 4-space tabs in GtkTextView

2005-10-21 Thread John Cupitt
Ooops, I need stronger specs, you wanted to get the size of four spaces. I'd try this (untested) after setting the mono font. PangoLayout *layout; int width, height; layout = gtk_widget_create_pango_layout( program->text, "" ); pango_layout_get_pixel_size( layo

Re: regarding Colors

2005-10-21 Thread Neelesh Bodas
gtk_widget_modify_bg() and similar calls will do precisely what you want - http://www.gtk.org/api/2.6/gtk/GtkWidget.html#id3602520 Hope this helps ~Neelesh On 10/21/05, Prabhakar Kushwaha <[EMAIL PROTECTED]> wrote: > > hi everybody > > i want to know that > > is there is any mehtod to chang col

Re: How to determine Script from given Unicode text?

2005-10-21 Thread Neelesh Bodas
You may find this useful http://www.gtk.org/api/2.6/pango/pango-Scripts.html#pango-script-for-unichar There is a function called pango_script_for_unichar() which does precisely what you want. it is supported from version 2.6 onwards. Thanks Neelesh On 10/21/05, Gaurav Jain <[EMAIL PROTECTED]>

Re: 4-space tabs in GtkTextView

2005-10-21 Thread John Cupitt
Hi Michael, On 10/21/05, Michael Matthews <[EMAIL PROTECTED]> wrote: > How do I change the default tabs from 8-space to 4-space? I use the following: static PangoTabArray * program_tabs_new( void ) { const int ntabs = 20; const int tab_width = 15; /* in pixels */ P

FW: How to determine Script from given Unicode text?

2005-10-21 Thread Boncek, John
This is not a well-defined problem. What if your text contains Thai, Latin, Hebrew, and Japanese? How could any function return a single script in that case? Regards, John Boncek [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gaurav

4-space tabs in GtkTextView

2005-10-21 Thread Michael Matthews
Hi! How do I change the default tabs from 8-space to 4-space? I am using the following code: // change the widget font to fixed width PangoFontDescription* font = pango_font_description_from_string ( "Courier, Bitstream Vera Sans Mono, Nimbus Mono L, monospace 12" ); gtk_wid

How to determine Script from given Unicode text?

2005-10-21 Thread Gaurav Jain
Hi, I need to find a way to determine the "best script" corresponding to a given Unicode string/char. For example, if I have some unicode text containing Thai characters, I want to be able to say that it is "thai". And if the text contains latin characters, I need to be able to say it is "latin"

Re: regarding Colors

2005-10-21 Thread Andreas Stricker
Prabhakar Kushwaha wrote: i want to know that is there is any mehtod to chang color of Widgets other than style which is done by writing in $HOME/.rc Yes, you can programmatically change the style (and therefore the color of the style as well). RTFM: http://developer.gnome.org/doc/API/2.0/gtk/

regarding Colors

2005-10-21 Thread Prabhakar Kushwaha
hi everybody i want to know that is there is any mehtod to chang color of Widgets other than style which is done by writing in $HOME/.rc can we use gtk_color_parse() for it also give me example code regards _ Marriages are made

Re: restore size/position of gtk window

2005-10-21 Thread Tor Lillqvist
Allin Cottrell writes: > Is this on Windows, and does it still work if the window is > maximized when the user exits the program? Thanks. At least for GIMP, if one maximizes the GIMP main window (the one with the toolbox) (which of course is pretty silly as such, but just for testing) and then

Re: restore size/position of gtk window

2005-10-21 Thread Allin Cottrell
On Fri, 21 Oct 2005, Eduardo M KALINOWSKI wrote: In my app, I store the values returned by gtk_window_get_position() and gtk_window_get_size() before the program exits, and then on startup read them from the configuration file and use gtk_window_move() and gtk_window_resize() with the same va

Re: restore size/position of gtk window

2005-10-21 Thread Eduardo M KALINOWSKI
Allin Cottrell wrote: > I posted on this topic a few days ago and didn't get a response. Now > I'm trying a more specific variant of my question after doing some > testing. > > What I'd like is for my gtk app to "remember" the size and position of > its main window from one session to another (at

Re: A Question about GtkTreeSortable

2005-10-21 Thread Iago Rubio
On Thu, 2005-10-20 at 17:44 +0200, Iago Rubio wrote: [snip] > gint > your_tree_iter_compare_func (GtkTreeModel *model, > GtkTreeIter *a, > GtkTreeIter *b, > gpointer user_data) > { > GtkTreePath* path_