RES: Any way to make GTK+ themes work under WIN32 port?
"Daniel K. O." <[email protected]>
| Newsgroups | gmane.comp.video.gimp.windows.devel |
|---|---|
| Message-ID | <[email protected]> |
Sorry bothering you guys again, but I think I found where my problem with
the "flat" engine lies. There is a function on flat_theme_draw.c, called
"make_the_stupid_things" (???). The problem seems to be the last 5 lines:
---
static void
make_the_stupid_things (FlatStyle *style)
{
GdkColormap *cmap = GTK_STYLE(style)->colormap;
GdkGC *gc = GTK_STYLE(style)->white_gc;
GdkImage *a, *b, *c, *d, *e;
GdkVisual *visual = gdk_colormap_get_visual (cmap);
GdkPixmap *p[4];
int i, j, width, height;
style->is_made = TRUE;
init ();
a = gdk_image_new (GDK_IMAGE_NORMAL, visual, 12, 12);
b = gdk_image_new (GDK_IMAGE_NORMAL, visual, 12, 12);
c = gdk_image_new (GDK_IMAGE_NORMAL, visual, 4, 4);
d = gdk_image_new (GDK_IMAGE_NORMAL, visual, 4, 4);
e = gdk_image_new (GDK_IMAGE_NORMAL, visual, 4, 4);
/*
a lot of drawing stuffs here
*/
gdk_image_destroy (a);
gdk_image_destroy (b);
gdk_image_destroy (c);
gdk_image_destroy (d);
gdk_image_destroy (e);
}
---
If you wanna see the entire function, take a look here:
http://www.danielko.kit.net/gtk/make_the_stupid_things.txt
The problem seems to be the "gdk_image_destroy" function. Commenting these
lines I don't get any error (but I probably get memory leaks...).
In the docs, it is writen:
"To destroy a GdkImage use gdk_image_destroy()."
but also:
"gdk_image_destroy is deprecated and should not be used in newly-written
code. "
Should I replace "gdk_image_destroy"?
Thanks again
Daniel K. O.
> -----Mensagem original-----
> De: Daniel K. O. [mailto:[email protected]]
> Enviada em: domingo, 29 de dezembro de 2002 21:21
> Para: [email protected]
> Assunto: RES: [gimpwin-dev] Any way to make GTK+ themes work under WIN32
> port?
>
>
> Hi guys
>
> I also got the gtk 2.0 theme engines working on Windows.
> But I still can't use the "flat" engine. I'm still geting this
> error when
> using the engine:
>
>
> --
> (test.exe:4278774943): GLib-GObject-CRITICAL **: file
> gobject.c: line 1308
> (g_object_unref): assertion `object->ref_count > 0' failed
> --
>
>
>
> Oh yeah, and I still need to specify the complete path to the
> engine, like:
>
> --
> engine "/windows/system/flat" { }
> --
>
> If I try anything else, I'll get errors saying that it could
> not find the
> engine on the module_path (or something like that).
> Wouldn't be nice if it just tried to find the engines on the
> system (or the
> lib) directory?
>
>
> I never used the "flat" engine under linux, so I don't know if this also
> happens on linux. Could anyone give me a hint about this? If
> anyone cares,
> the source codes and the Dev-C++ (with MinGW 2.0) project files
> are here:
> http://www.danielko.kit.net/gtk/gtk-flat-theme-2.tar.gz
>
>
>
>
> Thanks for any help.
>
> (PS: Happy New Year 4 U ALL :D )
>
> Daniel K. O.
>
>
>
>
>
> > -----Mensagem original-----
> > De: Ãystein O Johansen [mailto:[email protected]]
> > Enviada em: domingo, 29 de dezembro de 2002 18:10
> > Para: [email protected]
> > Assunto: Re: [gimpwin-dev] Any way to make GTK+ themes work
> under WIN32
> > port?
> >
> >
> > Here's mine:
> >
> > http://home.online.no/~oeysteij/GTKThemes.html
> >
> > Works with GTK 1.3 on windows.
> >
> > -Ãystein
> >
>
>
>
> To Post a message, send it to: [email protected]
> To Unsubscribe, send a blank message to:
> [email protected]
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
>