GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 23, 2014 1:47 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: set name of icon when minimised
PostPosted: Mon Jan 02, 2012 7:13 am 
Offline
Familiar Face

Joined: Sat Jun 11, 2011 4:30 am
Posts: 7
I am able to set a icon using a png image using the below code.

pixbuf = gdk_pixbuf_new_from_file("web.png", &error);
gtk_window_set_icon(theWindow, pixbuf);


The above code is working, When the user minimizes the window; icon is displayed. But the name of the icon is the name of the window,
My question is can we change the name of the icon, when it is minimized?


Top
 Profile  
 
 Post subject: Re: set name of icon when minimised
PostPosted: Mon Jan 02, 2012 3:26 pm 
Offline

Joined: Fri Dec 23, 2011 9:18 am
Posts: 2
Hi.
Have you tried with gtk_window_set_icon_name()?


Top
 Profile  
 
 Post subject: Re: set name of icon when minimised
PostPosted: Tue Jan 03, 2012 1:47 pm 
Offline
Familiar Face

Joined: Sat Jun 11, 2011 4:30 am
Posts: 7
Hi,

The above API does not work, I have tried it.
This API is for setting the icons provided by the GTK using name of the icon read the description of the API.

Regards,
Suhas


Top
 Profile  
 
 Post subject: Re: set name of icon when minimised
PostPosted: Thu Jan 05, 2012 2:58 pm 
Offline
Familiar Face

Joined: Wed Aug 17, 2011 12:20 pm
Posts: 20
Not sure if you got the semantics right. The iconified window is drawn by the window manager. GTK can only provide some hints on how to do that.

The window manager does not have a concept of a program icon name. In the little rectangle that represents the iconified window the window manager writes the window title (!), and if GTK has supplied some icon on the application's behalf, the window manager might include it in that rectangle (some window managers don't, or allow the user to switch this off). Please note the text written is the window title *by definition*, not some label that could be changed.

Now while it is conceivable that a window manager might accept a hint in the form of a small text that replaces the window title when the window is iconified (I gather this is what you want), I'm not aware of any window manager that actually does that (anybody knowing better please correct me).

So if I understand your desire correctly, I have to disappoint you. In general, it's not possible.

Cheers Peter


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group