Re: [Gtk-osx-users] ige-mac-bundler and gtk_image_new_from_file



On Mar 24, 2011, at 2:56 PM, Shawn Bakhtiar wrote:

> 
> The output is the runtime value of the variables from a debug function (the first is jhbuild the second is running the bundle from the command line), the question is, I don't know why all the cairo_* functions seem to find the correct location, and have no permission issues in opening the file, while the gtk_image_new_from_file does not work, and I don't know why it does not work? 
> 
> Here is how I got around it, instead of loading a GtkImage, I ceated a GtkDrawingArea like so, and now the logo shows with no problems:
> 
> 
> 
> 
> 
>      GtkWidget *drawing_area = gtk_drawing_area_new ();
>      gtk_widget_set_size_request (drawing_area, 128, 128);
>      g_signal_connect (G_OBJECT (drawing_area), "expose-event",
>                        G_CALLBACK (isi_app_draw_logo_callback), (gpointer)self);
>      
>     // logo = gtk_image_new_from_file (file_name);
>      gtk_box_pack_start(main_hbox,drawing_area,FALSE,FALSE,0);
>      gtk_widget_show (drawing_area);

Ah. Are you sure that your bundle includes the gdk-pixbuf loadable modules? They moved out of lib/gtk+-2.0 into lib/gdk-pixbuf-2.0 between Gtk+-2.20 and Gtk+-2.24.

Regards,
John Ralls






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