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);

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

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

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

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

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,

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));

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

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 could

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

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 length of

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, and it

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 get the home

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

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 memory

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 original,

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 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 that won't work if there is

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

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 **str; /*

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

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)));

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