Drop button_label_y_nudge; no longer needed (part 2)

Apparently `git push`-ed before I was done.  The rest of
https://sourceforge.net/p/tuxpaint/tuxpaint/ci/8db84be008a797f04b2d8557cb0c196c74da5059/
This commit is contained in:
Bill Kendrick 2024-06-02 11:09:05 -07:00
parent 8db84be008
commit 93a8fd8815
3 changed files with 12 additions and 28 deletions

View file

@ -87,6 +87,10 @@ https://tuxpaint.org/
(h/t Karl Ove Hufthammer for suggesting)
Bill Kendrick <bill@newbreedsoftware.com>
* Removed unnecessary (and now unhelpful) button label text
vertical position nudging (had only been used by Khmer locale).
Bill Kendrick <bill@newbreedsoftware.com>
* Make screen refresh more snappy on macOS.
Mark Kim <markuskimius@gmail.com>

View file

@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - April 30, 2023
June 14, 2002 - June 2, 2024
*/
#include <stdio.h>
@ -259,14 +259,6 @@ static int lang_use_right_to_left_word[] = {
-1
};
/* Languages which require a vertical 'nudge' in
* text rendering, and by how much? */
static int lang_y_nudge[][2] = {
{LANG_KM, 4},
{-1, -1}
};
int need_own_font;
int need_right_to_left;
int need_right_to_left_word;
@ -1079,9 +1071,8 @@ void mysetenv(const char *name, const char *value)
* @return The Y-nudge value for font rendering in the language.
*/
static int set_current_language(const char *restrict loc, int *ptr_num_wished_langs)
static void set_current_language(const char *restrict loc, int *ptr_num_wished_langs)
{
int i;
int j = 0;
char *oldloc;
char *env_language;
@ -1237,16 +1228,6 @@ static int set_current_language(const char *restrict loc, int *ptr_num_wished_la
wished_langs[j].need_own_font = search_int_array(langint, lang_use_own_font);
wished_langs[j].need_right_to_left = search_int_array(langint, lang_use_right_to_left);
wished_langs[j].need_right_to_left_word = search_int_array(langint, lang_use_right_to_left_word);
for (i = 0; lang_y_nudge[i][0] != -1; i++)
{
// printf("lang_y_nudge[%d][0] = %d\n", i, lang_y_nudge[i][0]);
if (lang_y_nudge[i][0] == langint)
{
wished_langs[j].lang_y_nudge = lang_y_nudge[i][1];
break;
}
}
j++;
env_language_lang = strtok(NULL, ":");
@ -1279,8 +1260,6 @@ static int set_current_language(const char *restrict loc, int *ptr_num_wished_la
DEBUG_PRINTF("lang_prefixes[%d] is \"%s\"\n", get_current_language(), lang_prefixes[get_current_language()]);
*ptr_num_wished_langs = num_wished_langs;
return wished_langs[0].lang_y_nudge;
}
@ -1295,7 +1274,7 @@ static int set_current_language(const char *restrict loc, int *ptr_num_wished_la
* @param int * a place to return the number of languages we want to use, when scanning stamp descriptions
* @return Y-nudge
*/
int setup_i18n(const char *restrict lang, const char *restrict locale, int *num_wished_langs)
void setup_i18n(const char *restrict lang, const char *restrict locale, int *num_wished_langs)
{
DEBUG_PRINTF("lang %p, locale %p\n", lang, locale);
DEBUG_PRINTF("lang \"%s\", locale \"%s\"\n", lang, locale);
@ -1327,5 +1306,6 @@ int setup_i18n(const char *restrict lang, const char *restrict locale, int *num_
if (locale == NULL)
locale = "";
return set_current_language(locale, num_wished_langs);
set_current_language(locale, num_wished_langs);
}

View file

@ -23,7 +23,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt)
June 14, 2002 - April 30, 2023
June 14, 2002 - June 2, 2024
*/
@ -204,7 +204,7 @@ extern w_langs wished_langs[255];
/* Function prototypes: */
int get_current_language(void);
int setup_i18n(const char *restrict lang, const char *restrict locale, int *ptr_num_wished_languages) MUST_CHECK;
void mysetenv(const char *name, const char *value);
void setup_i18n(const char *restrict lang, const char *restrict locale, int *ptr_num_wished_languages);
void mysetenv(const char *name, const char *value);
#endif