Re: gtk_tree_view_column_set_cell_data_func gives GTK-CRITICAL error
Hi. 2011/11/30 James Steward jamesstew...@optusnet.com.au: col = gtk_tree_view_insert_column_with_attributes ( GTK_TREE_VIEW (view), -1, Title, renderer, text, i, strikethrough, j, background, k, background-set, TRUE, NULL); gtk_tree_view_column_set_cell_data_func( gtk_tree_view_get_column(GTK_TREE_VIEW(view), col), renderer, render_float, GINT_TO_POINTER(i), NULL); IIRC, gtk_tree_view_insert_column_with_attributes() returns number of columns and gtk_tree_view_get_column() expects to get column number where first column is 0. So you may be off-by-one in your call to gtk_tree_view_column_set_cell_data_func(). Cheers, Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Alignment of markup labels in menu items
I'm trying to add the capability to add a label formatted with Pango markup to buttons and menu items in the high-level interface to gtk-fortran. While the following is successful in producing subscripts in labels when the markup flag is set, there is a problem with alignment: while a plain text label is correctly centred in the pulldown menu, a markup label begins at the centre (even if it does not actually include any markup). if (markup) then item=gtk_menu_item_new() label_w=gtk_label_new(label) call gtk_label_set_markup(label_w, label) call gtk_container_add(item,label_w) else item = gtk_menu_item_new_with_label(label) end if Am I missing something, or is that a fundamental limitation? I'm using Gtk+-3.2.0, in Ubuntu 11.10, with gcc gfortran 4.6.1. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Alignment of markup labels in menu items
On 30 November 2011 11:31, James Tappin jtap...@gmail.com wrote: there is a problem with alignment: while a plain text label is correctly centred in the pulldown menu, a markup label begins at the centre (even if it does not actually include any markup). I should add, the problem does not manifest itself for simple gtk buttons. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: gtk_tree_view_column_set_cell_data_func gives GTK-CRITICAL error
On 30/11/11 20:04, Tadej Borovšak wrote: Hi. 2011/11/30 James Stewardjamesstew...@optusnet.com.au: col = gtk_tree_view_insert_column_with_attributes ( GTK_TREE_VIEW (view), -1, Title, renderer, text, i, strikethrough, j, background, k, background-set, TRUE, NULL); gtk_tree_view_column_set_cell_data_func( gtk_tree_view_get_column(GTK_TREE_VIEW(view), col), renderer, render_float, GINT_TO_POINTER(i), NULL); IIRC, gtk_tree_view_insert_column_with_attributes() returns number of columns and gtk_tree_view_get_column() expects to get column number where first column is 0. So you may be off-by-one in your call to gtk_tree_view_column_set_cell_data_func(). Well spotted! Thanks very much. Regards, James. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Embedding OpenGL into GTK apps
Hi, I would need some clarification on embedding an opengl canvas into a GTK 3.0 application. Is it possible? And if so, how? This is a necessary component for my thesis at university. GtkGlExt (surprisingly - quite out of support) does not seem to work. I even tried to link against it with gtk 2.0, but it doesn't work either. Nasty things like this are written to stdout: (process:9338): Gdk-CRITICAL **: IA__gdk_x11_display_get_xdisplay: assertion `GDK_IS_DISPLAY (display)' failed (process:9338): GdkGLExt-WARNING **: Window system doesn't support OpenGL. I am using Arch linux with GNOME 3, [base], [community] and [extra] repos enabled only, latest nvidia graphics card with proprietary drivers. I am using gtkmm in C++11, but I couldn't achieve anything even in plain gtk, and if a solution exists in gtk, I think it would be portable to gtkmm. Thanks, Dennis P.S.: An equally good solution would be to draw gtk inside an opengl canvas, that way my whole application would be drawn in opengl. Is that possible? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Embedding OpenGL into GTK apps
2011/11/30 Almási Dénes denes.alm...@gmail.com: Hi, I would need some clarification on embedding an opengl canvas into a GTK 3.0 application. Is it possible? And if so, how? This is a necessary component for my thesis at university. GtkGlExt (surprisingly - quite out of support) does not seem to work. I even tried to link against it with gtk 2.0, but it doesn't work either. Nasty things like this are written to stdout: (process:9338): Gdk-CRITICAL **: IA__gdk_x11_display_get_xdisplay: assertion `GDK_IS_DISPLAY (display)' failed (process:9338): GdkGLExt-WARNING **: Window system doesn't support OpenGL. I am using Arch linux with GNOME 3, [base], [community] and [extra] repos enabled only, latest nvidia graphics card with proprietary drivers. I am using gtkmm in C++11, but I couldn't achieve anything even in plain gtk, and if a solution exists in gtk, I think it would be portable to gtkmm. Thanks, Dennis P.S.: An equally good solution would be to draw gtk inside an opengl canvas, that way my whole application would be drawn in opengl. Is that possible? I asked this question a while ago at stackoverflow (at that time I were not aware of this mailinglist): http://stackoverflow.com/questions/3815806/gtk-and-opengl-bindings Regards Bernhard ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can I develop gtk app in Mac OS X ?
在 2011-11-30 下午5:56 時, Gabriele Greco 寫到: On Wed, Nov 30, 2011 at 2:35 AM, xiaobo kfih...@gmail.com wrote: I work between gnome and os x, sometime I will write my gnome app in Debian and , when I change to OS X , can I continue to write my gnome app in OS X ? Yes you can, Thx , Gabry. Here is a starting point to install GTK on OSX: http://live.gnome.org/GTK%2B/OSX/ And It can running separately from X in OSX? If you are used to console development (with pkg-config and similar) you will not notice any difference developing on OSX or Linux, if you use an IDE like Anjuta or XCode you'll have to sort out include dirs / flags / link libraries by yourself (but the output of pkg-config gtk+-2.0 --cflags --libs can help you :) ) Do not use the prebuilt binaries on gtk.org, they are outdated and bugged. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list