Re: CellRendererToggle with custom pixbuf?
On Sun, Aug 17, 2008 at 10:52 PM, Jeffrey Barish [EMAIL PROTECTED]wrote: I am using a CellRendererToggle. I would like to be able to specify pixbufs to use to draw the toggle in its two states. Basically, I want to toggle between two images in a TreeView. When I click on one image, it changes to the other. Is there an easy way to do this? I think the best way it's to make a GDK_TYPE_PIXBUF column and switch between the two images attaching an handler to the button_press event and using gtk_tree_view_get_path_at_pos to find if the image was clicked or another place in the row to check if you have to switch the image in the model or not. I've seen that also pixbuf engine based themes do not allow to change the aspect of the toggle buttons inside a treeview, so I fear this is the only way to go. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Varying on the fly the size of a GdkPixbuf in a GtkListstore
Hi, I have a problem in varying on the fly the size of the GdkPixbuf in a GtkListStore. I tried to set the size with: g_object_set(G_OBJECT(archive[idx]-renderer), stock-size,40, NULL); archive[idx]-renderer is created this way: column = gtk_tree_view_column_new(); archive-renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start(column, archive-renderer, FALSE); gtk_tree_view_column_set_attributes(column, archive-renderer, pixbuf,0,NULL); I use gtk_icon_theme_load_icon to load the icons. Now I would like to change the size of those icons on the fly with g_object_set as above but it doesn't work neither I get any error message in the console. What is the correct way? Thank you, -- Colossus Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Create a GtkDrawable from an X Drawable?
Hi all, Can I create a GtkDrawable from an X Drawable? I want to draw on a window not created by Gtk, and for the time being I follow this: I create a pixmap I draw on the pixmap I get a pixbuffer from the pixmap I copy the pixbuffer on the drawable using gdk_pixbuf_xlib_render_to_drawable But this is really slow. Any ideas? If I can create a GtkDrawable from an X Drawable, I could draw directly, avoiding pixmaps, pixbufs all the copies. George ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Create a GtkDrawable from an X Drawable?
2008/8/19 Georgios Petasis [EMAIL PROTECTED]: Can I create a GtkDrawable from an X Drawable? Sure, see: http://library.gnome.org/devel/gdk/stable/gdk-X-Window-System-Interaction.html#gdk-window-foreign-new Though of course you lose portability if you use the back-end-specific API. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Create a GtkDrawable from an X Drawable?
O/H [EMAIL PROTECTED] ??: 2008/8/19 Georgios Petasis [EMAIL PROTECTED]: Can I create a GtkDrawable from an X Drawable? Sure, see: http://library.gnome.org/devel/gdk/stable/gdk-X-Window-System-Interaction.html#gdk-window-foreign-new Though of course you lose portability if you use the back-end-specific API. John Thank you very much :-) So, an X drawable will be mapped into a GdkWindow. Then, I need to free it? About portability I don't care, as I already have different code for unix/windows. Actually, I need to draw with Gtk on a Tk window :-) George ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Create a GtkDrawable from an X Drawable?
2008/8/19 Georgios Petasis [EMAIL PROTECTED]: So, an X drawable will be mapped into a GdkWindow. Then, I need to free it? Yes, junk the GdkWindow in the usual way. It won't close the X drawable though, since it didn't create it. You'll need to close that some other way. John ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Why diffrerent weight between 'number' and 'character'?
Hi all, Follow code is sample code. Label1 and Label2 has same font, same style, but they has different bold( weight? ). Why different? Label1 is mixed 'character' and 'number', Label2 has only 'number'. I want to same weight '123' and 'a123'. Thanks in advance for any help. Sung SuHyun. == Sample Code = #include gtk/gtk.h int main (int argc, char *argv[]) { GtkWidget *window, *vbox, *label1, *label2; PangoFontDescription *initial_font; gtk_init (argc, argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (window), destroy, G_CALLBACK (gtk_main_quit), NULL); label1 = gtk_label_new (a123); label2 = gtk_label_new(123); initial_font = pango_font_description_from_string (Sans Bold 20); gtk_widget_modify_font (label1, initial_font); gtk_widget_modify_font (label2, initial_font); vbox= gtk_vbox_new (FALSE, 5); gtk_box_pack_start_defaults (GTK_BOX (vbox), label1); gtk_box_pack_start_defaults (GTK_BOX (vbox), label2); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_widget_show_all (window); gtk_main (); return 0; } ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Sort indicator disappeared
On Wed, 13 Aug 2008 16:48:36 -0600 Jeffrey Barish [EMAIL PROTECTED] wrote: When did the sort indicator disappear? The sort-indicator property is True, but I don't see anything. I used to. Was it lost in some upgrade? I am on Ubuntu 8.04. My libgtk is 2.12.9-3ubuntu4. There have been different bugs affecting the sort indicator in both GTK+-2.10 and GTK+-2.12. It was fixed in GTK+-2.10.7, was broken again in GTK+-2.12.1, and was eventually fixed again in GTK+-2.12.11. See http://bugzilla.gnome.org/show_bug.cgi?id=352738 Chris ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Sort indicator disappeared
Chris Vine wrote: On Wed, 13 Aug 2008 16:48:36 -0600 Jeffrey Barish [EMAIL PROTECTED] wrote: When did the sort indicator disappear? The sort-indicator property is True, but I don't see anything. I used to. Was it lost in some upgrade? I am on Ubuntu 8.04. My libgtk is 2.12.9-3ubuntu4. There have been different bugs affecting the sort indicator in both GTK+-2.10 and GTK+-2.12. It was fixed in GTK+-2.10.7, was broken again in GTK+-2.12.1, and was eventually fixed again in GTK+-2.12.11. See http://bugzilla.gnome.org/show_bug.cgi?id=352738 Chris Thanks. I will upgrade as soon as Ubuntu has a new package available. -- Jeffrey Barish ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
From GtkItemFactory to GtkUIManager GtkActionGroup
Hi Everyone, I am a newbie to GTK, and am currently porting an old app to GTK+-2.0 that had a heavy usage of GtkItemFactory in it. I am in midst of converting it to make use of GtkUIManager GtkActionGroup, as per this tutorial: http://live.gnome.org/GnomeLove/UIManagerTutorial Now, the struct 'GtkItemFactoryEntry' had these two elements: GtkItemFactoryCallback callback; guint callback_action; where (as far as I understand) the 'callback_action' allowed using the same callback to implement different actions. For example, if GtkItemFactoryEntry had these two entries: {/File/Open..., NULL, hit_key, (int)@, NULL}, {/File/Save..., NULL, hit_key, (int)#, NULL}, then in hit_key(GtkWidget *w, gpointer data) one can make use of ((char *)data)[0] to distinguish between the Open Save actions. So, I now need to do something similar with 'GtkActionEntry' and an XML based UI but the struct members (of 'GtkActionEntry') don't seem to give that kind of functionality. For standard actions (such as Open or Save only), I probably don't need it anyhow, but for somthing that's app-specific, I don't understand how it cane be implemented. Can anyone help me, or tell me an alternative to this? Thanks very much aprior, Nitin ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: can anyone explain what is this sql query?
This seems to explain it: http://library.gnome.org/devel/libgda-4.0/unstable/GdaDataModelQuery.html#gda-data-model-query-set-modification-query dave On Mon, Aug 18, 2008 at 11:46 PM, paragasu [EMAIL PROTECTED] wrote: [snip] #define CONTENTS_DEL_SQL DELETE FROM order_contents WHERE order_id = ##oid::gint AND product_ref = ##-0::gchararray AND quantity = ##-2::gint AND discount = ##-3::gdouble [/snip] i take this from the official gnome-db documentation http://library.gnome.org/devel/libgnomedb-3.0/unstable/ch04s03.html unfortunately, i don't know what the ##oid:gint or ##-0::gchararray or ##-2::gint or ##-3::gdouble mean (inside the delete query). And i cannot find any documentation on it. i want to know what the -0, -2 or -3 mean .. can anyone point me a link for me to read more, i am more than happy if anyone can explain it to me.. thank you ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Question regarding the dependency of GDK on other libraries
Hi, My application uses GTK and GDK (Layer isolating GTK from the details of the windowing system). I am using Ubuntu 8.04. When I run pkg-config --libs gdk-x11-2.0 on it I get the following result : -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 whereas when i run the same command on another ubuntu machine I get some extra dependencies on libXcomposite, libXdamage etc. Can somebody please explain me this discrepancy. Does my application need to link to these libraries? Thanks ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: can anyone explain what is this sql query?
thanks dave, the link help me very much.. On 8/19/08, Dave Foster [EMAIL PROTECTED] wrote: This seems to explain it: http://library.gnome.org/devel/libgda-4.0/unstable/GdaDataModelQuery.html#gda-data-model-query-set-modification-query dave On Mon, Aug 18, 2008 at 11:46 PM, paragasu [EMAIL PROTECTED] wrote: [snip] #define CONTENTS_DEL_SQL DELETE FROM order_contents WHERE order_id = ##oid::gint AND product_ref = ##-0::gchararray AND quantity = ##-2::gint AND discount = ##-3::gdouble [/snip] i take this from the official gnome-db documentation http://library.gnome.org/devel/libgnomedb-3.0/unstable/ch04s03.html unfortunately, i don't know what the ##oid:gint or ##-0::gchararray or ##-2::gint or ##-3::gdouble mean (inside the delete query). And i cannot find any documentation on it. i want to know what the -0, -2 or -3 mean .. can anyone point me a link for me to read more, i am more than happy if anyone can explain it to me.. thank you ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Where can find a full list and description of the signal name
Just like expose-event and expose-event, I can't find all of them in the 'GTK+ Reference Manual' and source code. And other string type enumerations such as color: red, orange. I can't find them neither. Does anybody know where can find the full list and description of the string type enumerations. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list