Re: gtk message dialog doesn't close

2006-02-22 Thread Santhosh
>gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new(GTK_WINDOW(configure_window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Message"))); > >It's ok, but the when the button is clicked, the window doesn't closes. > You have to destroy the widget explicitly (after getting the r

gtk message dialog doesn't close

2006-02-22 Thread Alexandre
Hi, in my application, I need to send error messagens to the user. I want a window, with a text and a close button. I create it with: gtk_dialog_run(GTK_DIALOG(gtk_message_dialog_new(GTK_WINDOW(configure_window), GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Message"))); It

Re: OpenGL Zoom / Pan

2006-02-22 Thread Douglas Vechinski
Try taking a look at the shapes.c example that comes with the gtkglext package. There are different ways do to them and it sort of depends upon how you plan on setting up the scene/object to view how how you plan to view it. For example, if you are viewing an object and want to simulate a zoom i

Re: dealing with utf8 filenames

2006-02-22 Thread Brian J. Tarricone
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/22/2006 10:47 AM, Christian Neumair wrote: > Am Mittwoch, den 22.02.2006, 08:17 -0800 schrieb Alan M. Evans: >> On Wed, 2006-02-22 at 07:59, Christian Neumair wrote: >>> For the sake of readability, I'd rather use the following code: >>> >>> char

Syd Logan source code

2006-02-22 Thread Nimmo, William K @ TITAN
I apologize if this has been addressed previously. I have bought Syd Logan's book "GTK+ Programming in C". The link referenced in the book to obtain sample code is a dead link. Does anybody know where I can get the sample code? Thanks, Bill _

OpenGL Zoom / Pan

2006-02-22 Thread Philippe CHAUVAT
A little bit out of the list themas... but I wrote some program with gtkglext and would like to do some Zoom, Pan, Rotate things with mouse and/or keyboard. Does anyone know where to find some sample or tutorial about this ? Thanks in advance. Philippe _

Re: dealing with utf8 filenames

2006-02-22 Thread Alan M. Evans
On Wed, 2006-02-22 at 10:47, Christian Neumair wrote: > > > For the sake of readability, I'd rather use the following code: > > > > > > char **str; > > > > > > /* str[0]: basename > > >str[1]: extension */ > > > str = g_strsplit (filename, ".", 2); > > > > > > g_strfreev(str) > > > > Surely

Re: dealing with utf8 filenames

2006-02-22 Thread Christian Neumair
Am Mittwoch, den 22.02.2006, 08:17 -0800 schrieb Alan M. Evans: > On Wed, 2006-02-22 at 07:59, Christian Neumair wrote: > > Am Mittwoch, den 22.02.2006, 07:09 -0800 schrieb Alan M. Evans: > > > On Tue, 2006-02-21 at 16:25, Tor Lillqvist wrote: > > > > > Also, I don't think the string returned from

Re: dealing with utf8 filenames

2006-02-22 Thread Alan M. Evans
On Wed, 2006-02-22 at 07:59, Christian Neumair wrote: > Am Mittwoch, den 22.02.2006, 07:09 -0800 schrieb Alan M. Evans: > > On Tue, 2006-02-21 at 16:25, Tor Lillqvist wrote: > > > > Also, I don't think the string returned from g_utf8_casefold() is > > > > guaranteed to be the same length as the o

Re: clearing gtkliststore and gtktreestore

2006-02-22 Thread Christian Neumair
Am Donnerstag, den 16.02.2006, 14:18 -0500 schrieb devel: > I'm having problems with clearing a treestore and a liststore. > gtk_list_store_clear() and gtk_tree_store_clear() are clearing the > lists visually (can see this in the GUI, obviously), but appear to be > leaving "copies" behind and my me

Re: Application structuring with threads & network I/O - suggestions?

2006-02-22 Thread Christian Neumair
Am Freitag, den 17.02.2006, 22:04 -0500 schrieb Gorshkov: > I'm developing an small network application as a test case before I go on to > my main app - I want to make my mistakes on something small & manageable. > [...] Unfortunately, we can't do much about it without having seen code. My suspi

Re: dealing with utf8 filenames

2006-02-22 Thread Christian Neumair
Am Mittwoch, den 22.02.2006, 07:09 -0800 schrieb Alan M. Evans: > On Tue, 2006-02-21 at 16:25, Tor Lillqvist wrote: > > > Also, I don't think the string returned from g_utf8_casefold() is > > > guaranteed to be the same length as the original, so my calculation > > > for string length is incorre

Re: Not receiving input w/ multiple renderers in a TreeViewColumn

2006-02-22 Thread Christian Neumair
Am Mittwoch, den 22.02.2006, 01:48 -0600 schrieb Gabriel Burt: > In F-Spot we have a TreeView for showing all the tags. It has three > columns: a checkbox, an icon, and a name. > > I'm trying to put all three of these renderers into one column so the > hierarchy will expand nicer (instead of the

Re: Using: g_key_file_load_from_file() in homedir

2006-02-22 Thread Christian Neumair
Am Mittwoch, den 22.02.2006, 19:52 +0530 schrieb Santhosh: > > > everything works, but when changing the path to > "~/.DiamondBOX/Diamond.settings" > > I think "~/..." is converted to "home-dir" by the shell.. it may not > be supported by the GLIB API... > > Instead you can use glib functions to

Re: Using: gtk_button_set_image() gives small empty buttons

2006-02-22 Thread Christian Neumair
Am Mittwoch, den 22.02.2006, 12:45 +0100 schrieb Nikolaj Kiær Thygesen: > GtkWidget *button = gtk_button_new(); > gtk_button_set_image(GTK_BUTTON(button), > gtk_image_new_from_file(filename)); > gtk_widget_show(button); > > I can display the "gtk_image_new_from_file(filename)" widget on its > own,

Re: dealing with utf8 filenames

2006-02-22 Thread Alan M. Evans
On Tue, 2006-02-21 at 16:25, Tor Lillqvist wrote: > > Also, I don't think the string returned from g_utf8_casefold() is > > guaranteed to be the same length as the original, so my calculation > > for string length is incorrect. > > Umm, no? You look at the casefolded string and calculate the le

Re: strstr for g_strrstr?

2006-02-22 Thread Tristan Van Berkom
Juan Pablo wrote: should i use g_strrstr to do strstr search? definitely not, g_strrstr will find the laste occurence, strstr will find the first ! should i take into account something about the utf8 stuff?? Well that depends; are you displaying the charachters in this string ? are they tra

Re: Using: g_key_file_load_from_file() in homedir

2006-02-22 Thread Santhosh
> > everything works, but when changing the path to > "~/.DiamondBOX/Diamond.settings" I think "~/..." is converted to "home-dir" by the shell.. it may not be supported by the GLIB API... Instead you can use glib functions to get the home directory... I couldn't exactly recall the function... it

gtktextview pixmap background problem on scroll

2006-02-22 Thread Marko Ivancic
Hi, When gtktextview scroll text down/up it repaint only a small portion of my backgraund pixmap. When I move other window over gtktextview it normaly repaints the background pixmap and text. It's possible to validate all visible lines on scroll up/down to have the backgraund pixmap complete

Using: gtk_button_set_image() gives small empty buttons

2006-02-22 Thread Nikolaj Kiær Thygesen
Hi again, Another little problem of mine is that no matter what I seem to do, I can't get my buttons to contain small png's read from disk like this: GtkWidget *button = gtk_button_new(); gtk_button_set_image(GTK_BUTTON(button), gtk_image_new_from_file(filename)); gtk_widget_show(button)

Using: g_key_file_load_from_file() in homedir

2006-02-22 Thread Nikolaj Kiær Thygesen
Howdy list, In my program I'd like to store user private settings in the homedir of the current user in a Key_File. When loading the file this way: key_file = g_key_file_new(); g_key_file_load_from_file( key_file, "/home/nikolaj/.DiamondBOX

Re: displaying continuosly in entry widget

2006-02-22 Thread John Cupitt
Hi, you need a timeout rather than sleep(). Sleep will make your whole program (including screen repaint) stop for 3 seconds. A timeout will let your repaint continue while you wait. http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#id3076251 J On 2/22/06, shibu alampatta

Re: gtk_drag_finish: is really needed ?

2006-02-22 Thread Colossus
Colossus wrote: I'm in doubt if in the on_drag_data_received function I must use gtk_drag_finish since the code works with and without it. Today is the day of the self answers ! Yeah I must use it otherwise after a while I see the icon self dragging by itself ! -- Colossus Xarchiver, a Linux

displaying continuosly in entry widget

2006-02-22 Thread shibu alampatta
On pressing a button i wanted a list of text to be displayed on entry widget, on after the other ( in a for loop), with some delay, say sleep(3). but the problem is the last text only getting visible. if i increase the sleep argument then also the same. any help.? thanks in advance ___

Re: gtk_selection_data_get_uris and 'file://' problem

2006-02-22 Thread Colossus
Colossus wrote: Is there a Glib function who gives me back the filename without file:// ? As it always happens after sending the email I got the function: g_filename_from_uri, sorry ! -- Colossus Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.sourceforge.net Cpsed, a Linu

gtk_selection_data_get_uris and 'file://' problem

2006-02-22 Thread Colossus
Hi, I'm using gtk_selection_data_get_uris to have the filename of the files dragged into the mainwindow of my app. The problem is that the filename begins with file:// and obviously when I open it I get a no such file or directory error. Is there a Glib function who gives me back the filename

gtk_drag_finish: is really needed ?

2006-02-22 Thread Colossus
Hi, I set the mainwindow of my app as a drag dest: MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_drag_dest_set (MainWindow,GTK_DEST_DEFAULT_ALL,target_table,1,GDK_ACTION_COPY); g_signal_connect (G_OBJECT (MainWindow), "drag_data_received", G_CALLBACK (on_drag_data_received), NULL);