ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I used Glade to design an interface and there I selected a GtkImage widget. also loaded an image there, using Glade. But when the program starts there is no image seen. Why? Must I load it at runtime as well as at design time? The tutorial at www.gnome.org isn't explicit enough. I tried using gtk_image_set_from_file() but it still doesn't load. I placed it in the on_window1_activate_default signal.
And another thing:
Can you tell me some website where I can find all the signals and their time of response, a description of all GTK+ signals?
Tank you, as soon as i'll get home, i'll try it. After almost 2 years I almost forgot I asked this question but I still couldn't find an answer. All of my GTK projects suffered from this little bug. Many, many thanks. If you ever come to Romania there's a beer for you in my account
Hi, I'm fairly new with Glade 2.10.0, have taken it through some paces, delighted. Am still having problems getting any image to come up with GtkImage I've tried making sure that a .jpg is available in the /myproject/pixmap directory, even tried .xpm and .png no good.
I tried working around it and simply having a GtkImage and setting the icon to a .jpg file, no go too (at least in that case the terminal window gave the file not found message.
In all cases there seems to be a problem finding it.
santhosh, I read your response of 11/05 but couldn't locate anything similar in main.c
Anyone else had this problem? suggestions? I've spent probably three days in the tutorials and manuals but the solution won't come to me.
You can then show the parent window which will also show the image. Note however, that you can't do much errorchecking with gtk_image_set_from_file(), gdk_pixbuf* may be a better way to go if you need to perform checks.
If you're still having problems, post more of you code so we can see what you're doing with your glade file.
Micah, thanks for your help.
Your reference to
gxml = glade_xml_new("whatever.glade"NULL,NULL);
has me a bit confused and curious. I just went back and searched high and low, in main,interface,support,callbacks and makefile and couldn't find any reference to anyting xml except a reference in Makefile to dependency on various flavors of libxml. I've never seen reference to it in any turorials or glade docs although I assumed it was involved somehow waaay in the background. NO, PLEASE don't tell me I need to learn another language
A thought I had this afternoon while finally out walking was that I set up glade to run on C not C++ would this have any effect on what I am trying to do?
I appoligize... I though you were using libglade which is different than glade generating the C code. My bad. In any case, you still don't have image1 pointing to anything. Can you post your main.c file?
Does not make sense as it is because although image1 is declared as a poitner to a GtkImage, it has not been assigned to a GtkImage. You say you have an image in glade, so when glade generated the C code there may be reference to it-- but you may also have to look it up. I'm not sure as I typically use libglade.
Alternately, you could use gtk_image_new_from_file instead, however, then you're not using the GtkImage you defined in the glade file but are instead creating a new one.