Mercurial > hg > xemacs-beta
diff src/toolbar-msw.c @ 905:c15f25529e61
[xemacs-hg @ 2002-07-06 21:05:42 by andyp]
toolbar redisplay patch
author | andyp |
---|---|
date | Sat, 06 Jul 2002 21:05:58 +0000 |
parents | 79c6ff3eef26 |
children | ccd0667b4764 |
line wrap: on
line diff
--- a/src/toolbar-msw.c Sat Jul 06 18:56:31 2002 +0000 +++ b/src/toolbar-msw.c Sat Jul 06 21:05:58 2002 +0000 @@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* This implementation by Andy Piper <andyp@parallax.co.uk>, with bits +/* This implementation by Andy Piper <andy@xemacs.org>, with bits borrowed from toolbar-x.c */ /* Synched up with: Not in FSF. */ @@ -550,22 +550,30 @@ if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, TOP_TOOLBAR); - else if (f->top_toolbar_was_visible) - mswindows_clear_toolbar (f, TOP_TOOLBAR, 0); - if (FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, BOTTOM_TOOLBAR); - else if (f->bottom_toolbar_was_visible) - mswindows_clear_toolbar (f, BOTTOM_TOOLBAR, 0); - if (FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, LEFT_TOOLBAR); - else if (f->left_toolbar_was_visible) - mswindows_clear_toolbar (f, LEFT_TOOLBAR, 0); - if (FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) mswindows_output_toolbar (f, RIGHT_TOOLBAR); - else if (f->right_toolbar_was_visible) +} + +static void +mswindows_clear_frame_toolbars (struct frame *f) +{ + assert (FRAME_MSWINDOWS_P (f)); + + if (f->top_toolbar_was_visible + && !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, TOP_TOOLBAR, 0); + if (f->bottom_toolbar_was_visible + && !FRAME_REAL_BOTTOM_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, BOTTOM_TOOLBAR, 0); + if (f->left_toolbar_was_visible + && !FRAME_REAL_LEFT_TOOLBAR_VISIBLE (f)) + mswindows_clear_toolbar (f, LEFT_TOOLBAR, 0); + if (f->right_toolbar_was_visible + && !FRAME_REAL_RIGHT_TOOLBAR_VISIBLE (f)) mswindows_clear_toolbar (f, RIGHT_TOOLBAR, 0); } @@ -640,6 +648,7 @@ console_type_create_toolbar_mswindows (void) { CONSOLE_HAS_METHOD (mswindows, output_frame_toolbars); + CONSOLE_HAS_METHOD (mswindows, clear_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, initialize_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, free_frame_toolbars); CONSOLE_HAS_METHOD (mswindows, redraw_exposed_toolbars);