Fix bug #3515: Ctrl-Shift-X opens multiple external editors
authorRicardo Mones <ricardo@mones.org>
Wed, 24 Aug 2016 10:14:28 +0000 (12:14 +0200)
committerRicardo Mones <ricardo@mones.org>
Wed, 24 Aug 2016 10:14:28 +0000 (12:14 +0200)
This a known GTK+ bug (passing keypresses of disabled menus) or
a mising feature (not providing a way to disable also keypresses).

See https://bugzilla.gnome.org/show_bug.cgi?id=656158

src/compose.c

index 82220667fdb08fe84520d18d10da9d7ef4de2120..a4d0d7e82dafe04f10715fa5f3bd27b6d8e99a61 100644 (file)
@@ -10545,6 +10545,12 @@ static void compose_ext_editor_cb(GtkAction *action, gpointer data)
 {
        Compose *compose = (Compose *)data;
 
 {
        Compose *compose = (Compose *)data;
 
+#ifdef G_OS_UNIX
+       if (compose->exteditor_tag != -1) {
+               debug_print("ignoring open external editor: external editor still open\n");
+               return;
+       }
+#endif
        compose_exec_ext_editor(compose);
 }
 
        compose_exec_ext_editor(compose);
 }