<p>Line dialogs.c:1347 says "/* For a cancel button, use cancel response so user can press escape to cancel */" however in line 1357 only GTK_RESPONSE_CANCEL is linked to response_2, but esc KEY triggers a GTK_RESPONSE_DELETE_EVEN; hence it should be included also in 1357.</p>

<p>I found it because of a strange behaviour when cancelling a keybinding override in preferences dialog. You can reproduce it like so: go to prefs>keybindings, set a keybinding which is already used for another command, then Geany will show up a dialog saying that the combination is already used. Once there, if you press <kbd>Esc</kbd> key, you'll see that it does the "Allow" action, instead of -what the user would expect- the "Cancel" action.</p>

<p>I'm testing it and dialogs work fine as well as the issue exposed above is fixed.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/714'>https://github.com/geany/geany/pull/714</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Set close dialog and esc key events as cancel in show_prompt()</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/714/files#diff-0">src/dialogs.c</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/714.patch'>https://github.com/geany/geany/pull/714.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/714.diff'>https://github.com/geany/geany/pull/714.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/714">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ3rMOE_GXx-OnkDoR4uIpLRRgMqwks5pAKRIgaJpZM4GXP8k.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/714"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>