Hi,<br><br>I'm using personalized rc files in my application[1], and works fine, You can see the code and rc files on svn[2]. Verify mtv-theme.c[3] and gtkrc[4].<br><br><br>Try change your rc file to something like this (I do not know if "xpm" is supported, I use "png"):
<br><font style="font-family: verdana,helvetica,sans-serif;" size="2">------------------------------------------------------------------------------------------<br>style "window"<br>{<br> engine "sapwood" {
<br> image {<br> function = BOX<br> file = "../common/images/bg.xmp"<br> }<br> }<br>}<br>class "GtkWindow" style "window"<br>----------------------------------------------------------------------------------------------
<br></font><br>"sapwood" is the default engine used on maemo platform, it is more faster then pixmap engine.<br><br>[1]https://garage.maemo.org/projects/mtv/<br>[2]https://garage.maemo.org/svn/mtv/trunk/mtv/<br>
[3]https://garage.maemo.org/svn/mtv/trunk/mtv/src/mtv-theme.c<br>[4]https://garage.maemo.org/svn/mtv/trunk/mtv/data/themes/indt/gtkrc<br><br>BR<br>Renato Araujo Filho<br><br><br><div><span class="gmail_quote">On 10/30/07,
<b class="gmail_sendername">Minti Maemo</b> <<a href="mailto:minti.maemo@yahoo.com">minti.maemo@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font style="font-family: verdana,helvetica,sans-serif;" size="2">hi,<br>i want to use gtk resource file (e.g. MyResource.rc ) to change background colour / to put background image on widget
<br>i am able to do same thing in simple gtk application . the same application is not able to load resource file on maemo platform .Is there any difference to load / write the resouce for maemo application (in hildon framework)?
<br><br>MyResource.rc<br>-------------------------------------------------------<br>pixmap_path "../common/images/"<br><br>style "window"<br>{<br> bg_pixmap[NORMAL] = "bg.xpm"<br>}<br>widget_class "GtkWindow" style "window"
<br><br>---------------------------------------------------------<br><br>App.c
/* Gtk App */<br>----------------------------------------------------------<br>int main(int argc ,char* argv[])
<br>{
<br> GtkWidget *window;<br> gtk_init(&argc,&argv);<br> <br> window = gtk_window_new(GTK_WINDOW_TOPLEVEL);<br> gtk_widget_set_name (window, "window");<br> <br> gtk_rc_parse ("</font>
<font style="font-family: verdana,helvetica,sans-serif;" size="2">MyResource.rc</font><font style="font-family: verdana,helvetica,sans-serif;" size="2">");<br> gtk_widget_show(window);
<br> gtk_main();<br>
<br> return 0;
<br>}<br>------------------------------------------------------------<br><br>App.c /*maemo App in Hildon */<br>-------------------------------------------------------------<br>int main( int argc, char* argv[] )
<br>{<br> <br> HildonProgram* program; <br> GtkWidget* window; <br><br> gtk_init( &argc, &argv );<br><br> program = HILDON_PROGRAM( hildon_program_get_instance() );<br> g_set_application_name( "My App" );
<br> <br> window = hildon_window_new();<br> gtk_widget_set_name (window ,"window");<br> </font><font style="font-family: verdana,helvetica,sans-serif;" size="2"> gtk_rc_parse ("</font><font style="font-family: verdana,helvetica,sans-serif;" size="2">
MyResource.rc</font><font style="font-family: verdana,helvetica,sans-serif;" size="2">"); <br></font><font style="font-family: verdana,helvetica,sans-serif;" size="2"> <br> hildon_program_add_window( program, HILDON_WINDOW(window));
<br> </font><font style="font-family: verdana,helvetica,sans-serif;" size="2"><br> gtk_widget_show(window); <br> gtk_main(); <br> <br> return 0;<br>}<br><br><br>-------------------------------------------------------------
<br>Thx<br>minti</font><span style="font-weight: bold;"><font size="2"><br><span class="ad"><br><span style="font-weight: bold;"></span></span></font><span class="ad"><br></span></span></div><span class="ad"><br>__________________________________________________
<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br><a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mail.yahoo.com</a> </span>
</div><br>_______________________________________________<br>maemo-developers mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br><br></blockquote>
</div><br><br clear="all"><br>-- <br>Renato Araujo Oliveira Filho<br>Instituto Nokia de Tecnologia - INdT