From: Joshua Pettus Date: Thu, 28 Jan 2016 22:55:56 +0000 (-0500) Subject: H.G.Muller's patch to avoid collisions with built-in OSX text X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8e4e7498f755756037667e365793f88a2bdd6166;p=xboard.git H.G.Muller's patch to avoid collisions with built-in OSX text edit accellerators Unfortunately this means many of the menus items use the standard linux ctrl-letter style accelerators as oppose to the cmd-letter OSX style ones. But at least we can copy, paste, and cut text into xboard dialogs as well as select all. --- diff --git a/gtk/xoptions.c b/gtk/xoptions.c index af2cdc8..c49d139 100644 --- a/gtk/xoptions.c +++ b/gtk/xoptions.c @@ -444,9 +444,19 @@ CreateMenuPopup (Option *opt, int n, int def) gtk_accelerator_parse(mb[i].accel, &accelerator_key, &accelerator_mods); #ifdef OSXAPP - if(accelerator_mods & GDK_CONTROL_MASK) { // in OSX use Meta where Linux uses Ctrl - accelerator_mods &= ~GDK_CONTROL_MASK; // clear Ctrl flag - accelerator_mods |= GDK_META_MASK; // set Meta flag + if(accelerator_mods & GDK_CONTROL_MASK && + accelerator_key != 'v' && // don't use Cmd+V + accelerator_key != 'c' && // and Cmd+C + accelerator_key != 'x' && // and CMD+X + accelerator_key != 'a' && // and CMD+A + accelerator_key != 'w' && // and evreything else in mode menu for umiformity's sake + accelerator_key != 'b' && + accelerator_key != 't' && + accelerator_key != 'g' && + accelerator_key != 'e' + ) { // in OSX use Meta (Cmd) where Linux uses Ctrl + accelerator_mods &= ~GDK_CONTROL_MASK; // clear Ctrl flag + accelerator_mods |= GDK_META_MASK; // set Meta flag } #endif gtk_widget_add_accelerator (GTK_WIDGET(entry), "activate",GtkAccelerators,