Ctrl-w shortcut to close an editor tab in multi-tab mode; bugfix for multi-monitor mode (issue 732)

This commit is contained in:
michael
2012-07-28 12:36:21 -04:00
parent d91a7e77c8
commit ea598952fa
2 changed files with 26 additions and 3 deletions

View File

@@ -403,6 +403,15 @@ bool RTWindow::keyPressed (GdkEventKey* event) {
mainNB->set_current_page (mainNB->page_num (*epanel));
}
return true;
case GDK_w: //multi-tab mode, close editor panel
if (!isSingleTabMode() &&
mainNB->get_current_page()!=mainNB->page_num(*fpanel) &&
mainNB->get_current_page()!=mainNB->page_num(*bpanel)) {
EditorPanel* ep = static_cast<EditorPanel*>(mainNB->get_nth_page (mainNB->get_current_page()));
remEditorPanel (ep);
return true;
}
}
}