# HG changeset patch # User nenolod # Date 1160614383 25200 # Node ID 6597c7bd11d96d879e03c4bf4b675fb9aa0776f9 # Parent ec2899d8b8afcc208ad409c30bba260cb4423deb [svn] - avoid recreating the window unless an actual size-dimensional change has occured. diff -r ec2899d8b8af -r 6597c7bd11d9 ChangeLog --- a/ChangeLog Wed Oct 11 17:47:31 2006 -0700 +++ b/ChangeLog Wed Oct 11 17:53:03 2006 -0700 @@ -1,3 +1,11 @@ +2006-10-12 00:47:31 +0000 William Pitcock + revision [2667] + - don't use hardcoded values for the time indicator area + + trunk/audacious/mainwin.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + + 2006-10-11 19:37:16 +0000 William Pitcock revision [2665] - add the Osmosis skin, a more sophisticated example of the new skinning engine. diff -r ec2899d8b8af -r 6597c7bd11d9 audacious/mainwin.c --- a/audacious/mainwin.c Wed Oct 11 17:47:31 2006 -0700 +++ b/audacious/mainwin.c Wed Oct 11 17:53:03 2006 -0700 @@ -951,9 +951,40 @@ widget_move(WIDGET(mainwin_about), bmp_active_skin->properties.mainwin_about_x, bmp_active_skin->properties.mainwin_about_y); + /* visibility attributes */ + if (bmp_active_skin->properties.mainwin_menurow_visible) + widget_show(WIDGET(mainwin_menurow)); + else + widget_hide(WIDGET(mainwin_menurow)); + + if (bmp_active_skin->properties.mainwin_text_visible) + widget_show(WIDGET(mainwin_info)); + else + widget_hide(WIDGET(mainwin_info)); + + if (bmp_active_skin->properties.mainwin_othertext_visible) + widget_show(WIDGET(mainwin_othertext)); + else + widget_hide(WIDGET(mainwin_othertext)); + + if (bmp_active_skin->properties.mainwin_vis_visible) + widget_show(WIDGET(mainwin_vis)); + else + widget_hide(WIDGET(mainwin_vis)); + /* window size, mainwinWidth && mainwinHeight properties */ if (bmp_active_skin->properties.mainwin_height && bmp_active_skin->properties.mainwin_width) { + gint width, height; + + gdk_window_get_size(mainwin->window, &width, &height); + + if (width == bmp_active_skin->properties.mainwin_width && + height == bmp_active_skin->properties.mainwin_height) + { + return; + } + gdk_window_set_hints(mainwin->window, 0, 0, bmp_active_skin->properties.mainwin_width, cfg.player_shaded ? MAINWIN_SHADED_HEIGHT : bmp_active_skin->properties.mainwin_height, @@ -976,27 +1007,6 @@ widget_list_change_pixmap(mainwin_wlist, mainwin_bg); gdk_flush(); } - - /* visibility attributes */ - if (bmp_active_skin->properties.mainwin_menurow_visible) - widget_show(WIDGET(mainwin_menurow)); - else - widget_hide(WIDGET(mainwin_menurow)); - - if (bmp_active_skin->properties.mainwin_text_visible) - widget_show(WIDGET(mainwin_info)); - else - widget_hide(WIDGET(mainwin_info)); - - if (bmp_active_skin->properties.mainwin_othertext_visible) - widget_show(WIDGET(mainwin_othertext)); - else - widget_hide(WIDGET(mainwin_othertext)); - - if (bmp_active_skin->properties.mainwin_vis_visible) - widget_show(WIDGET(mainwin_vis)); - else - widget_hide(WIDGET(mainwin_vis)); } void