pkd-config issue
Hi, newbie here, trying to install GTK on a pentium4, i686, with RH9 OS on it. I finally got glib to configure, make, check and install, then when I tried to install atk, I got an error when it queried for glib. It couldn't find it. So, after reading up on pkg-config (after looking at the config shell), I noticed that I could set the env variable PKG_CONFIG_PATH for .pc files I'd installed. So, I looked through the config shell some more and found the default PREFIX setting '/usr/local.' Under that, in lib/pkgconfig I could see the glib-2.0 I had just installed. Great! I setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig (there wasn't such an env var before), and voila! the shell fails again telling me that it found an older version of glib (which I have never installed). I'm installing version 2.2.2 of glib, and it's erroring out by finding 2.2.1 of glib. I've looked through the pkg-config man page, but there doesn't seem to be anything that tells me how to local and remove a specific package, like in this case, the supposed older version of glib-2.2.1. Does this sound familiar to anyone? I'm up against a wall here at the moment. Thanks. - Jimbo ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: pkd-config issue
[EMAIL PROTECTED] wrote: Hi, newbie here, trying to install GTK on a pentium4, i686, with RH9 OS on it. I finally got glib to configure, make, check and install, then when I tried to install atk, I got an error when it queried for glib. It couldn't find it. So, after reading up on pkg-config (after looking at the config shell), I noticed that I could set the env variable PKG_CONFIG_PATH for .pc files I'd installed. So, I looked through the config shell some more and found the default PREFIX setting '/usr/local.' Under that, in lib/pkgconfig I could see the glib-2.0 I had just installed. Great! I setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig (there wasn't such an env var before), and voila! the shell fails again telling me that it found an older version of glib (which I have never installed). I'm installing version 2.2.2 of glib, and it's erroring out by finding 2.2.1 of glib. I've looked through the pkg-config man page, but there doesn't seem to be anything that tells me how to local and remove a specific package, like in this case, the supposed older version of glib-2.2.1. Does this sound familiar to anyone? I'm up against a wall here at the moment. Thanks. - Jimbo ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list The old version of glib is likely to be in /usr/lib/pkgconfig, which is searched before /usr/local/lib/pkgconfig. Configure glib to be installed in the same place as the old one with ./configure --prefix=/usr, make make uninstall make install. Before running configure, make uninstall everything you just installed in /usr/local. (Note: you have to reconfigure, running make prefix=/usr install gives strange problems.) ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Gth-test demo problems
I have successfully installed GTK for the linux framebuffer but come across the following error when I try to execute the gtk-demo program distributed with the GTk+-2.4.4 distribution. Gdk_WARNING **: gdk_window_set_keep() not implemented Does anyone know how I can resolve this problem? Is it because I am using the VESA framebuffer? Has anyone else got the demo to work on the linux framebuffer. Regards, Ian ___ALL-NEW Yahoo! Messenger - so many all-new ways to express yourself http://uk.messenger.yahoo.com ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Need Help Understanding a Compile Error
I need help in understanding a problem I'm encountering when compiling a particular GTK program. When compiling, at link time I get the following errors: /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_map_cache_clear' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_map_get_type' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_map_create_context' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_map_shutdown' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_get_type' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_lock_face' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_has_char' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_get_glyph' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_get_unknown_glyph' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_get_raw_extents' /usr/local/lib/libpangoxft-1.0.so: undefined reference to `pango_fc_font_unlock_face' In this case /usr/local/lib/libpangoxft-1.0.so is linked to /usr/local/lib/libpangoxft-1.0.so.0.501.0. If I change libpangoxft-1.0.so to be linked to /usr/local/lib/libpangoxft-1.0.so.0.200.5 the program compiles correctly. Can someone tell me why? -- Marshall Lake -- [EMAIL PROTECTED] -- http://mlake.net ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Aligning widgets adjacent to a drawing area...
On Wednesday 21 July 2004 7:30 pm, Christer Palm wrote: gtk_widget_translate_coordinates() with values from each of the text labels allocation's and the DrawingArea as the destination should do the job, I guess. Hmmm. I've had a look at that and I can't see how it would work for my problem... I've taken the liberty of attaching some code which I've been using to try and figure out how to do what I want. (it's not pretty, but it's fine to prove the concept). (As a bonus question, how do I stop the text items in the table from spacing out when the window is maximized? I've played with the pack box options, but to no avail). 8-snip-- #include stdio.h #include stdlib.h #include gtk/gtk.h void gui_create(); gint gui_darea_configure(GtkWidget *widget, GdkEventConfigure *event); gboolean gui_darea_expose(GtkWidget *widget, GdkEventExpose *event); void gui_redraw(); GtkWidget *window; GtkWidget *darea; GdkPixmap *pixmap = NULL; int Darea_Width = 600; int Darea_Height = 300; #define MAX_NUM_LABELS 16 int main( int argc, char *argv[] ) { GtkWidget *vbox, *hbox; GtkWidget *toolbar, *table, *text; GtkWidget *scrolled_window; int i; gtk_init(argc, argv); /* Create the main window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), Example); gtk_window_set_default_size(GTK_WINDOW(window), 600, 300); /* Create a vbox */ vbox = gtk_vbox_new(FALSE, 0); /* Create a scollable window and add to the vbox */ scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolled_window), 2); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 2); /* Create an hbox */ hbox = gtk_hbox_new(FALSE, 0); gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrolled_window), hbox); /* Create a table */ table = gtk_table_new( MAX_NUM_LABELS, 3, FALSE ); gtk_box_pack_start( GTK_BOX(hbox), table, FALSE, FALSE, 0 ); gtk_table_set_row_spacings( GTK_TABLE(table), 2 ); gtk_table_set_col_spacings( GTK_TABLE(table), 2 ); gtk_container_border_width( GTK_CONTAINER(table), 2 ); /* Add labels */ for ( i = 0; i MAX_NUM_LABELS; i++ ) { text = gtk_entry_new_with_max_length(20); gtk_entry_set_text(GTK_ENTRY(text), Label); gtk_widget_set_usize(text, 80, 20); gtk_table_attach_defaults(GTK_TABLE(table), text, 1, 2, i, i+1 ); } /* Create drawing area */ darea = gtk_drawing_area_new(); gtk_widget_set_usize(darea, Darea_Width , Darea_Height); /* DEBUG */ gtk_box_pack_start( GTK_BOX(hbox), darea, FALSE, FALSE, 0 ); /* Drawing area callbacks */ g_signal_connect(G_OBJECT(darea),configure_event, G_CALLBACK(gui_darea_configure), NULL); g_signal_connect(G_OBJECT(darea), expose_event, G_CALLBACK(gui_darea_expose), NULL); /* Add the vbox to the main window */ gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show_all(window); gtk_main(); } gint gui_darea_configure(GtkWidget *widget, GdkEventConfigure *event) { if (pixmap) g_object_unref(pixmap); /* Create backing pixmap */ pixmap = gdk_pixmap_new( darea-window, Darea_Width, Darea_Height, -1 ); gui_redraw(); return TRUE; } gboolean gui_darea_expose(GtkWidget *widget, GdkEventExpose *event) { /* Redraw backing pixmap region modified by event */ gdk_draw_drawable( widget-window, widget-style-black_gc, pixmap, event-area.x, event-area.y, event-area.x, event-area.y, event-area.width, event-area.height ); return TRUE; } void gui_redraw( void ) { int x, y; /* Clear pixmap */ gdk_draw_rectangle( pixmap, darea-style-white_gc, TRUE, 0, 0, Darea_Width, Darea_Height ); /**/ /* THE PROBLEM: How to ensure that each line is drawn such that it lines */ /* up with the associated text box on the left, allowing for user-defined */ /* Font sizes, widget decorations or what have you... */ /**/ for (y=0; yDarea_Height; y+=20) gdk_draw_line( pixmap, darea-style-black_gc, 0, y, Darea_Width, y ); } -- David J. Singer [EMAIL PROTECTED] Time flies like an arrow, fruit flies like a banana ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: RFC: Part 1 of new GObject tutorial
From: Ryan McDougall [EMAIL PROTECTED] Therefore I'm asking everyone with some experience to give it a read over for technical mistakes, or unclear language. Please place it to a webpage, thanks. It was cutoff from the digest. Juhana -- http://music.columbia.edu/mailman/listinfo/linux-graphics-dev for developers of open source graphics software ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Aligning widgets adjacent to a drawing area...
David J. Singer wrote: On Wednesday 21 July 2004 7:30 pm, Christer Palm wrote: gtk_widget_translate_coordinates() with values from each of the text labels allocation's and the DrawingArea as the destination should do the job, I guess. Hmmm. I've had a look at that and I can't see how it would work for my problem... Did you even try it? It can't be much simpler... I've taken the liberty of attaching some code which I've been using to try and figure out how to do what I want. (it's not pretty, but it's fine to prove the concept). OK. Here's the code modified to do what I suppose you want. (As a bonus question, how do I stop the text items in the table from spacing out when the window is maximized? I've played with the pack box options, but to no avail). I fixed that as well. Though all this is right in the tutorial. I think you need to RTFM + perhaps some example code and then try a bit harder. -- Christer Palm #include stdio.h #include stdlib.h #include gtk/gtk.h void gui_create(); gint gui_darea_configure(GtkWidget *widget, GdkEventConfigure *event); gboolean gui_darea_expose(GtkWidget *widget, GdkEventExpose *event); void gui_redraw(); #define MAX_NUM_LABELS 16 GtkWidget *window; GtkWidget *darea; GdkPixmap *pixmap = NULL; GtkWidget *labels[MAX_NUM_LABELS]; GtkWidget *table; int main( int argc, char *argv[] ) { GtkWidget *vbox, *hbox; GtkWidget *toolbar, *text; GtkWidget *scrolled_window; GtkWidget *viewport; int i; gtk_init(argc, argv); /* Create the main window */ window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), Example); gtk_window_set_default_size(GTK_WINDOW(window), 600, 300); /* Create a vbox */ vbox = gtk_vbox_new(FALSE, 0); /* Add the vbox to the main window */ gtk_container_add(GTK_CONTAINER(window), vbox); /* Create a scollable window and add to the vbox */ scrolled_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_set_border_width(GTK_CONTAINER(scrolled_window), 2); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_box_pack_start(GTK_BOX(vbox), scrolled_window, TRUE, TRUE, 2); viewport = gtk_viewport_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(scrolled_window), viewport); /* Create a table */ table = gtk_table_new( MAX_NUM_LABELS, 2, FALSE ); gtk_container_add(GTK_CONTAINER(viewport), table); gtk_table_set_row_spacings( GTK_TABLE(table), 2 ); gtk_table_set_col_spacings( GTK_TABLE(table), 2 ); gtk_container_border_width( GTK_CONTAINER(table), 2 ); /* Add labels */ for ( i = 0; i MAX_NUM_LABELS; i++ ) { text = gtk_entry_new_with_max_length(20); labels[i] = text; gtk_entry_set_text(GTK_ENTRY(text), Label); gtk_entry_set_width_chars(GTK_ENTRY(text), 10); gtk_table_attach(GTK_TABLE(table), text, 0, 1, i, i+1, (GtkAttachOptions)GTK_FILL, (GtkAttachOptions)0, 0, 0); /* Realize the widgets now so that they have an */ /* allocation when the drawing area is configured */ gtk_widget_realize(text); } /* Create drawing area */ darea = gtk_drawing_area_new(); // gtk_widget_set_usize(darea, Darea_Width , Darea_Height); /* DEBUG */ gtk_table_attach(GTK_TABLE(table), darea, 1, 2, 0, MAX_NUM_LABELS, (GtkAttachOptions)(GTK_EXPAND|GTK_FILL), (GtkAttachOptions)GTK_FILL, 0, 0); /* Drawing area callbacks */ g_signal_connect(G_OBJECT(darea),configure_event, G_CALLBACK(gui_darea_configure), NULL); g_signal_connect(G_OBJECT(darea), expose_event, G_CALLBACK(gui_darea_expose), NULL); gtk_widget_show_all(window); gtk_main(); } gint gui_darea_configure(GtkWidget *widget, GdkEventConfigure *event) { if (pixmap) g_object_unref(pixmap); /* Create backing pixmap */ pixmap = gdk_pixmap_new( darea-window, darea-allocation.width, darea-allocation.height, -1 ); gui_redraw(); return TRUE; } gboolean gui_darea_expose(GtkWidget *widget, GdkEventExpose *event) { /* Redraw backing pixmap region modified by event */ gdk_draw_drawable( widget-window, widget-style-black_gc, pixmap, event-area.x, event-area.y, event-area.x, event-area.y, event-area.width, event-area.height ); return TRUE; } void gui_redraw( void ) { int ytop, ybot, y, i, rc; /* Clear pixmap */ gdk_draw_rectangle( pixmap, darea-style-white_gc, TRUE, 0, 0, darea-allocation.width, darea-allocation.height ); for (i=0; i MAX_NUM_LABELS; i++) { if (gtk_widget_translate_coordinates(labels[i], darea, 0, 0, 0, ytop) gtk_widget_translate_coordinates(labels[i], darea, 0, labels[i]-allocation.height, 0, ybot)) { y = (ytop + ybot) / 2; gdk_draw_line( pixmap,
Changing read only style properties
Hi, Is there any way to change the read only style property of shadow-type of GtkToolbar from GTK_SHADOW_OUT to GTK_SHADOW_NONE programatically? Thanks for your time Ian king ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Aligning widgets adjacent to a drawing area...
Christer, First off, Many thanks for helping me solve those issues, I'm very grateful for your effort. On Thursday 22 July 2004 8:12 pm, Christer Palm wrote: Did you even try it? It can't be much simpler... Because I couldn't get it to work you think I just did nothing?! I fixed that as well. Though all this is right in the tutorial. I think you need to RTFM + perhaps some example code and then try a bit harder. ahem A little strong, I think :-) OK, I missed the tutorial reference to tables - that was an oversight. I have however spent *considerable* time and effort trying to sort out the other problem including RTFM, searching the web *and* playing with code. Anyway - problem solved, so my thanks to you again for the help. Regards -- David J. Singer [EMAIL PROTECTED] Time flies like an arrow, fruit flies like a banana ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: GTK Signal Definitions
configure-event partially works. Basically, I am trying to maintain the width of a pane in a GtkHPaned after the user resizes or maximizes the window. When I stretch the edges in 90 degree angles (stretch the right edge right, top edge up, etc..) it works fine. However, when I stretch diagonally or maximize, it does not work. In my callback for configure-event I tried to returning TRUE to stifle the signal propagation. As expected, my pane was being correctly sized, but not propagating the signal had adverse effects elsewhere--as you can imagine. Below is my implementation. g_signal_connect(dialog,configure-event, G_CALLBACK(resize_setup_menu),(gpointer)hpane); g_signal_connect(dialog,window-state-event, G_CALLBACK(resize_setup_menu),(gpointer)hpane); gboolean resize_setup_menu(GtkWidget *widget, GdkEventConfigure *event,gpointer anything) { gtk_paned_set_position(GTK_PANED(anything),128); } On Fri, 2004-07-16 at 17:42, John Cupitt wrote: bryan christ wrote: Does anyone know what signal I should be connecting to when I want to take action when a window is resized? You need configure_event. In my experience it's rare to want to listen to this signal, usually it's simpler to subclass one of the existing widgets and have a configure_event method. As an aside, is there a list of signal definitions? The GTK API documentation seems pretty hit-and-miss. As an example, GtkButton explains activate but GtkWindow has nothing to describe the signal frame-event. I think frame_event is private. John ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
programming in stereo mode
Hello: I am programming in GTK and GtkGLext using OpenGL. I am trying to create a stereo viewer using stereo mode. I have an NVIDIA card with 2 monitors attached. I am having a couple problems: 1.) The images in both monitors flicker. 2.) The images are displayed in the opposite monitors-- the eyes are crossed :) Has anyone had any luck programming in stereo mode? Thanks for any help you could provide. Brian Dudley ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: changing language for gtk apps. in kde
Obviously the environment your KDE menu runs in doesn't have LANG set this way then. Is there any way to set the language , so that the gtk applications come up in spanish when opened from kde menu? Thanks. Regards, NG. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list