mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +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" },
|
{ "STR_TOTALPLAYERS", "Total joueurs" },
|
||||||
|
|
||||||
#ifdef XWFEATURE_RELAY
|
#ifdef XWFEATURE_RELAY
|
||||||
/* Needs translation (or confirmation) */
|
|
||||||
{ "STR_RELAY_XPORTNAME", "Internet" },
|
{ "STR_RELAY_XPORTNAME", "Internet" },
|
||||||
{ "STR_RELAY_TIMEOUT", "Erreur réseau : les autres joueurs n'ont pu "
|
{ "STR_RELAY_TIMEOUT", "Erreur réseau : les autres joueurs n'ont pu "
|
||||||
"se connecter." },
|
"se connecter." },
|
||||||
|
@ -135,20 +134,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XWFEATURE_BLUETOOTH
|
#ifdef XWFEATURE_BLUETOOTH
|
||||||
/* Needs translation (or confirmation) */
|
|
||||||
{ "STR_BT_XPORTNAME", "Bluetooth" },
|
{ "STR_BT_XPORTNAME", "Bluetooth" },
|
||||||
{ "STR_BT_NOINIT", "Impossible initialiser Bluetooth. "
|
{ "STR_BT_NOINIT", "Impossible initialiser Bluetooth. "
|
||||||
"Est-il connecté ?" },
|
"Est-il connecté ?" },
|
||||||
/* Needs translation */
|
{ "STRS_BT_NOHOST", "Les messages Bluetooth n'arrivent pas à "
|
||||||
{ "STRS_BT_NOHOST", "Bluetooth messages are not reaching Crosswords on %s. "
|
"Crosswords sur %s. Pourriez-vous me le "
|
||||||
"Do you want me to resend? (If you choose \"No\" I will not try "
|
"renvoyer ? (Si vous choisissez \"Non\" je "
|
||||||
"again until you choose the \"Resend messages\" menu item.)" },
|
"ne réessayerai pas jusqu'à ce que vous "
|
||||||
/* Needs translation */
|
"choisissiez \"Renvoyer messages\" dans "
|
||||||
{ "STR_BT_RESEND", "Resend" },
|
"le menu.)" },
|
||||||
|
{ "STR_BT_RESEND", "Envoyer à nouveau" },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef XWFEATURE_IR
|
#ifdef XWFEATURE_IR
|
||||||
/* Needs translation (or confirmation) */
|
|
||||||
{ "STR_IR_XPORTNAME", "Transmission" },
|
{ "STR_IR_XPORTNAME", "Transmission" },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -3299,6 +3299,8 @@ palmask( PalmAppGlobals* globals, const XP_UCHAR* str,
|
||||||
FieldPtr field;
|
FieldPtr field;
|
||||||
const XP_UCHAR* title;
|
const XP_UCHAR* title;
|
||||||
UInt16 buttonHit;
|
UInt16 buttonHit;
|
||||||
|
XP_U16 buttons[] = { XW_ASK_YES_BUTTON_ID, XW_ASK_NO_BUTTON_ID };
|
||||||
|
XP_U16 nButtons;
|
||||||
|
|
||||||
if ( !!globals->game.board ) {
|
if ( !!globals->game.board ) {
|
||||||
board_pushTimerSave( 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 );
|
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 );
|
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 );
|
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 we're running OS5 (oneDotFiveAvail), then eat the first keyDown.
|
||||||
If an earlier OS (Treo600) then we won't see that spurious event. */
|
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 */
|
} /* 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
|
void
|
||||||
centerControl( FormPtr form, UInt16 id )
|
centerControls( FormPtr form, const UInt16* id, XP_U16 nIds )
|
||||||
{
|
{
|
||||||
RectangleType cBounds, fBounds;
|
XP_U16 i, width, prev;
|
||||||
Int16 index = FrmGetObjectIndex( form, id );
|
RectangleType bounds;
|
||||||
XP_ASSERT( index >= 0 );
|
|
||||||
|
|
||||||
FrmGetObjectBounds( form, index, &cBounds );
|
|
||||||
FrmGetFormBounds( form, &fBounds );
|
|
||||||
|
|
||||||
cBounds.topLeft.x = (fBounds.extent.x - cBounds.extent.x) / 2;
|
/* Two passes. First, figure total width outside controls. */
|
||||||
FrmSetObjectBounds( form, index, &cBounds );
|
FrmGetFormBounds( form, &bounds );
|
||||||
} /* centerButton */
|
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 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 );
|
void setBooleanCtrl( UInt16 objectID, Boolean isSet );
|
||||||
Boolean getBooleanCtrl( UInt16 objectID );
|
Boolean getBooleanCtrl( UInt16 objectID );
|
||||||
|
|
Loading…
Add table
Reference in a new issue