(source code) Fixed mistranslation of Select_button / Unselect_button

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@765 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud 2009-05-02 18:27:05 +00:00
parent 358b0ea076
commit cfb323cdf0
9 changed files with 69 additions and 69 deletions

View File

@ -78,7 +78,7 @@ void Bouton_***(void)
while (clicked_button!=1);
Close_window();
Unselect_bouton(BOUTON_***);
Unselect_button(BOUTON_***);
Display_cursor();
}
*/
@ -111,8 +111,8 @@ void Message_not_implemented(void)
// ne sait pas lequel c'est, on les désenclenche tous. De toutes façons, ça
// ne sert à rien d'essayer d'optimiser ça puisque l'utilisateur ne devrait
// pas souvent l'appeler, et en plus y'en a pas beaucoup à désenclencher. ;)
// Unselect_bouton(BUTTON_GRADRECT);
// Unselect_bouton(BUTTON_TEXT);
// Unselect_button(BUTTON_GRADRECT);
// Unselect_button(BUTTON_TEXT);
Display_cursor();
}
@ -209,7 +209,7 @@ void Button_Undo(void)
Compute_optimal_menu_colors(Main_palette);
Display_all_screen();
Unselect_bouton(BUTTON_UNDO);
Unselect_button(BUTTON_UNDO);
Draw_menu_button_frame(BUTTON_MAGNIFIER,Main_magnifier_mode);
Display_menu();
Display_cursor();
@ -224,7 +224,7 @@ void Button_Redo(void)
Compute_optimal_menu_colors(Main_palette);
Display_all_screen();
Unselect_bouton(BUTTON_UNDO);
Unselect_button(BUTTON_UNDO);
Draw_menu_button_frame(BUTTON_MAGNIFIER,Main_magnifier_mode);
Display_menu();
Display_cursor();
@ -246,7 +246,7 @@ void Button_Pal_left(void)
First_color_in_palette=0;
Display_menu_palette();
}
Unselect_bouton(BUTTON_PAL_LEFT);
Unselect_button(BUTTON_PAL_LEFT);
Display_cursor();
}
@ -264,7 +264,7 @@ void Button_Pal_left_fast(void)
First_color_in_palette=0;
Display_menu_palette();
}
Unselect_bouton(BUTTON_PAL_LEFT);
Unselect_button(BUTTON_PAL_LEFT);
Display_cursor();
}
@ -282,7 +282,7 @@ void Button_Pal_right(void)
Display_menu_palette();
}
Unselect_bouton(BUTTON_PAL_RIGHT);
Unselect_button(BUTTON_PAL_RIGHT);
Display_cursor();
}
@ -300,7 +300,7 @@ void Button_Pal_right_fast(void)
First_color_in_palette=255/cells_y*cells_y-(cells_x-1)*cells_y;
Display_menu_palette();
}
Unselect_bouton(BUTTON_PAL_RIGHT);
Unselect_button(BUTTON_PAL_RIGHT);
Display_cursor();
}
@ -405,7 +405,7 @@ void Button_Hide_menu(void)
if (Main_magnifier_mode)
Display_all_screen();
}
Unselect_bouton(BUTTON_HIDE);
Unselect_button(BUTTON_HIDE);
Display_cursor();
}
@ -493,7 +493,7 @@ void Button_Quit(void)
if ( (Menu_is_visible) && (Mouse_Y+8>Menu_Y) )
Hide_cursor();
Unselect_bouton(BUTTON_QUIT);
Unselect_button(BUTTON_QUIT);
if ( (Menu_is_visible) && (Mouse_Y+8>Menu_Y) )
Display_cursor();
@ -510,7 +510,7 @@ void Button_Clear(void)
else
Hide_current_image(0);
Display_all_screen();
Unselect_bouton(BUTTON_CLEAR);
Unselect_button(BUTTON_CLEAR);
Display_cursor();
}
@ -523,7 +523,7 @@ void Button_Clear_with_backcolor(void)
else
Hide_current_image(Back_color);
Display_all_screen();
Unselect_bouton(BUTTON_CLEAR);
Unselect_button(BUTTON_CLEAR);
Display_cursor();
}
@ -983,7 +983,7 @@ void Button_Settings(void)
Compute_optimal_menu_colors(Main_palette);
Close_window();
Unselect_bouton(BUTTON_SETTINGS);
Unselect_button(BUTTON_SETTINGS);
// Raffichage du menu pour que les inscriptions qui y figurent soient retracées avec la nouvelle fonte
Display_menu();
Display_cursor();
@ -1091,7 +1091,7 @@ void Button_Page(void)
Set_palette(Main_palette);
Compute_optimal_menu_colors(Main_palette);
Display_all_screen();
Unselect_bouton(BUTTON_PAGE);
Unselect_button(BUTTON_PAGE);
Draw_menu_button_frame(BUTTON_MAGNIFIER,Main_magnifier_mode);
Display_menu();
@ -1218,7 +1218,7 @@ void Button_Copy_page(void)
}
Hide_cursor();
Unselect_bouton(BUTTON_PAGE);
Unselect_button(BUTTON_PAGE);
Display_cursor();
}
@ -1232,7 +1232,7 @@ void Button_Kill(void)
if (Main_backups->Nb_pages_allocated==1)
Warning_message("You can't delete the last page.");
Hide_cursor();
Unselect_bouton(BUTTON_KILL);
Unselect_button(BUTTON_KILL);
Display_cursor();
}
else
@ -1244,7 +1244,7 @@ void Button_Kill(void)
Compute_optimal_menu_colors(Main_palette);
Display_all_screen();
Unselect_bouton(BUTTON_KILL);
Unselect_button(BUTTON_KILL);
Draw_menu_button_frame(BUTTON_MAGNIFIER,Main_magnifier_mode);
Display_menu();
Display_cursor();
@ -1634,7 +1634,7 @@ void Button_Resolution(void)
if (clicked_button==1) // OK
{
if (Main_magnifier_mode)
Unselect_bouton(BUTTON_MAGNIFIER);
Unselect_button(BUTTON_MAGNIFIER);
if ( (chosen_width!=Main_image_width)
|| (chosen_height!=Main_image_height) )
@ -1664,7 +1664,7 @@ void Button_Resolution(void)
Paintbrush_Y = Mouse_Y;
Unselect_bouton(BUTTON_RESOL);
Unselect_button(BUTTON_RESOL);
Display_cursor();
}
@ -1673,14 +1673,14 @@ void Button_Safety_resolution(void)
{
Hide_cursor();
Unselect_bouton(BUTTON_MAGNIFIER);
Unselect_button(BUTTON_MAGNIFIER);
Init_mode_video(640, 400, 0,PIXEL_SIMPLE);
Current_resolution=0;
Display_menu();
Reposition_palette();
Display_all_screen();
Unselect_bouton(BUTTON_RESOL);
Unselect_button(BUTTON_RESOL);
// Le pinceau est affiché à la position du clic et pas
Display_cursor();
}
@ -2098,7 +2098,7 @@ void Button_Gradients(void)
while (clicked_button<6);
Close_window();
Unselect_bouton(BUTTON_GRADMENU);
Unselect_button(BUTTON_GRADMENU);
Display_cursor();
Gradient_pixel=Display_pixel;
@ -2239,7 +2239,7 @@ void Button_Paintbrush_menu(void)
Change_paintbrush_shape(Paintbrush_type[index]);
}
Unselect_bouton(BUTTON_PAINTBRUSHES);
Unselect_button(BUTTON_PAINTBRUSHES);
Display_cursor();
}
@ -2250,7 +2250,7 @@ void Button_Brush_monochrome(void)
// On passe en brosse monochrome:
Change_paintbrush_shape(PAINTBRUSH_SHAPE_MONO_BRUSH);
Unselect_bouton(BUTTON_PAINTBRUSHES);
Unselect_button(BUTTON_PAINTBRUSHES);
Display_cursor();
}
@ -2466,12 +2466,12 @@ void Load_picture(byte image)
Main_image_height=initial_main_image_height;
Pixel_load_function=Pixel_load_in_current_screen;
Unselect_button(BUTTON_DRAW,LEFT_SIDE);
Select_button(BUTTON_DRAW,LEFT_SIDE);
if (Config.Auto_discontinuous)
{
// On se place en mode Dessin discontinu à la main
while (Current_operation!=OPERATION_DISCONTINUOUS_DRAW)
Unselect_button(BUTTON_DRAW,RIGHT_SIDE);
Select_button(BUTTON_DRAW,RIGHT_SIDE);
}
Hide_cursor();
// On passe en brosse couleur:
@ -2626,7 +2626,7 @@ void Button_Reload(void)
if (Config.Display_image_limits)
Display_image_limits();
Unselect_bouton(BUTTON_LOAD);
Unselect_button(BUTTON_LOAD);
Display_cursor();
}
@ -2792,7 +2792,7 @@ void Button_Autosave(void)
else
Hide_cursor();
Unselect_bouton(BUTTON_SAVE);
Unselect_button(BUTTON_SAVE);
Display_cursor();
}
@ -2836,7 +2836,7 @@ void Button_Brush(void)
if (Current_operation!=OPERATION_GRAB_BRUSH)
Start_operation_stack(OPERATION_GRAB_BRUSH);
else
Unselect_bouton(BUTTON_BRUSH);
Unselect_button(BUTTON_BRUSH);
Display_cursor();
}
@ -2855,8 +2855,8 @@ void Button_Restore_brush(void)
// On passe en brosse couleur:
Change_paintbrush_shape(PAINTBRUSH_SHAPE_COLOR_BRUSH);
Unselect_bouton(BUTTON_BRUSH);
Unselect_bouton(BUTTON_POLYBRUSH);
Unselect_button(BUTTON_BRUSH);
Unselect_button(BUTTON_POLYBRUSH);
Display_cursor();
}
@ -2875,7 +2875,7 @@ void Button_Lasso(void)
Start_operation_stack(OPERATION_POLYBRUSH);
}
else
Unselect_bouton(BUTTON_POLYBRUSH);
Unselect_button(BUTTON_POLYBRUSH);
Display_cursor();
}
@ -2907,7 +2907,7 @@ void Button_Colorpicker(void)
Print_in_menu("X: Y: ( )",0);
}
else
Unselect_bouton(BUTTON_COLORPICKER);
Unselect_button(BUTTON_COLORPICKER);
Display_cursor();
}
@ -2947,7 +2947,7 @@ void Button_Invert_foreback(void)
Frame_menu_color(MC_White);
Display_foreback();
Unselect_bouton(BUTTON_COLORPICKER);
Unselect_button(BUTTON_COLORPICKER);
Display_cursor();
}
@ -2962,7 +2962,7 @@ void Button_Magnify(void)
Hide_cursor();
if ( (Current_operation==OPERATION_MAGNIFY) || (Main_magnifier_mode) )
{
Unselect_bouton(BUTTON_MAGNIFIER);
Unselect_button(BUTTON_MAGNIFIER);
}
else
{
@ -3059,7 +3059,7 @@ void Button_Magnify_menu(void)
}
if ( (clicked_button==1) && (!Main_magnifier_mode) && (Current_operation!=OPERATION_MAGNIFY) ) // Cancel
Unselect_bouton(BUTTON_MAGNIFIER);
Unselect_button(BUTTON_MAGNIFIER);
Display_all_screen();
Display_cursor();
@ -3068,7 +3068,7 @@ void Button_Magnify_menu(void)
if ( (clicked_button>1) && (!Main_magnifier_mode) && (Current_operation!=OPERATION_MAGNIFY) ) // Passage en mode zoom
{
Coming_from_zoom_factor_menu=1;
Unselect_button(BUTTON_MAGNIFIER,LEFT_SIDE);
Select_button(BUTTON_MAGNIFIER,LEFT_SIDE);
}
}
@ -3364,7 +3364,7 @@ void Button_Brush_FX(void)
while (clicked_button<=0);
Close_window();
Unselect_bouton(BUTTON_BRUSH_EFFECTS);
Unselect_button(BUTTON_BRUSH_EFFECTS);
// Gestion du bouton clické
switch (clicked_button)
@ -4184,7 +4184,7 @@ void Button_Airbrush_menu(void)
if (clicked_button==1) // Cancel
{
if (Current_operation!=OPERATION_AIRBRUSH)
Unselect_bouton(BUTTON_AIRBRUSH);
Unselect_button(BUTTON_AIRBRUSH);
}
*/
@ -4194,7 +4194,7 @@ void Button_Airbrush_menu(void)
if (clicked_button==2) // OK
*/
if (Current_operation!=OPERATION_AIRBRUSH)
Unselect_button(BUTTON_AIRBRUSH,LEFT_SIDE);
Select_button(BUTTON_AIRBRUSH,LEFT_SIDE);
}
@ -5025,7 +5025,7 @@ void Button_Effects(void)
Hide_cursor();
if (!(Shade_mode||Quick_shade_mode||Colorize_mode||Smooth_mode||Tiling_mode||Smear_mode||Stencil_mode||Mask_mode||Sieve_mode||Snap_mode))
Unselect_bouton(BUTTON_EFFECTS);
Unselect_button(BUTTON_EFFECTS);
Display_cursor();
}
@ -5399,7 +5399,7 @@ void Button_Text()
{
// Si echec de rendu
Close_window();
Unselect_bouton(BUTTON_TEXT);
Unselect_button(BUTTON_TEXT);
Display_cursor();
Error(0);
return;
@ -5414,7 +5414,7 @@ void Button_Text()
// Fermeture
Close_window();
Unselect_bouton(BUTTON_TEXT);
Unselect_button(BUTTON_TEXT);
// On passe en brosse:
Display_cursor();
@ -5423,12 +5423,12 @@ void Button_Text()
else
Change_paintbrush_shape(PAINTBRUSH_SHAPE_MONO_BRUSH);
Unselect_button(BUTTON_DRAW,LEFT_SIDE);
Select_button(BUTTON_DRAW,LEFT_SIDE);
if (Config.Auto_discontinuous)
{
// On se place en mode Dessin discontinu à la main
while (Current_operation!=OPERATION_DISCONTINUOUS_DRAW)
Unselect_button(BUTTON_DRAW,RIGHT_SIDE);
Select_button(BUTTON_DRAW,RIGHT_SIDE);
}
//Display_cursor();
return;
@ -5437,7 +5437,7 @@ void Button_Text()
if (new_brush)
free(new_brush);
Close_window();
Unselect_bouton(BUTTON_TEXT);
Unselect_button(BUTTON_TEXT);
Display_cursor();
return;
}

View File

@ -332,7 +332,7 @@ void Draw_menu_button_frame(byte btn_number,byte pressed)
//---------------------- Désenclenchement d'un bouton ------------------------
void Unselect_bouton(int btn_number)
void Unselect_button(int btn_number)
{
if (Buttons_Pool[btn_number].Pressed)
{
@ -347,7 +347,7 @@ void Unselect_bouton(int btn_number)
//-Enclenchement d'un bouton (et désenclenchement de ceux de la même famille)-
void Unselect_button(int btn_number,byte click)
void Select_button(int btn_number,byte click)
{
int family;
int b;
@ -393,7 +393,7 @@ void Unselect_button(int btn_number,byte click)
((b==BUTTON_MAGNIFIER) && (!Main_magnifier_mode)) )
)
// Alors on désenclenche le bouton
Unselect_bouton(b);
Unselect_button(b);
break;
default:
@ -406,7 +406,7 @@ void Unselect_button(int btn_number,byte click)
// Et que ce n'est pas la loupe, ou alors qu'on n'est pas en mode loupe
&& (!(Main_magnifier_mode && (b==BUTTON_MAGNIFIER))) )
// Alors on désenclenche le bouton
Unselect_bouton(b);
Unselect_button(b);
// Right-clicking on Adjust opens a menu, so in this case we skip
// the unselection of all "Tool" buttons.
if (btn_number==BUTTON_ADJUST && click==RIGHT_SIDE)
@ -417,7 +417,7 @@ void Unselect_button(int btn_number,byte click)
if ( (b!=btn_number)
&& (Buttons_Pool[b].Family==family) )
// Alors on désenclenche le bouton
Unselect_bouton(b);
Unselect_button(b);
}
// On affiche le cadre autour du bouton de façon à ce qu'il paraisse enfoncé
@ -694,10 +694,10 @@ void Main_handler(void)
Key=0;
break;
case SPECIAL_CONTINUOUS_DRAW : // Continuous freehand drawing
Unselect_button(BUTTON_DRAW,LEFT_SIDE);
Select_button(BUTTON_DRAW,LEFT_SIDE);
// ATTENTION CE TRUC EST MOCHE ET VA MERDER SI ON SE MET A UTILISER DES BOUTONS POPUPS
while (Current_operation!=OPERATION_CONTINUOUS_DRAW)
Unselect_button(BUTTON_DRAW,RIGHT_SIDE);
Select_button(BUTTON_DRAW,RIGHT_SIDE);
Key=0;
break;
case SPECIAL_FLIP_X : // Flip X
@ -923,7 +923,7 @@ void Main_handler(void)
// on lance le bouton.
if (shortcut_button!=-1)
{
Unselect_button(shortcut_button,clicked_button);
Select_button(shortcut_button,clicked_button);
prev_button_number=-1;
}
}
@ -1025,7 +1025,7 @@ void Main_handler(void)
{
if (button_index>=0)
{
Unselect_button(button_index,Mouse_K);
Select_button(button_index,Mouse_K);
prev_button_number=-1;
}
}

View File

@ -26,8 +26,8 @@
void Main_handler (void);
void Draw_menu_button_frame(byte btn_number,byte pressed);
void Unselect_bouton (int btn_number);
void Unselect_button (int btn_number,byte click);
void Unselect_button (int btn_number);
void Select_button (int btn_number,byte click);
void Cancel_effects (void);
void Restore_effects (void);
void Open_window (word width,word height, char * title);

View File

@ -1628,7 +1628,7 @@ byte Button_Load_or_Save(byte load, byte image)
if (temp)
Display_menu();
Unselect_bouton((load)?BUTTON_LOAD:BUTTON_SAVE);
Unselect_button((load)?BUTTON_LOAD:BUTTON_SAVE);
Display_cursor();
Free_fileselector_list();

4
help.c
View File

@ -578,7 +578,7 @@ void Window_help(int section, const char *sub_section)
if(Key==SDLK_RETURN) Key=0;
Close_window();
Unselect_bouton(BUTTON_HELP);
Unselect_button(BUTTON_HELP);
Display_cursor();
}
@ -693,7 +693,7 @@ void Button_Stats(void)
if(Key==SDLK_RETURN)Key=0;
Close_window();
Unselect_bouton(BUTTON_HELP);
Unselect_button(BUTTON_HELP);
Display_cursor();
}

2
main.c
View File

@ -622,7 +622,7 @@ int Init_program(int argc,char * argv[])
Init_sighandler();
// Le programme débute en mode de dessin à la main
Unselect_button(BUTTON_DRAW,LEFT_SIDE);
Select_button(BUTTON_DRAW,LEFT_SIDE);
// On initialise la brosse initiale à 1 pixel blanc:
Brush_width=1;

View File

@ -167,12 +167,12 @@ void Return_to_draw_mode(void)
if (Mouse_K)
Wait_end_of_click();
// !!! Efface la croix puis affiche le viseur !!!
Unselect_button(BUTTON_DRAW,LEFT_SIDE); // Désenclenche au passage le bouton brosse
Select_button(BUTTON_DRAW,LEFT_SIDE); // Désenclenche au passage le bouton brosse
if (Config.Auto_discontinuous)
{
// On se place en mode Dessin discontinu à la main
while (Current_operation!=OPERATION_DISCONTINUOUS_DRAW)
Unselect_button(BUTTON_DRAW,RIGHT_SIDE);
Select_button(BUTTON_DRAW,RIGHT_SIDE);
}
// Maintenant, il faut réeffacer le curseur parce qu'il sera raffiché en fin
// d'appel à cette action:
@ -1544,7 +1544,7 @@ void Colorpicker_0_1(void)
Back_color=Colorpicker_color;
Display_foreback();
}
Unselect_bouton(BUTTON_COLORPICKER);
Unselect_button(BUTTON_COLORPICKER);
}

View File

@ -2073,7 +2073,7 @@ void Button_Palette(void)
need_to_remp=(Window_pos_Y+(Window_height*Menu_factor_Y)<Menu_Y_before_window);
Close_window();
Unselect_bouton(BUTTON_PALETTE);
Unselect_button(BUTTON_PALETTE);
Reposition_palette();
@ -2089,7 +2089,7 @@ void Button_Palette(void)
{
Set_palette(Main_palette);
if (image_is_backed_up)
Unselect_button(BUTTON_UNDO,LEFT_SIDE);
Select_button(BUTTON_UNDO,LEFT_SIDE);
}
free(backup_palette);
@ -2189,7 +2189,7 @@ void Button_Secondary_palette(void)
rgb_scale=256-rgb_scale_slider->Position;
Close_window();
Unselect_bouton(BUTTON_PALETTE);
Unselect_button(BUTTON_PALETTE);
Display_cursor();
if (clicked_button==4) // Cancel

View File

@ -335,7 +335,7 @@ void Button_Transform_menu(void)
// The Scroll operation uses the same button as transformation menu.
if (Current_operation != OPERATION_SCROLL)
Unselect_bouton(BUTTON_ADJUST);
Unselect_button(BUTTON_ADJUST);
if (clicked_button != 1) // 1 is Cancel
{