RE: Missing stock icons on win32



This works for me:

 

    /* Get Icons shown on buttons */

    settings = gtk_settings_get_default();

    gtk_settings_set_long_property(settings, "gtk-button-images", TRUE, "main");

 

Ian

 


From: gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] On Behalf Of G.Slomp - Dynamicc Welding b.v.
Sent: Friday, March 16, 2007 4:02 AM
To: gtkmm-list gnome org; gtk-list gnome org
Subject: Re: Missing stock icons on win32

 

Hello Surya,

I was facing the same problem when I ported my application to win32, so I read previous
messages in the mailinglist like Jonathon said.
The following solution works and was posted by Alexander:

||  for showing images on buttons in MS-Windows theme you must:
||  1. open file  ..\GTK\\share\themes\MS-Windows\gtk-2.0\gtkrc
||  2. change gtk-button-images = 0 to gtk-button-images = 1

I wasn't to happy about that, since you don't want to manually patch the
gtkrc file to see some icons. There must be a better way! Even changing it
in your application is slightly better. The following code works for me,
but i'm not to happy about it.

    //for switching on the stock id's in buttons for gtk+ under windows   
    GtkSettings *sSettings = gtk_settings_get_default();
    gtk_settings_set_string_property(sSettings,  "gtk-button-images", "1", "C:\\GTK\\share\\themes\\MS-Windows\\gtk-2.0\\gtkrc:5");

Is there any way to change the gtk-button-images setting without changing the gtkrc file without
using absolute paths? a gtk standard function or something, because I haven't found it.


Thank in advance,

Gerrie Slomp







Surya Kiran Gullapalli wrote:

Hi all,

I'm a newbie to gtk/gtkmm. I was trying to get a small application, written in gtk/gtkmm on windows, up and running.

I've downloaded the gtk+ installer from gladewin32.sf.net website.

 

I was able to get the application running. But the stock icons on the application are missing. Am i missing something here.

Any help would be greatly appreciated.

 

I'm using vs8 compiler

 

Thanks in advance,

Surya

 



 
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
  

 

--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]