Hi again, On 10/31/07, Chris Rorvick <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > On 10/31/07, Chris Rorvick <[EMAIL PROTECTED]> wrote: > >> I have a GTK application that modifies the foreground and background of > >> many different buttons rapidly. These buttons should not be themed, so > >> it seems that the gtk_widget_modify_*() functions incur an unnecessary > >> overhead. Is there a way to remove the theming of a widget? I've tried > > > > I do this by defining a set of styles in a style file (eg. > > "error_style" is reddish), then have a line binding all widgets named > > In my code I do gtk_widget_set_name( widget, "error_widget" ); to get > > it drawn in the red style, and _set_name( "" ); to have it drawn in > > the regular style. > > Thank you for the feedback. I think what you are suggesting is a way to > override the default style for a particular widget. I don't think this > achieves my primary goal, though, of avoiding the overhead incurred by > the logic in GTK that supports themes. This overhead includes acquiring > a lock and navigating/manipulating linked lists of styles. Use of a > profiler has shown this to be a significant burden to my application.
Yes, I saw you other posts. I'm suggesting a way you can change button styles quickly. The idea is that you make a set of static styles when your program starts up, then as it runs, rather than modifying styles, you just change which style is used to draw each widget. I guess I don't understand what you're trying to do :-( What's the problem with the theme engine? John _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list