Re: Re: Makefile for GTK2 programs?
On Aug 18, 2010 1:57am, Chris Vine ch...@cvine.freeserve.co.uk wrote: You probably just need to install the ubuntu development package containing the gtk2 headers. apt-get install libgtk2.0-dev? And maybe libglib2.0-dev? ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: RE: Doubts about creating a new widget
On Jul 12, 2010 11:51am, Jeff Hallock jhall...@wbanda.com wrote: Hmmm…. I able to find one immediately by googling “gtk expander screenshot”. Who'da thought… I monitor this list because I know I'll eventually learn something new, I am far from complete in my knowledge of stuff. For giggles I decided to take Jeff's advice and google exactly that; gtk expander screen shot, since I wasn't exactly sure what an expander was, and found this: http://www.laas02.org/?page_id=16 Its apparently some intelligent guy's blog, and the page in question is a nice little treatise on gtk widgets. Its a little better than the canonical documentation, it gives a little more background on each gtk widget, some context with code (Mono, but who cares?) and some more detail on each option, given that the information isn't already presented earlier on and not redundant. Its very brief, but did contain some info new to me. This could actually help me picture what I need to do and what I need out of a gtk widget in the future. If you need to put a particular scenario in context with regard to gtk and the rather dry documentation canon doesn't really help, you might give this guy's blog a perusal. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: RE: gtkcombobox with self internal code to the options
Woah, Like a commandment. Although I understand the sentiment. On Jun 24, 2010 11:41am, Jeff Hallock jhall...@wbanda.com wrote: You shall RTFM and try it out yourself. -Original Message- From: gtk-list-boun...@gnome.org [mailto:gtk-list-boun...@gnome.org] On Behalf Of John Williams Sent: Thursday, June 24, 2010 2:08 PM To: Tadej Borovšak Cc: gtk-list@gnome.org Subject: Re: gtkcombobox with self internal code to the options Shall I beg? 2010/6/21 John Williams asb1...@gmail.com: Anyone? 2010/6/16 John Williams asb1...@gmail.com: Other question, how can I set the active option? gtk_combo_box_set_active? 2010/6/16 John Williams asb1...@gmail.com: Yes Tadej, you understand perfectly. Thank you for the example! 2010/6/15 Tadej Borovšak tadeb...@gmail.com: Hello. If I understand you correctly, you want to store name and ID of your field inside combo box and retrieve it when needed. If this is true, have a look at this snippet of code that demonstrates how to do this: --- #include enum { COL_NAME, COL_ID, NO_COLS }; static void cb_changed (GtkComboBox *combo) { GtkTreeIter iter; GtkTreeModel *model; gint id; gchar *name; gtk_combo_box_get_active_iter (combo, iter); model = gtk_combo_box_get_model (combo); gtk_tree_model_get (model, iter, COL_NAME, name, COL_ID, id, -1); g_print (Active selection: %s (id: %d)\n, name, id); g_free (name); } int main (int argc, char **argv) { GtkWidget *window, *combo; GtkCellRenderer *cell; GtkListStore *store; gint i; gtk_init (argc, argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, destroy, gtk_main_quit, NULL); store = gtk_list_store_new (NO_COLS, G_TYPE_STRING, G_TYPE_INT); for (i = 0; i { GtkTreeIter iter; gchar name[] = Item ; name[5] = '0' + i; gtk_list_store_append (store, iter); gtk_list_store_set (store, iter, COL_NAME, name, COL_ID, g_random_int (), -1); } combo = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); g_signal_connect (combo, changed, G_CALLBACK (cb_changed), NULL); gtk_container_add (GTK_CONTAINER (window), combo); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), cell, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), cell, text, COL_NAME); gtk_widget_show_all (window); gtk_main(); return 0; } -- Tadej -- Tadej Borovšak tadeboro.blogspot.com tadeb...@gmail.com tadej.borov...@gmail.com ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re[6]: Does GTK leak memory
On Jun 2, 2010 8:58pm, Lothar Scholz llot...@web.de wrote: is really just another toy? Looks like you are a cool arrogant nerd who can't handle serious critics. You should congratulate to anyone who gives constructive ideas. Some of your responses had elements of constructiveness in them but then you lose all credibility with jabs like this. You remind me of a child who criticizes everyone yet still demands help with his homework. Don't be surprised when your pleas are ignored. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: Re[6]: Does GTK leak memory
BTW- One quick look in google for memory leak tools linux gnome took me to this page, the first of many links; http://live.gnome.org/MemoryReduction_2fTools ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re[4]: Does GTK leak memory
On Jun 2, 2010 1:36pm, Lothar Scholz llot...@web.de wrote: Maybe GTK is really just another toy? Interesting way to ask for help. Best regards, Indeed. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: How to use the funcitons for internal use?
I may be totally out of it here but it sounds like you want to create a window that cuts out your window manager? If that's correct, I don't think you can do that and still have resizeable windows. Can't you simply set the window borders to a zero thickness or summat? On Apr 19, 2010 4:33am, Shellning Wand vanxin...@gmail.com wrote: Hi everyone! I am now working on a borderless gtk window with a skinned and resizeable window. To make the window resizeable, I tried the gtk_window_begin_resize_drag() function, but it doesn't work, and it only has effect on the frame windows and nor non-resizeable dialogs. I found the emulate_resize_drag() function in gdk/x11/gdkwindow-x11.c.Unfortunately, it's only for internal use, so it's not declared in gdkwindow-x11.h. My question is, is there any way to use this funcition in my code? Thanks! ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: PYGTK.org site is down?
Looks like the server's offline. On Nov 6, 2009 7:48am, Donny Viszneki donny.viszn...@gmail.com wrote: doen't work for me, either On Fri, Nov 6, 2009 at 10:21 AM, Daniel B. Thurman d...@cdkkt.com wrote: Just wondered if it is just me, but I cannot seem to be able to connect to pygtk.org site ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list -- http://codebad.com/ ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: Why there's still ONE element left after g_slist_free () ?
Its old hat to C programmers that you set any object to NULL when you're done with it, which returns the memory used to the heap. That's not necessary with languages that have garbage collection like Java, Python, etc. On May 13, 2009 3:56am, PenT pen...@gmail.com wrote: Thanks to Yeti, tml and Pfeiffer, I finally realized what happend to the GSList. May be I'm spoiled by Python, Java that I had the strange SHOULD-BE-NULL thought, now I know if I need to reuse the GSList* variable, the first thing is to assign NULL to it after g_slist_free (), also surprised g_slist_length() didn't gave a segmentation fault to me, aha. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Re: Why there's still ONE element left after g_slist_free () ?
You should quote the object of the comment ENTIRELY before commenting, shouldn't you? The actual comment by PenT does state as much: to assign NULL to it after g_slist_free ()... AFTER g_slist_free. I don't see that I was mutually exclusive in my reply. On May 14, 2009 11:51am, Chris Moller mol...@mollerware.com wrote: american.communist.pa...@gmail.com wrote: Its old hat to C programmers that you set any object to NULL when you're done with it, which returns the memory used to the heap. That's specifically /not/ true in C: You have to explicitly free allocated space--setting a pointer to null doesn't automatically do the freeing and, in fact, can simply lose the pointer making it impossible to subsequently free the space. Sometimes it's useful to set the pointer to null /after/ you free the space just as a flag to yourself that you've freed it. That's not necessary with languages that have garbage collection like Java, Python, etc. On May 13, 2009 3:56am, PenT pen...@gmail.com wrote: Thanks to Yeti, tml and Pfeiffer, I finally realized what happend to the GSList. May be I'm spoiled by Python, Java that I had the strange SHOULD-BE-NULL thought, now I know if I need to reuse the GSList* variable, the first thing is to assign NULL to it after g_slist_free (), also surprised g_slist_length() didn't gave a segmentation fault to me, aha. ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ** ** ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list