aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/OptionsDialog.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-02-20 17:08:30 +0100
committerPierre Ossman <ossman@cendio.se>2015-02-20 17:08:30 +0100
commite95412569bd45ec3da43e1b9a244856e0408f6ab (patch)
tree3f63618174bb9c8ee69d783581ffe713a9739c56 /vncviewer/OptionsDialog.cxx
parent5bf17addcb1ea4dcf3d3306bdcb3b4288a7cb007 (diff)
downloadtigervnc-e95412569bd45ec3da43e1b9a244856e0408f6ab.tar.gz
tigervnc-e95412569bd45ec3da43e1b9a244856e0408f6ab.zip
Switch to FLTK's copy() method for menus
It has less surprises in terms of magical characters.
Diffstat (limited to 'vncviewer/OptionsDialog.cxx')
-rw-r--r--vncviewer/OptionsDialog.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/vncviewer/OptionsDialog.cxx b/vncviewer/OptionsDialog.cxx
index b9752aa1..f3678409 100644
--- a/vncviewer/OptionsDialog.cxx
+++ b/vncviewer/OptionsDialog.cxx
@@ -724,9 +724,19 @@ void OptionsDialog::createInputPage(int tx, int ty, int tw, int th)
menuKeyChoice = new Fl_Choice(LBLLEFT(tx, ty, 150, CHOICE_HEIGHT, _("Menu key")));
- menuKeyChoice->add(_("None"), 0, NULL, (void*)0, FL_MENU_DIVIDER);
+ Fl_Menu_Item items[getMenuKeySymbolCount() + 2];
+
+ memset(items, 0, sizeof(items));
+
+ items[0].text = strdup(_("None"));
+ items[0].flags = FL_MENU_DIVIDER;
+
for (int i = 0; i < getMenuKeySymbolCount(); i++)
- menuKeyChoice->add(getMenuKeySymbols()[i].name, 0, NULL, 0, 0);
+ items[i+1].text = strdup(getMenuKeySymbols()[i].name);
+
+ items[getMenuKeySymbolCount()+1].text = NULL;
+
+ menuKeyChoice->copy(items);
ty += CHOICE_HEIGHT + TIGHT_MARGIN;