mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
Substitute French translations of new BT-related strings; since this
results in overlapping buttons, add code to space them evenly across window.
This commit is contained in:
parent
8035955814
commit
01fec3742c
4 changed files with 47 additions and 24 deletions
|
@ -125,7 +125,6 @@
|
|||
{ "STR_TOTALPLAYERS", "Total joueurs" },
|
||||
|
||||
#ifdef XWFEATURE_RELAY
|
||||
/* Needs translation (or confirmation) */
|
||||
{ "STR_RELAY_XPORTNAME", "Internet" },
|
||||
{ "STR_RELAY_TIMEOUT", "Erreur réseau : les autres joueurs n'ont pu "
|
||||
"se connecter." },
|
||||
|
@ -135,20 +134,19 @@
|
|||
#endif
|
||||
|
||||
#ifdef XWFEATURE_BLUETOOTH
|
||||
/* Needs translation (or confirmation) */
|
||||
{ "STR_BT_XPORTNAME", "Bluetooth" },
|
||||
{ "STR_BT_NOINIT", "Impossible initialiser Bluetooth. "
|
||||
"Est-il connecté ?" },
|
||||
/* Needs translation */
|
||||
{ "STRS_BT_NOHOST", "Bluetooth messages are not reaching Crosswords on %s. "
|
||||
"Do you want me to resend? (If you choose \"No\" I will not try "
|
||||
"again until you choose the \"Resend messages\" menu item.)" },
|
||||
/* Needs translation */
|
||||
{ "STR_BT_RESEND", "Resend" },
|
||||
{ "STRS_BT_NOHOST", "Les messages Bluetooth n'arrivent pas à "
|
||||
"Crosswords sur %s. Pourriez-vous me le "
|
||||
"renvoyer ? (Si vous choisissez \"Non\" je "
|
||||
"ne réessayerai pas jusqu'à ce que vous "
|
||||
"choisissiez \"Renvoyer messages\" dans "
|
||||
"le menu.)" },
|
||||
{ "STR_BT_RESEND", "Envoyer à nouveau" },
|
||||
#endif
|
||||
|
||||
#ifdef XWFEATURE_IR
|
||||
/* Needs translation (or confirmation) */
|
||||
{ "STR_IR_XPORTNAME", "Transmission" },
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3299,6 +3299,8 @@ palmask( PalmAppGlobals* globals, const XP_UCHAR* str,
|
|||
FieldPtr field;
|
||||
const XP_UCHAR* title;
|
||||
UInt16 buttonHit;
|
||||
XP_U16 buttons[] = { XW_ASK_YES_BUTTON_ID, XW_ASK_NO_BUTTON_ID };
|
||||
XP_U16 nButtons;
|
||||
|
||||
if ( !!globals->game.board ) {
|
||||
board_pushTimerSave( globals->game.board );
|
||||
|
@ -3317,13 +3319,17 @@ palmask( PalmAppGlobals* globals, const XP_UCHAR* str,
|
|||
fitButtonToString( XW_ASK_YES_BUTTON_ID );
|
||||
}
|
||||
|
||||
if ( title != NULL ) {
|
||||
/* Hack: take advantage of fact that for now only non-queries should not
|
||||
have a cancel button. */
|
||||
if ( title == NULL ) {
|
||||
nButtons = 2;
|
||||
} else {
|
||||
FrmSetTitle( form, (char*)title );
|
||||
/* Hack: take advantage of fact that for now only non-queries should
|
||||
not have a cancel button. */
|
||||
disOrEnable( form, XW_ASK_NO_BUTTON_ID, false );
|
||||
centerControl( form, XW_ASK_YES_BUTTON_ID );
|
||||
nButtons = 1;
|
||||
}
|
||||
/* always center: some localized buttons are bigger */
|
||||
centerControls( form, buttons, nButtons );
|
||||
|
||||
/* If we're running OS5 (oneDotFiveAvail), then eat the first keyDown.
|
||||
If an earlier OS (Treo600) then we won't see that spurious event. */
|
||||
|
|
|
@ -179,21 +179,40 @@ disOrEnableSet( FormPtr form, const UInt16* ids, Boolean enable )
|
|||
}
|
||||
} /* disOrEnableSet */
|
||||
|
||||
/* Position a control at the horizontal center of its container.
|
||||
/* Space a row of controls evenly across their container. This will center a
|
||||
* single control or space several regardless of their size. Assumption,
|
||||
* enforced by an assertion, is that they fit without overlapping. Another, not
|
||||
* enforced, is that all have the same y coordinates. This was originally
|
||||
* written for localized dialogs with different-length button text.
|
||||
*/
|
||||
void
|
||||
centerControl( FormPtr form, UInt16 id )
|
||||
centerControls( FormPtr form, const UInt16* id, XP_U16 nIds )
|
||||
{
|
||||
RectangleType cBounds, fBounds;
|
||||
Int16 index = FrmGetObjectIndex( form, id );
|
||||
XP_ASSERT( index >= 0 );
|
||||
XP_U16 i, width, prev;
|
||||
RectangleType bounds;
|
||||
|
||||
FrmGetObjectBounds( form, index, &cBounds );
|
||||
FrmGetFormBounds( form, &fBounds );
|
||||
|
||||
cBounds.topLeft.x = (fBounds.extent.x - cBounds.extent.x) / 2;
|
||||
FrmSetObjectBounds( form, index, &cBounds );
|
||||
} /* centerButton */
|
||||
/* Two passes. First, figure total width outside controls. */
|
||||
FrmGetFormBounds( form, &bounds );
|
||||
width = bounds.extent.x;
|
||||
for ( i = 0; i < nIds; ++i ) {
|
||||
UInt16 index = FrmGetObjectIndex( form, id[i] );
|
||||
FrmGetObjectBounds( form, index, &bounds );
|
||||
XP_ASSERT( width >= bounds.extent.x );
|
||||
width -= bounds.extent.x;
|
||||
}
|
||||
|
||||
/* Then layout */
|
||||
width /= nIds + 1; /* space between controls */
|
||||
prev = width;
|
||||
for ( i = 0; i < nIds; ++i ) {
|
||||
UInt16 index = FrmGetObjectIndex( form, id[i] );
|
||||
FrmGetObjectBounds( form, index, &bounds );
|
||||
bounds.topLeft.x = prev;
|
||||
FrmSetObjectBounds( form, index, &bounds );
|
||||
prev += bounds.extent.x + width;
|
||||
}
|
||||
} /* centerControls */
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
|
|
@ -49,7 +49,7 @@ void disOrEnableSet( FormPtr form, const UInt16* id, Boolean enable );
|
|||
|
||||
void disOrEnableTri( FormPtr form, UInt16 id, XP_TriEnable enable );
|
||||
|
||||
void centerControl( FormPtr form, UInt16 id );
|
||||
void centerControls( FormPtr form, const UInt16* id, XP_U16 nIds );
|
||||
|
||||
void setBooleanCtrl( UInt16 objectID, Boolean isSet );
|
||||
Boolean getBooleanCtrl( UInt16 objectID );
|
||||
|
|
Loading…
Add table
Reference in a new issue