comparison src/gui.c @ 1767:59edc8429da0 v7.2.065

updated for version 7.2-065
author vimboss
date Wed, 03 Dec 2008 17:50:45 +0000
parents f10fe14748e2
children 3dd986bfef63
comparison
equal deleted inserted replaced
1766:bb4797166e4c 1767:59edc8429da0
3239 /* We don't want a resize event change "Rows" here, save and 3239 /* We don't want a resize event change "Rows" here, save and
3240 * restore it. Resizing is handled below. */ 3240 * restore it. Resizing is handled below. */
3241 i = Rows; 3241 i = Rows;
3242 gui_update_tabline(); 3242 gui_update_tabline();
3243 Rows = i; 3243 Rows = i;
3244 need_set_size = RESIZE_VERT; 3244 need_set_size |= RESIZE_VERT;
3245 if (using_tabline) 3245 if (using_tabline)
3246 fix_size = TRUE; 3246 fix_size = TRUE;
3247 if (!gui_use_tabline()) 3247 if (!gui_use_tabline())
3248 redraw_tabline = TRUE; /* may draw non-GUI tab line */ 3248 redraw_tabline = TRUE; /* may draw non-GUI tab line */
3249 } 3249 }
3273 } 3273 }
3274 } 3274 }
3275 if (gui.which_scrollbars[i] != prev_which_scrollbars[i]) 3275 if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
3276 { 3276 {
3277 if (i == SBAR_BOTTOM) 3277 if (i == SBAR_BOTTOM)
3278 need_set_size = RESIZE_VERT; 3278 need_set_size |= RESIZE_VERT;
3279 else 3279 else
3280 need_set_size = RESIZE_HOR; 3280 need_set_size |= RESIZE_HOR;
3281 if (gui.which_scrollbars[i]) 3281 if (gui.which_scrollbars[i])
3282 fix_size = TRUE; 3282 fix_size = TRUE;
3283 } 3283 }
3284 } 3284 }
3285 #ifdef FEAT_WINDOWS 3285 #ifdef FEAT_WINDOWS
3295 * restore it. Resizing is handled below. */ 3295 * restore it. Resizing is handled below. */
3296 i = Rows; 3296 i = Rows;
3297 gui_mch_enable_menu(gui.menu_is_active); 3297 gui_mch_enable_menu(gui.menu_is_active);
3298 Rows = i; 3298 Rows = i;
3299 prev_menu_is_active = gui.menu_is_active; 3299 prev_menu_is_active = gui.menu_is_active;
3300 need_set_size = RESIZE_VERT; 3300 need_set_size |= RESIZE_VERT;
3301 if (gui.menu_is_active) 3301 if (gui.menu_is_active)
3302 fix_size = TRUE; 3302 fix_size = TRUE;
3303 } 3303 }
3304 #endif 3304 #endif
3305 3305
3306 #ifdef FEAT_TOOLBAR 3306 #ifdef FEAT_TOOLBAR
3307 if (using_toolbar != prev_toolbar) 3307 if (using_toolbar != prev_toolbar)
3308 { 3308 {
3309 gui_mch_show_toolbar(using_toolbar); 3309 gui_mch_show_toolbar(using_toolbar);
3310 prev_toolbar = using_toolbar; 3310 prev_toolbar = using_toolbar;
3311 need_set_size = RESIZE_VERT; 3311 need_set_size |= RESIZE_VERT;
3312 if (using_toolbar) 3312 if (using_toolbar)
3313 fix_size = TRUE; 3313 fix_size = TRUE;
3314 } 3314 }
3315 #endif 3315 #endif
3316 #ifdef FEAT_FOOTER 3316 #ifdef FEAT_FOOTER
3317 if (using_footer != prev_footer) 3317 if (using_footer != prev_footer)
3318 { 3318 {
3319 gui_mch_enable_footer(using_footer); 3319 gui_mch_enable_footer(using_footer);
3320 prev_footer = using_footer; 3320 prev_footer = using_footer;
3321 need_set_size = RESIZE_VERT; 3321 need_set_size |= RESIZE_VERT;
3322 if (using_footer) 3322 if (using_footer)
3323 fix_size = TRUE; 3323 fix_size = TRUE;
3324 } 3324 }
3325 #endif 3325 #endif
3326 #if defined(FEAT_MENU) && !defined(WIN16) && !(defined(WIN3264) && !defined(FEAT_TEAROFF)) 3326 #if defined(FEAT_MENU) && !defined(WIN16) && !(defined(WIN3264) && !defined(FEAT_TEAROFF))
3328 { 3328 {
3329 gui_mch_toggle_tearoffs(using_tearoff); 3329 gui_mch_toggle_tearoffs(using_tearoff);
3330 prev_tearoff = using_tearoff; 3330 prev_tearoff = using_tearoff;
3331 } 3331 }
3332 #endif 3332 #endif
3333 if (need_set_size) 3333 if (need_set_size != 0)
3334 { 3334 {
3335 #ifdef FEAT_GUI_GTK 3335 #ifdef FEAT_GUI_GTK
3336 long c = Columns; 3336 long prev_Columns = Columns;
3337 long prev_Rows = Rows;
3337 #endif 3338 #endif
3338 /* Adjust the size of the window to make the text area keep the 3339 /* Adjust the size of the window to make the text area keep the
3339 * same size and to avoid that part of our window is off-screen 3340 * same size and to avoid that part of our window is off-screen
3340 * and a scrollbar can't be used, for example. */ 3341 * and a scrollbar can't be used, for example. */
3341 gui_set_shellsize(FALSE, fix_size, need_set_size); 3342 gui_set_shellsize(FALSE, fix_size, need_set_size);
3347 * change Columns and Rows when we don't want it. Wait for a 3348 * change Columns and Rows when we don't want it. Wait for a
3348 * character here to avoid this effect. 3349 * character here to avoid this effect.
3349 * If you remove this, please test this command for resizing 3350 * If you remove this, please test this command for resizing
3350 * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q". 3351 * effects (with optional left scrollbar): ":vsp|q|vsp|q|vsp|q".
3351 * Don't do this while starting up though. 3352 * Don't do this while starting up though.
3352 * And don't change Rows, it may have be reduced intentionally 3353 * Don't change Rows when adding menu/toolbar/tabline.
3353 * when adding menu/toolbar/tabline. */ 3354 * Don't change Columns when adding vertical toolbar. */
3354 if (!gui.starting) 3355 if (!gui.starting && need_set_size != (RESIZE_VERT | RESIZE_HOR))
3355 (void)char_avail(); 3356 (void)char_avail();
3356 Columns = c; 3357 if ((need_set_size & RESIZE_VERT) == 0)
3358 Rows = prev_Rows;
3359 if ((need_set_size & RESIZE_HOR) == 0)
3360 Columns = prev_Columns;
3357 #endif 3361 #endif
3358 } 3362 }
3359 #ifdef FEAT_WINDOWS 3363 #ifdef FEAT_WINDOWS
3360 /* When the console tabline appears or disappears the window positions 3364 /* When the console tabline appears or disappears the window positions
3361 * change. */ 3365 * change. */