Skip to content
Permalink
Browse files

Patch for macos-10.12 builds

  • Loading branch information...
Cesar Parent
Cesar Parent committed Oct 12, 2016
1 parent bfaa866 commit 830b4e1fbf516abf87fbf35f53b4ac032b9fc718
Showing with 28 additions and 28 deletions.
  1. +1 −1 build.sh
  2. +3 −3 src/misc/newinstall.cxx
  3. +10 −10 src/widgets/FTextRXTX.cxx
  4. +7 −7 src/widgets/FTextView.cxx
  5. +7 −7 src/widgets/flinput2.cxx
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
CC=gcc-5 CXX=g++-5 PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig ./configure --with-jpeg=/usr/local/include/ --disable-flarq
CXXFLAGS="-stdlib=libstdc++" PKG_CONFIG_PATH=/usr/local/opt/curl/lib/pkgconfig ./configure --with-jpeg=/usr/local/include/ --disable-flarq --enable-optimizations=native
@@ -398,7 +398,7 @@ void Wizard::create_wizard(void)
b->align(buttons[i].align | FL_ALIGN_INSIDE);
b->size(static_cast<int>(fl_width(get_icon_label_text(b)) + icon_pad * 2), b->h());
}
set_active(prev, false);
::set_active(prev, false);
done->hide();
place_buttons();

@@ -485,9 +485,9 @@ void Wizard::wizard_cb(Fl_Widget* w, void* arg)

// modify buttons
if (cur == wiz->tabs[0].tab)
set_active(wiz->prev, false);
::set_active(wiz->prev, false);
else if (cur == wiz->tabs[1].tab)
set_active(wiz->prev, true);
::set_active(wiz->prev, true);
else if (cur == wiz->tabs.back().tab) {
wiz->done->show();
wiz->next->hide();
@@ -531,10 +531,10 @@ void FTextRX::handle_context_menu(void)
#undef test_item

// availability of editing items depend on buffer state
set_active(&menu[RX_MENU_COPY], tbuf->selected());
set_active(&menu[RX_MENU_CLEAR], tbuf->length());
set_active(&menu[RX_MENU_SELECT_ALL], tbuf->length());
set_active(&menu[RX_MENU_SAVE], tbuf->length());
::set_active(&menu[RX_MENU_COPY], tbuf->selected());
::set_active(&menu[RX_MENU_CLEAR], tbuf->length());
::set_active(&menu[RX_MENU_SELECT_ALL], tbuf->length());
::set_active(&menu[RX_MENU_SAVE], tbuf->length());

if (wrap)
menu[RX_MENU_WRAP].set();
@@ -1212,12 +1212,12 @@ void FTextTX::handle_context_menu(void)

bool modify_text_ok = insert_position() >= txpos;
bool selected = tbuf->selected();
set_active(&menu[TX_MENU_MFSK16_IMG], active_modem->get_cap() & modem::CAP_IMG);
set_active(&menu[TX_MENU_CLEAR], tbuf->length());
set_active(&menu[TX_MENU_CUT], selected && modify_text_ok);
set_active(&menu[TX_MENU_COPY], selected);
set_active(&menu[TX_MENU_PASTE], modify_text_ok);
set_active(&menu[TX_MENU_READ], modify_text_ok);
::set_active(&menu[TX_MENU_MFSK16_IMG], active_modem->get_cap() & modem::CAP_IMG);
::set_active(&menu[TX_MENU_CLEAR], tbuf->length());
::set_active(&menu[TX_MENU_CUT], selected && modify_text_ok);
::set_active(&menu[TX_MENU_COPY], selected);
::set_active(&menu[TX_MENU_PASTE], modify_text_ok);
::set_active(&menu[TX_MENU_READ], modify_text_ok);

if (wrap)
menu[TX_MENU_WRAP].set();
@@ -548,10 +548,10 @@ int FTextView::handle(int event)

void FTextView::handle_context_menu(void)
{
set_active(&menu[VIEW_MENU_COPY], tbuf->selected());
set_active(&menu[VIEW_MENU_CLEAR], tbuf->length());
set_active(&menu[VIEW_MENU_SELECT_ALL], tbuf->length());
set_active(&menu[VIEW_MENU_SAVE], tbuf->length());
::set_active(&menu[VIEW_MENU_COPY], tbuf->selected());
::set_active(&menu[VIEW_MENU_CLEAR], tbuf->length());
::set_active(&menu[VIEW_MENU_SELECT_ALL], tbuf->length());
::set_active(&menu[VIEW_MENU_SAVE], tbuf->length());
if (wrap)
menu[VIEW_MENU_WRAP].set();
else
@@ -823,9 +823,9 @@ LOG_INFO("DnD file %s", text.c_str());
void FTextEdit::handle_context_menu(void)
{
bool selected = tbuf->selected();
set_active(&menu[EDIT_MENU_CUT], selected);
set_active(&menu[EDIT_MENU_COPY], selected);
set_active(&menu[EDIT_MENU_CLEAR], tbuf->length());
::set_active(&menu[EDIT_MENU_CUT], selected);
::set_active(&menu[EDIT_MENU_COPY], selected);
::set_active(&menu[EDIT_MENU_CLEAR], tbuf->length());

if (wrap)
menu[EDIT_MENU_WRAP].set();
@@ -136,13 +136,13 @@ int Fl_Input2::handle(int event)
}

bool sel = position() != mark(), ro = readonly();
set_active(&cmenu[OP_UNDO], !ro);
set_active(&cmenu[OP_CUT], !ro && sel);
set_active(&cmenu[OP_COPY], sel);
set_active(&cmenu[OP_PASTE], !ro);
set_active(&cmenu[OP_DELETE], !ro && sel);
set_active(&cmenu[OP_CLEAR], !ro && size());
set_active(&cmenu[OP_SELECT_ALL], size());
::set_active(&cmenu[OP_UNDO], !ro);
::set_active(&cmenu[OP_CUT], !ro && sel);
::set_active(&cmenu[OP_COPY], sel);
::set_active(&cmenu[OP_PASTE], !ro);
::set_active(&cmenu[OP_DELETE], !ro && sel);
::set_active(&cmenu[OP_CLEAR], !ro && size());
::set_active(&cmenu[OP_SELECT_ALL], size());

take_focus();
window()->cursor(FL_CURSOR_DEFAULT);

0 comments on commit 830b4e1

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.