Re: displaying 2 images from combobox
when i use this: { GtkWidget *image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign); gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg); } it works...as you can see image is already declared in the first line. that is GtkWidget *image=lookup...etc. if i declare it at top like GtkWidget *image; there is an error saying redefinition...so this doesnt solve the poblem..plz help -- View this message in context: http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9353141 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: trying to launch a dialog from outside the main gui thread by emiting a signal to the thread.
On 3/7/07, Kevin Lambert [EMAIL PROTECTED] wrote: I ended up modifying my class such that the information for the dialog gets added to a vector and I added a timer which looks at the vector and if there is something new to be displayed it pops it off and launches the appropriate dialog, thus keeping everything happening within the GUI thread (or at least that is what I am assuming is happening now that the code works). Kevin GLib already has GAsyncQueue for this. Usually, you can get away with using g_idle_add, it's simpler. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
selecting and displaying from combobox in C
hi...am new to gtk+ and i want to display 2 images in 2 different image widgets when a specific item is clicked from a comboboxi`ve managed to display only one picture but i still dont know how to display a selected item...the image is displayed by default when i use the following code: void on_cbo_itemdesign_changed (GtkComboBox *combobox, gpointer user_data) { GtkWidget *image; image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign); gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg); } now i want to assign the image (baby.jpg) to one of the items from the combobox...but i dont know how to do that...if anyone can help me plz?? secondly i tried to display another image from the same signal but i dont know how to do it as well...i`ve tried the following code but nothing is displayed: void on_cbo_itemdesign_changed (GtkComboBox *combobox, gpointer user_data) { GtkWidget *image1; GtkWidget *image; //for first image image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign); gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg); //for second image image1 = lookup_widget(GTK_WIDGET(combobox), img_patterndesign); gtk_image_set_from_file(GTK_IMAGE(image1), Pictures/myPattern.gif); } i would be much grateful if someone can place the missing code or send me the code with a little explanation just to have an idea... any help would be very appreciatedthanks -- View this message in context: http://www.nabble.com/selecting-and-displaying-from-combobox-in-C-tf3364198.html#a9359856 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: displaying 2 images from combobox
thanks for the info... am still having a lot of problems...you told me to declare it, so i did.but still i cant. in fact am new to gtk+ and dont know too mucn but i have to manage because i have to submit my project on gtk+.. i tried this too: void on_cbo_itemdesign_changed (GtkComboBox *combobox, gpointer user_data) { GtkWidget *image1; GtkWidget *image; image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign); gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg); image1 = lookup_widget(GTK_WIDGET(combobox), img_patterndesign); gtk_image_set_from_file(GTK_IMAGE(image1), Pictures/myPattern.gif); } does someone know how to assign an image (e.g xxx.jpg) to a selected item from a combobox? i want to use an item from a combobox and then display its corresponding image: that is if i choose y from the combobox it should display the corresponding xxx.jpg...plz help me:( -- View this message in context: http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9360002 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: displaying 2 images from combobox
thanks for the info... am still having a lot of problems...you told me to declare it, so i did.but still i cant. in fact am new to gtk+ and dont know too mucn but i have to manage because i have to submit my project on gtk+.. i tried this too: void on_cbo_itemdesign_changed (GtkComboBox *combobox, gpointer user_data) { GtkWidget *image1; GtkWidget *image; image = lookup_widget(GTK_WIDGET(combobox), img_objectdesign); gtk_image_set_from_file (GTK_IMAGE(image), Pictures/baby.jpg); image1 = lookup_widget(GTK_WIDGET(combobox), img_patterndesign); gtk_image_set_from_file(GTK_IMAGE(image1), Pictures/myPattern.gif); } does someone know how to assign an image (e.g xxx.jpg) to a selected item from a combobox? i want to use an item from a combobox and then display its corresponding image: that is if i choose y from the combobox it should display the corresponding xxx.jpg...plz help me:( -- View this message in context: http://www.nabble.com/displaying-2-images-from-combobox-tf3361889.html#a9360007 Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: displaying 2 images from combobox
lucks escreveu: image1 = lookup_widget(GTK_WIDGET(combobox), img_patterndesign); Hi, you have a space between and img_. -- Yours Truly, Junior Polegato A pilgrim of problems; A parchment of solutions! Professional Page: http://www.juniorpolegato.com.br ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
GLib 2.12.10 released
GLib 2.12.10 is now available for download at: ftp://ftp.gtk.org/pub/glib/2.12/ http://download.gnome.org/sources/glib/2.12/ glib-2.12.10.tar.bz2 md5sum: 82d44a53690b0eff8f7a5dc65e592f61 glib-2.12.10.tar.gzmd5sum: 6bbf2372fa4b4e32015d6c31208e18e6 This is a bug fix release in the 2.12 series. GLib is the low-level core library that forms the basis for projects such as GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system. More information about GLib is available at: http://www.gtk.org/ An installation guide for the GTK+ libraries, including GLib, can be found at: http://developer.gnome.org/doc/API/2.0/gtk/gtk-building.html Overview of Changes from GLib 2.12.9 to GLib 2.12.10 * Bugs fixed: 149144 Missing linker flags in tests prevent build with -z defs ... 399611 Variable checking base64 public functions 350802 GMarkupParser reports wrong position for invalid UTF-8 398069 Files missing from GLib distribution 398203 Screwy definition of g_date_set_time() 399971 goption flag typo 400044 g_utf8_char_validated doesn't return -2 when maxlen is 0 404832 g_date_strftime should use wcsftime if available 407431 GLib-Genmarshal-WARNING **: failed to open /dev/stdin: ... 341988 don't use -c with msgfmt in Makefile.in.in 346808 Minor tweaks for using GLib from Digital Mars c/c++ compi... 396899 glib mentions non-existing PATCH bugzilla keyword * New and updated translations (ar,[EMAIL PROTECTED],bn_IN,dz,en_GB,et,fi, fr,gu,hu,it,ko,lt,mk,nb,nl,pl,pt,pt_BR,sq,sv,uk,zh_HK,zh_TW) A list of all the fixed bugs can be found at: http://bugzilla.gnome.org/buglist.cgi?bug_id=346808,398069,398203,398069,399971,400044,396899,404832,149144,341988,399611,350802,407431 Thanks to all contributors: Tor Lillqvist Serhat Sevki Dincer Owen Taylor Jon Oberheide Benjamin Dauvergne Roozbeh Pournader Loïc Minier Laszlo Peter Martyn Russell Simon Budig Matthias Clasen March 7, 2007 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Problem to open a new window using libglade
Hello, if I use g_idle_add, then when the function from g_idle_add is executed, it blocks the 'update_pbar' function. So I probably must make it with threads but by now I think it's to early for me to work with threads. It's easier if I add the progressbar into the main window, and update it with: while (gtk_events_pending()) gtk_main_iteration(); Later I would probably try it with threads. Thanks for the help. 2007/3/6, Karl H. Beckers [EMAIL PROTECTED]: Am Montag, den 05.03.2007, 17:03 +0100 schrieb patrick: Great! Thank you very much, this works. But how can I make something during gtk_dialog_run? I'd like to do somthing like this. g_timeout_add(1000, update_pbar, dialog); result = gtk_dialog_run(GTK_DIALOG(dialog)); ...my process which progressbar should show g_spawn... progress = 0.2 other work gtk_widget_destroy(dialog); dialog = NULL; update_pbar (gpointer dialog) { ... gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(probar), progress); ... } Well, you either need another scheduled function (prolly g_idle_add) or start a separate thread when entering your callback and join it before ending. You prolly want to avoid multi-threading for such a rather limited use-case. Also, I've noted a flaw in my pseudo-code around setting dialog to NULL which does not change the pointer that has already been passed to update_pbar ... a static global would prolly do here or smth. similar. HTH, Karl. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Expose event crashes app
Hi all, I am developing a application, which is able to play back several jpeg/mpeg files simultaneously in a single window(like NxN cell table), I mainly use gdk_draw_rgb_image to render decoded frame. It works quite well for a while but fails to stand for more then 2 week. It will crash with segv after long run(eg, 2 weeks or more). The back trace always looks the the same, and it seems that it has nothing to do with my code, so that I have no idea where to start the investigation. The app is built on gtk+- 2.4.0(fedora core 2 gtk2-2.4.0-1.i386.rpm). According to the bt msg, segv happens when expose event is triggered. I have searched through the mail archive without finding any similar situation. First I'd like to know that whether this is due to the old gtk-2 library. If it is not, where is the good start point for investigation. Any clue is appreciated. #0 0xb7c22a9a in g_object_remove_weak_pointer (object=0x8f74780, weak_pointer_location=0x8f53448 ) at gobject.c:1548 #1 0xb7d02d61 in queue_item_free (item=0x8f53448) at gdkgeometry-x11.c :914 #2 0xb7d030a5 in _gdk_window_process_expose (window=0x9146260, serial=88452651, area=0x20) at gdkgeometry-x11.c:1051 #3 0xb7cfcb9d in gdk_event_translate (display=0x82d7010, event=0x8e484f0, xevent=0xbfffe340, return_exposes=0) at gdkevents-x11.c:1484 #4 0xb7cfd6fd in _gdk_events_queue (display=0x82d7010) at gdkevents-x11.c :2067 #5 0xb7cfd891 in gdk_event_dispatch (source=0x20, callback=0, user_data=0x0) at gdkevents-x11.c:2127 #6 0xb7bb2e4a in g_main_dispatch (context=0x82e1d38) at gmain.c:1895 #7 0xb7bb3f28 in g_main_context_dispatch (context=0x82e1d38) at gmain.c :2441 #8 0xb7bb4260 in g_main_context_iterate (context=0x82e1d38, block=1, dispatch=1, self=0x830fa10) at gmain.c:2522 #9 0xb7bb48a3 in g_main_loop_run (loop=0x8e49790) at gmain.c:2726 #10 0xb7e39403 in gtk_main () at gtkmain.c:1172 #11 0x0809f138 in main (argc=1, argv=0xbfffe664) at main.cc:252 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Fixing size of window containing 2 buttons
I am just starting with GTK, so no doubt I am missing something basic. I have a window with a buttonbox with 2 buttons. I use size_allocate on the buttons to position them. One of the buttons starts hidden. I would like to size the window so that it will accommodate both buttons, but I keep getting a window wide enough only for the one visible button. I have tried set_size_request on the window. I tried catching size-request on the window to confirm that the requisition is correct. It is. I also have set_size_request on the buttonbox, which I believe should not be necessary (and seems to do nothing). What am I missing? -- Jeffrey Barish ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Fixing size of window containing 2 buttons
On Wed, 7 Mar 2007, Jeffrey Barish wrote: I am just starting with GTK, so no doubt I am missing something basic. I have a window with a buttonbox with 2 buttons. I use size_allocate on the buttons to position them. One of the buttons starts hidden... It may be possible to get that to work right, but why do you want to do it? It's surely making life more difficult. Why not make the not yet button disabled (gtk_widget_set_sensitive()) until it becomes relevant? Allin Cottrell ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list