Allow Windows Close (X) in more popup dialogs
- Settings - Skins - Copy Page - Resolution - Gradients - Brush Effects - Brush menu - Effects - Help / About - Statistics - Palette - Palette Historgram - 2nd palette menu
This commit is contained in:
parent
79621855f9
commit
e72bb8cab1
@ -1164,7 +1164,7 @@ void Button_Settings(int btn)
|
||||
else if (Is_shortcut(Key,0x100+BUTTON_SETTINGS))
|
||||
clicked_button=4;
|
||||
}
|
||||
while ( (clicked_button!=4) && (Key!=KEY_RETURN) );
|
||||
while ( (clicked_button!=4) && (Key!=KEY_RETURN) && !Quit_is_required);
|
||||
|
||||
// Checks on change
|
||||
if (Config.Show_hidden_directories!=selected_config.Show_hidden_directories
|
||||
@ -1490,7 +1490,7 @@ void Button_Skins(int btn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
while ( (clicked_button!=1) && (clicked_button !=6) && (Key != KEY_ESCAPE));
|
||||
while ( (clicked_button!=1) && (clicked_button !=6) && (Key != KEY_ESCAPE) && !Quit_is_required);
|
||||
|
||||
if(clicked_button == 1)
|
||||
{
|
||||
@ -1708,7 +1708,7 @@ void Button_Copy_page(int btn)
|
||||
else if (Is_shortcut(Key,0x200+BUTTON_PAGE))
|
||||
clicked_button=6;
|
||||
}
|
||||
while (clicked_button<=0);
|
||||
while (clicked_button<=0 && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
Display_cursor();
|
||||
@ -2174,7 +2174,7 @@ void Button_Resolution(int btn)
|
||||
}
|
||||
|
||||
}
|
||||
while ((clicked_button!=1) && (clicked_button!=2));
|
||||
while ((clicked_button!=1) && (clicked_button!=2) && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
|
||||
@ -2823,7 +2823,7 @@ void Button_Gradients(int btn)
|
||||
}
|
||||
}
|
||||
}
|
||||
while (clicked_button!=6 && clicked_button!=7);
|
||||
while (clicked_button!=6 && clicked_button!=7 && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
// The Grad rect operation uses the same button as Grad menu.
|
||||
@ -4042,7 +4042,7 @@ void Button_Brush_FX(int btn)
|
||||
clicked_button=1;
|
||||
}
|
||||
}
|
||||
while (clicked_button<=0);
|
||||
while (clicked_button<=0 && Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
Unselect_button(btn);
|
||||
@ -4500,7 +4500,7 @@ void Button_Airbrush_menu(int btn)
|
||||
}
|
||||
}
|
||||
}
|
||||
while ( (clicked_button!=1) && (clicked_button!=2) );
|
||||
while ( (clicked_button!=1) && (clicked_button!=2) && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
|
||||
@ -4958,9 +4958,9 @@ void Button_Effects(int btn)
|
||||
Display_cursor();
|
||||
}
|
||||
}
|
||||
while (clicked_button!=11);
|
||||
while (clicked_button!=11 && !Quit_is_required);
|
||||
|
||||
if (exit_by_close_button)
|
||||
if (exit_by_close_button || Quit_is_required)
|
||||
Close_window();
|
||||
else
|
||||
Hide_cursor();
|
||||
|
||||
@ -768,7 +768,7 @@ void Window_help(int section, const char *sub_section)
|
||||
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
||||
clicked_button=1;
|
||||
}
|
||||
while ((clicked_button!=1) && (Key!=KEY_RETURN));
|
||||
while ((clicked_button!=1) && (Key!=KEY_RETURN) && !Quit_is_required);
|
||||
|
||||
Key=0;
|
||||
Close_window();
|
||||
@ -1057,7 +1057,7 @@ void Button_Stats(int btn)
|
||||
if (Is_shortcut(Key,0x200+BUTTON_HELP))
|
||||
clicked_button=1;
|
||||
}
|
||||
while ( (clicked_button!=1) && (Key!=KEY_RETURN) );
|
||||
while ( (clicked_button!=1) && (Key!=KEY_RETURN) && !Quit_is_required);
|
||||
|
||||
if(Key==KEY_RETURN)Key=0;
|
||||
|
||||
|
||||
@ -1036,7 +1036,7 @@ int Window_Histogram(unsigned char block_start, unsigned char block_end, dword*
|
||||
if (Key == KEY_ESC)
|
||||
clicked_button=1;
|
||||
|
||||
} while( clicked_button < 1);
|
||||
} while( clicked_button < 1 && !Quit_is_required);
|
||||
Close_window();
|
||||
|
||||
if (clicked_button==2)
|
||||
@ -2832,7 +2832,7 @@ void Button_Palette(int btn)
|
||||
}
|
||||
}
|
||||
}
|
||||
while ((clicked_button!=13) && (clicked_button!=14));
|
||||
while ((clicked_button!=13) && (clicked_button!=14) && !Quit_is_required);
|
||||
|
||||
if (clicked_button==14) // Sortie par OK
|
||||
{
|
||||
@ -2862,7 +2862,7 @@ void Button_Palette(int btn)
|
||||
|
||||
Display_cursor();
|
||||
|
||||
if (clicked_button==13) // Sortie par CANCEL
|
||||
if (clicked_button==13 || Quit_is_required) // CANCEL was clicked
|
||||
{
|
||||
Set_palette(Main.palette);
|
||||
if (image_is_backed_up)
|
||||
@ -3009,7 +3009,7 @@ void Button_Secondary_palette(int btn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (clicked_button!=1 && clicked_button!=2 && clicked_button!=3 && clicked_button!=4);
|
||||
while ((clicked_button <= 0 || clicked_button >= 5) && !Quit_is_required);
|
||||
|
||||
// We need to get the sliders positions before closing the window, because they will be freed.
|
||||
palette_cols=256-columns_slider->Position;
|
||||
@ -3021,7 +3021,7 @@ void Button_Secondary_palette(int btn)
|
||||
Unselect_button(BUTTON_PALETTE);
|
||||
Display_cursor();
|
||||
|
||||
if (clicked_button==4) // Cancel
|
||||
if (clicked_button==4 || Quit_is_required) // Cancel
|
||||
return;
|
||||
|
||||
if (palette_vertical != Config.Palette_vertical)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user