Re: GtkTreeView, the activate signal and dialogs don't interoperate well
On Tue, May 27, 2003 at 11:25:28AM -0400, Owen Taylor wrote: On Tue, 2003-05-27 at 10:01, René Seindal wrote: Hi, I have run into a problem with a GtkTreeView. A small demonstration program is included below. I have a GtkTreeView which is reorderable. I have attached a function to the row_activated signal that pops up a dialog. When the dialog is closed and the mouse re-enteres the TreeView, it behaves as if a drag has been initated to reorder the entries of the view. It looks like a bug to me. Also, the rows-reordered signal is never emitted on the TreeModel. This is with gtk+ 2.2.1 from Debian testing/unstable. Calling gtk_dialog_run() out of many sorts of callback a bit dangerous. (GtkButton::clicked and GtkMenuItem::activate are pretty safe) I think the problem is that your modal dialog is eating the button release, so GTK+ gets confused. You'll have better luck if you, say add an idle function (g_idle_add()) that does that action. I have tried this and it makes no difference. Apparently the idle function gets to run before the button release is sent to the TreeView. I have also tried with a timeout, and it seems to work if the timeout is on the order of 100ms, but that is going to be dependent on computer speed and load. Also it doesn't matter if the dialog is modal or not. That being said, GtkTreeView could probably do better, so it wouldn't hurt to file a bug. (bugzilla.gnome.org, see instructions in the GTK+ README.) I will. -- René Seindal ([EMAIL PROTECTED])http://sights.seindal.dk/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Gtk-WARNING, How to fix ?
Hello all, I developing an application that uses 640 checkbuttons performing a 32 X 20 matrix using gtk1.2, recently in my Debian woody system I upgraded to Gnome2.2 and your libraries, and after this, when I open the window that has these checkbuttons (running my app from a xterm) I had these warnings : Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 65532 and height 19 I don't know if exists relantionship with this warning but when I compiling/linking my app I receive these message from gcc : . . . make[2]: Entering directory `/home/flavio/Projects/ihmserial/src' gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I/usr/include/gnome-1.0 -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/orbit-1.0 -I/usr/include/gtk-1.2 -I/usr/X11R6/include -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -g -O2 -Wall -Wunused -c callbacks.c gcc -g -O2 -Wall -Wunused -o ihmserial main.o support.o ihmserial.o serial.o interface.o callbacks.o -rdynamic -L/usr/lib -L/usr/X11R6/lib -rdynamic -lgnomeui -lart_lgpl -lgdk_imlib -lSM -lICE -lgtk -lgdk -lgmodule -ldl -lXi -lXext -lX11 -lgnome -lgnomesupport -lesd -laudiofile -lm -ldb-3 -lglib /usr/bin/ld: warning: libgdk_imlib.so.1, needed by /usr/lib/libgnomeui.so, may conflict with libgdk_imlib.so.2 . . . My application runs OK but I think these warning strange. Someone knows what is this and how to fix this ? I will be been thankful Success for all -- Flavio Alberto Lopes Soares [EMAIL PROTECTED] Linux User n. 257636 MAQPLAS INDÚSTRIA E COMÉRCIO DE MÁQUINAS LTDA. www.maqplas.com.br [EMAIL PROTECTED] ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
GtkWindow and GtkPaned and check-resize
Hi, I have a strange problem. I have a window, inside I put GtkPaned, and conenct to window as GTK_CONTAINER() to signal check-size, I suppose that it shoult be invoked only when window resize, but is is also when I move divider up or down, why ? or could anybody tell me how to get moment when window window resized right ? I tried size-request, but there is the same situation. All I want to do is change divider position after window resize. thanks in advice. -- Marcin Krzyzanowski www : http://krzak.linux.net.pl email : [EMAIL PROTECTED] , [EMAIL PROTECTED] IRC : [krzyzak] @#linuxnews @#zdrowo_jebnieci ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GtkWindow and GtkPaned and check-resize
On Tue, 2003-05-27 at 18:33, Marcin Krzyzanowski wrote: Hi, I have a strange problem. I have a window, inside I put GtkPaned, and conenct to window as GTK_CONTAINER() to signal check-size, I suppose that it shoult be invoked only when window resize, but is is also when I move divider up or down, why ? check-resize is nothing you want to connect to ... it's very much an internal implementation detail. or could anybody tell me how to get moment when window window resized right ? I tried size-request, but there is the same situation. All I want to do is change divider position after window resize. ::configure-event is probably best ... note that you'll need to look the size in the event, since when ::configure-event is received the widgets in the layout have not yet been layed out at the new size. Regards, Owen ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Gtk Refresh Problem
Hey people, I am developing this GUI in GTK+ and it seems gtk doesnt refresh the GUI until a callback function returns. I saw some newsgroup and found that other people have also had this problem. I tried to fix this problem by running a separate whic practically does following: while(CALL_BACK_FUNCTION_IS_RUNNING) { gtk_widget_show_all(MainWindow);//MainWindow is a pointer to the main // program window while (gtk_events_pending()) { gtk_main_iteration(); } usleep(200); //sleep for 2 seconds so that thread doesnt hog the CPU } This solution worked for me until I started getting this error: GLib-WARNING **: g_main_context_prepare(): main loop already active in another thread And then the program freezes. I tried to solve this problem by running the callback function in a separate thread, thinking that main thread will return and will automatically refresh the GUI. But my program crashed right at the start saying 'bad implementation' and stuff. I dont know how to fix this problem. I would be very thankful if anyone can suggest a solution to this problem. regards, Bharat ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Transparent buttons
Is there a way to create transparent buttons (so that the background pixmap shows through) in GTK+ (1.2)? Any help would be greatly appreciated. _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Transparent buttons
On Tue, 2003-05-27 at 18:51, sydney barrow wrote: Is there a way to create transparent buttons (so that the background pixmap shows through) in GTK+ (1.2)? Any help would be greatly appreciated. IIRC, this was one of the really cool features of GTK+ 2, and it isn't possible in GTK+ 1. -- Shaun ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Transparent buttons
On Tue, 2003-05-27 at 18:51, sydney barrow wrote: Is there a way to create transparent buttons (so that the background pixmap shows through) in GTK+ (1.2)? Any help would be greatly appreciated. IIRC, this was one of the really cool features of GTK+ 2, and it isn't possible in GTK+ 1. it certainly is possible, though it can be quite a bit more work. you need to use gtk_widget_shape_combine_mask() together with a GtkEventBox as the underlying widget type. getting full GtkButton semantics from this is hard, but if you want something that responds with generic (ie. button_press, button_release) events, its not that bad. ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GtkWindow and GtkPaned and check-resize
On Tue, 2003-05-27 at 18:33, Marcin Krzyzanowski wrote: Hi, I have a strange problem. I have a window, inside I put GtkPaned, and conenct to window as GTK_CONTAINER() to signal check-size, I suppose that it shoult be invoked only when window resize, but is is also when I move divider up or down, why ? check-resize is nothing you want to connect to ... it's very much an internal implementation detail. or could anybody tell me how to get moment when window window resized right ? I tried size-request, but there is the same situation. All I want to do is change divider position after window resize. ::configure-event is probably best ... note that you'll need to look the size in the event, since when ::configure-event is received the widgets in the layout have not yet been layed out at the new size. heh, heh. i wrote about this last week (not sure if i got a reply, i was gone). i don't know much about Paned has changed for gtk+2, but in gtk+1, its horrible for this kind of thing. to do what you want, i had to (a) write gtk_paned_get_position(), since gtk+1.2 didn't provide it and (b) connect to the size_allocate event for the paned. there, i would check that the allocation was larger than the desired position, and if so, would set the position. then i would have to flag that i had done this for that pane, because if you do it again later, you get into an endless feedback loop of size_allocate() events induced by the set_position() call. in the end, it all works nicely. in gtk+1.2 at least, if you attempt to set the position when the allocation is too small, the position is clamped to the current allocation, and the wrong thing happens. btw, i also added a nice feature for my Paned's (as app code based on catching button events on the Paned handle) whereby clicking on the handle with a given button shrinks one child of the Paned to zero size. its very useful for my app. --p ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
gnome_canvas_image_get_type() deprecated, what to use instead?
Hello all. I would like to know how to go about loading a pixmap (.xpm) image onto a Gnome Canvas, for Gnome 2.0. The books I've got are all out of date (somebody should write a new one!). My code snippet currently is; group = gnome_canvas_root(GNOME_CANVAS(canvas)); arrowPixbuf = gdk_pixbuf_new_from_file(redArrow.xpm, error); arrow = gnome_canvas_item_new(group, gnome_canvas_image_get_type(), pixbuf, arrowPixbuf, x, 0.0, y, 0.0, width, 200.0, height, 200.0, anchor, GTK_ANCHOR_CENTER, NULL); and I would appreciate an example of how to go about doing this in the new Gnome, because gnome_canvas_image_get_type() appears to be deprecated. Thanks in advance. John Mann = I'd rather be debugging - Anon __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
theme question
I'm using gtk on solaris/sparc, but can't themes to work. I installed gtk-engines-2.2.0 using the standard way: ./configure make make install Copy a .gtkrc file: cp /usr/local/share/themes/Metal/gtk-2.0/gtkrc ~/.gtkrc-2.0 When I start a gtk2.2 program I get: Gtk-WARNING **: Unable to locate theme engine in module_path: metal, So I tried adding module_path in my .gtkrc-2.0 file, but I got: Gtk-WARNING **: module_path directive is now ignored Why can't my 2.0 theme load? I can find any instruction to indicate what I should do. Help.. Thanks, Tony /---\ | Tony Denault | Email: [EMAIL PROTECTED] | | Institute for Astronomy | Phone: (808) 932-2378 | | 640 North Aohoku Place |Fax: (808) 933-0737 | | Hilo, Hawaii 96720 || \---/ ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list