Haiku fixes
This commit is contained in:
parent
7938480174
commit
e5c3cdfcf5
5 changed files with 16 additions and 16 deletions
2
Makefile
2
Makefile
|
|
@ -131,7 +131,6 @@ ARCH_HEADERS:=$($(OS)_ARCH_HEADERS)
|
||||||
# For macOS, the prefix is relative to DESTDIR.
|
# For macOS, the prefix is relative to DESTDIR.
|
||||||
windows_PREFIX:=/usr/local
|
windows_PREFIX:=/usr/local
|
||||||
osx_PREFIX:=Resources
|
osx_PREFIX:=Resources
|
||||||
beos_PREFIX=$(shell finddir B_APPS_DIRECTORY)/TuxPaint
|
|
||||||
linux_PREFIX:=/usr/local
|
linux_PREFIX:=/usr/local
|
||||||
PREFIX:=$($(OS)_PREFIX)
|
PREFIX:=$($(OS)_PREFIX)
|
||||||
|
|
||||||
|
|
@ -462,7 +461,6 @@ trans:
|
||||||
|
|
||||||
windows_ARCH_INSTALL:=
|
windows_ARCH_INSTALL:=
|
||||||
osx_ARCH_INSTALL:=install-macbundle TuxPaint.dmg
|
osx_ARCH_INSTALL:=install-macbundle TuxPaint.dmg
|
||||||
beos_ARCH_INSTALL:=install-haiku
|
|
||||||
linux_ARCH_INSTALL:=install-kde install-kde-icons
|
linux_ARCH_INSTALL:=install-kde install-kde-icons
|
||||||
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
|
ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -970,10 +970,12 @@ static void loadfonts(SDL_Surface * screen, const char *const dir)
|
||||||
|
|
||||||
result = find_directory(B_SYSTEM_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
result = find_directory(B_SYSTEM_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||||
loadfonts(screen, buffer);
|
loadfonts(screen, buffer);
|
||||||
result = find_directory(B_COMMON_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
result = find_directory(B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||||
loadfonts(screen, buffer);
|
loadfonts(screen, buffer);
|
||||||
result = find_directory(B_USER_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
result = find_directory(B_USER_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||||
loadfonts(screen, buffer);
|
loadfonts(screen, buffer);
|
||||||
|
result = find_directory(B_USER_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||||
|
loadfonts(screen, buffer);
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
loadfonts(screen, "/System/Library/Fonts");
|
loadfonts(screen, "/System/Library/Fonts");
|
||||||
loadfonts(screen, "/Library/Fonts");
|
loadfonts(screen, "/Library/Fonts");
|
||||||
|
|
|
||||||
|
|
@ -986,8 +986,10 @@ static int set_current_language(const char *restrict locale_choice) MUST_CHECK;
|
||||||
static int set_current_language(const char *restrict loc)
|
static int set_current_language(const char *restrict loc)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
int j = 0;
|
||||||
char *oldloc;
|
char *oldloc;
|
||||||
char *env_language;
|
char *env_language;
|
||||||
|
char *env_language_lang;
|
||||||
|
|
||||||
|
|
||||||
if (strlen(loc) > 0)
|
if (strlen(loc) > 0)
|
||||||
|
|
@ -1082,8 +1084,6 @@ static int set_current_language(const char *restrict loc)
|
||||||
mysetenv("LANGUAGE", "C");
|
mysetenv("LANGUAGE", "C");
|
||||||
}
|
}
|
||||||
env_language = strdup(getenv("LANGUAGE"));
|
env_language = strdup(getenv("LANGUAGE"));
|
||||||
int j = 0;
|
|
||||||
char *env_language_lang;
|
|
||||||
|
|
||||||
if (*env_language)
|
if (*env_language)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
18
src/im.c
18
src/im.c
|
|
@ -905,12 +905,12 @@ static int im_event_zh_tw(IM_DATA * im, SDL_keysym ks)
|
||||||
|
|
||||||
case IM_REQ_FREE: /* Free allocated resources */
|
case IM_REQ_FREE: /* Free allocated resources */
|
||||||
charmap_free(&cm);
|
charmap_free(&cm);
|
||||||
__attribute__ ((fallthrough)); /* go onto full reset */
|
// // __attribute__ ((fallthrough)); /* go onto full reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_FULL: /* Full reset */
|
case IM_REQ_RESET_FULL: /* Full reset */
|
||||||
cm.section = SEC_ENGLISH;
|
cm.section = SEC_ENGLISH;
|
||||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||||
__attribute__ ((fallthrough)); /* go onto soft reset */
|
// __attribute__ ((fallthrough)); /* go onto soft reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||||
im->s[0] = L'\0';
|
im->s[0] = L'\0';
|
||||||
|
|
@ -1124,12 +1124,12 @@ static int im_event_th(IM_DATA * im, SDL_keysym ks)
|
||||||
|
|
||||||
case IM_REQ_FREE: /* Free allocated resources */
|
case IM_REQ_FREE: /* Free allocated resources */
|
||||||
charmap_free(&cm);
|
charmap_free(&cm);
|
||||||
__attribute__ ((fallthrough)); /* go onto full reset */
|
// __attribute__ ((fallthrough)); /* go onto full reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_FULL: /* Full reset */
|
case IM_REQ_RESET_FULL: /* Full reset */
|
||||||
cm.section = SEC_ENGLISH;
|
cm.section = SEC_ENGLISH;
|
||||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||||
__attribute__ ((fallthrough)); /* go onto soft reset */
|
// __attribute__ ((fallthrough)); /* go onto soft reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||||
im->s[0] = L'\0';
|
im->s[0] = L'\0';
|
||||||
|
|
@ -1343,12 +1343,12 @@ static int im_event_ja(IM_DATA * im, SDL_keysym ks)
|
||||||
|
|
||||||
case IM_REQ_FREE: /* Free allocated resources */
|
case IM_REQ_FREE: /* Free allocated resources */
|
||||||
charmap_free(&cm);
|
charmap_free(&cm);
|
||||||
__attribute__ ((fallthrough)); /* go onto full reset */
|
// __attribute__ ((fallthrough)); /* go onto full reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_FULL: /* Full reset */
|
case IM_REQ_RESET_FULL: /* Full reset */
|
||||||
cm.section = SEC_ENGLISH;
|
cm.section = SEC_ENGLISH;
|
||||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||||
__attribute__ ((fallthrough)); /* go onto soft reset */
|
// __attribute__ ((fallthrough)); /* go onto soft reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||||
im->s[0] = L'\0';
|
im->s[0] = L'\0';
|
||||||
|
|
@ -1590,12 +1590,12 @@ static int im_event_ko(IM_DATA * im, SDL_keysym ks)
|
||||||
|
|
||||||
case IM_REQ_FREE: /* Free allocated resources */
|
case IM_REQ_FREE: /* Free allocated resources */
|
||||||
charmap_free(&cm);
|
charmap_free(&cm);
|
||||||
__attribute__ ((fallthrough)); /* go onto full reset */
|
// __attribute__ ((fallthrough)); /* go onto full reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_FULL: /* Full reset */
|
case IM_REQ_RESET_FULL: /* Full reset */
|
||||||
cm.section = SEC_ENGLISH;
|
cm.section = SEC_ENGLISH;
|
||||||
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
im->tip_text = im_tip_text[IM_TIP_ENGLISH];
|
||||||
__attribute__ ((fallthrough)); /* go onto soft reset */
|
// __attribute__ ((fallthrough)); /* go onto soft reset */
|
||||||
|
|
||||||
case IM_REQ_RESET_SOFT: /* Soft reset */
|
case IM_REQ_RESET_SOFT: /* Soft reset */
|
||||||
im->s[0] = L'\0';
|
im->s[0] = L'\0';
|
||||||
|
|
@ -1681,7 +1681,7 @@ static int im_event_ko(IM_DATA * im, SDL_keysym ks)
|
||||||
im->redraw--;
|
im->redraw--;
|
||||||
ks.unicode = L'\0';
|
ks.unicode = L'\0';
|
||||||
}
|
}
|
||||||
__attribute__ ((fallthrough)); /* continue processing: */
|
// __attribute__ ((fallthrough)); /* continue processing: */
|
||||||
|
|
||||||
/* Actual character processing */
|
/* Actual character processing */
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -19809,6 +19809,7 @@ static int do_color_sel(void)
|
||||||
int done, chose;
|
int done, chose;
|
||||||
int back_left, back_top;
|
int back_left, back_top;
|
||||||
int color_sel_x = 0, color_sel_y = 0;
|
int color_sel_x = 0, color_sel_y = 0;
|
||||||
|
int want_animated_popups = 1;
|
||||||
SDL_Surface *tmp_btn_up, *tmp_btn_down;
|
SDL_Surface *tmp_btn_up, *tmp_btn_down;
|
||||||
|
|
||||||
Uint32(*getpixel_tmp_btn_up) (SDL_Surface *, int, int);
|
Uint32(*getpixel_tmp_btn_up) (SDL_Surface *, int, int);
|
||||||
|
|
@ -19829,7 +19830,6 @@ static int do_color_sel(void)
|
||||||
|
|
||||||
/* FIXME this is the first step to make animated popups optional,
|
/* FIXME this is the first step to make animated popups optional,
|
||||||
to be removed from here when implemented in a more general way */
|
to be removed from here when implemented in a more general way */
|
||||||
int want_animated_popups = 1;
|
|
||||||
|
|
||||||
hide_blinking_cursor();
|
hide_blinking_cursor();
|
||||||
|
|
||||||
|
|
@ -22438,7 +22438,7 @@ static void setup_config(char *argv[])
|
||||||
char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
char buffer[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
|
||||||
status_t result;
|
status_t result;
|
||||||
|
|
||||||
result = find_directory(B_USER_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
result = find_directory(B_USER_SETTINGS_DIRECTORY, volume, false, buffer, sizeof(buffer));
|
||||||
asprintf((char **)&savedir, "%s/%s", buffer, "TuxPaint");
|
asprintf((char **)&savedir, "%s/%s", buffer, "TuxPaint");
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
savedir = strdup(macos_preferencesPath());
|
savedir = strdup(macos_preferencesPath());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue