LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2004, 11:47 AM   #1
Rajahuroman
Member
 
Registered: May 2004
Location: Romania; Arad
Distribution: Archlinux
Posts: 91

Rep: Reputation: 15
GtkImage problem with gtk_image_set_from_file


Hello

I used gtk_image_set_from_file but the image looks hazy, like beeing fogged. I don't understand why. Can anyone help me?
 
Old 05-17-2004, 12:29 PM   #2
rkef
Member
 
Registered: Mar 2004
Location: bursa
Posts: 110

Rep: Reputation: 15
I've only been using GTK for < one week, but I just use:
Code:
GtkWidget*  gtk_image_new_from_file         (const gchar *filename);
for creating image widgets, and I've had no problems at all. Try that; if you still have a problem, then it's something beyond what I could guess at.. maybe post or link us to the relevant code, so we can try it .
 
Old 05-19-2004, 08:34 AM   #3
Rajahuroman
Member
 
Registered: May 2004
Location: Romania; Arad
Distribution: Archlinux
Posts: 91

Original Poster
Rep: Reputation: 15
The relevant code was
GtkWidget *pendul;
pendul=gtk_image_new_from_file("foucoultmic.jpg");
gtk_widget_show (pendul);
gtk_box_pack_start (GTK_BOX (hbox1), pendul, FALSE, FALSE, 3);
gtk_widget_set_size_request (pendul, 200, 316);
gtk_widget_set_sensitive (pendul, FALSE);

It is generated by Glade. I used it to speed up things in designing my interface. I commented the last line (gtk_widget_set_sensitive (pendul, FALSE) and now everything seems to be allright. The image is displayed as it should. I don't really need any more help but I would be curious if somebody may tell me why gtk_widget_set_sensitive (pendul, FALSE); makes the image look like being sorounded by a fog. You can try it too. Just add gtk_widget_set_sensitive (/*your widget*/, FALSE);. Why does it scramble my image?
 
Old 05-19-2004, 12:04 PM   #4
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
That is what sensitive does. I think sensitive means you can't select it, or rather, its read only. You'll see text sometimes that is sensitive, or grayed, like unusable menu items. Ya! Thats it! For menu items, pretend a menu item "Save" has a Save Disk image to the side of it, now if it is grayed, or sensitive, then the Save Disk image would be fogged also!

Thats why.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GTK GtkImage Widget Rajahuroman Programming 8 03-14-2006 06:56 PM
GtkImage C HowTo required kevin1 Programming 2 07-16-2005 10:29 AM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration