Browse Source

FLUID: fixes file path calculation bug

pull/787/head
Matthias Melcher 2 years ago
parent
commit
3ed43363cd
  1. 7
      fluid/alignment_panel.cxx
  2. 4
      src/drivers/Darwin/Fl_Darwin_System_Driver.cxx

7
fluid/alignment_panel.cxx

@ -484,16 +484,17 @@ static void cb_w_layout_menu_save(Fl_Menu_*, void*) {
fnfc.filter("FLUID Layouts\t*.fll\n"); fnfc.filter("FLUID Layouts\t*.fll\n");
if (g_layout_list.filename_) { if (g_layout_list.filename_) {
char *fn = fl_strdup(g_layout_list.filename_); char *fn = fl_strdup(g_layout_list.filename_);
char *name = (char*)fl_filename_name(g_layout_list.filename_); char *name = (char*)fl_filename_name(fn);
if (name > fn) { if (name > fn) {
name[-1] = 0; name[-1] = 0;
fnfc.directory(fn); fnfc.directory(fn);
fnfc.preset_file(name); fnfc.preset_file(name);
::free(fn);
} else if (name) { } else if (name) {
fnfc.preset_file(name); fnfc.preset_file(name);
::free(fn); } else {
fnfc.preset_file("");
} }
::free(fn);
} }
if (fnfc.show() != 0) return; if (fnfc.show() != 0) return;
const char *new_filename = fnfc.filename(); const char *new_filename = fnfc.filename();

4
src/drivers/Darwin/Fl_Darwin_System_Driver.cxx

@ -263,11 +263,11 @@ const char *Fl_Darwin_System_Driver::filename_name( const char *name )
// original pointer. // original pointer.
// //
// Most X11 implementations seem to default to Latin-1 as a code since it // Most X11 implementations seem to default to Latin-1 as a code since it
// is a superset of ISO 8859-1, the original wetsern codepage on X11. // is a superset of ISO 8859-1, the original Western codepage on X11.
// //
// Apple's OS X however renders text in MacRoman for western settings. The // Apple's OS X however renders text in MacRoman for western settings. The
// lookup tables below will convert all common character codes and replace // lookup tables below will convert all common character codes and replace
// unknown characters with an upsidedown question mark. // unknown characters with an upside-down question mark.
// This table converts Windows-1252/Latin 1 into MacRoman encoding // This table converts Windows-1252/Latin 1 into MacRoman encoding
static uchar latin2roman[128] = { static uchar latin2roman[128] = {

Loading…
Cancel
Save