From 313b1c624fa860fae78599d339a528561edd3b03 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Fri, 21 Feb 2014 12:07:11 -0500 Subject: [PATCH] Keymap: Center Modifier Keys window in main window --- src/preferences/keymap/KeymapApplication.cpp | 11 ++++++++--- src/preferences/keymap/KeymapApplication.h | 9 +++++---- src/preferences/keymap/ModifierKeysWindow.cpp | 2 -- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/preferences/keymap/KeymapApplication.cpp b/src/preferences/keymap/KeymapApplication.cpp index f7bf5f615a..f1888db6e3 100644 --- a/src/preferences/keymap/KeymapApplication.cpp +++ b/src/preferences/keymap/KeymapApplication.cpp @@ -1,16 +1,20 @@ /* - * Copyright 2004-2006 Haiku Inc. All rights reserved. + * Copyright 2004-2014 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: - * Sandor Vroemisse * Jérôme Duval + * John Scipione, jscipione@gmail.com + * Sandor Vroemisse */ #include "KeymapApplication.h" +// #pragma mark - KeymapApplication + + KeymapApplication::KeymapApplication() : BApplication("application/x-vnd.Haiku-Keymap"), @@ -48,12 +52,13 @@ KeymapApplication::_ShowModifierKeysWindow() fModifierKeysWindow->Activate(); else { fModifierKeysWindow = new ModifierKeysWindow(); + fModifierKeysWindow->CenterIn(fWindow->Frame()); fModifierKeysWindow->Show(); } } -// #pragma mark - +// #pragma mark - main method int diff --git a/src/preferences/keymap/KeymapApplication.h b/src/preferences/keymap/KeymapApplication.h index df4a8b8ae4..1802dcb7e4 100644 --- a/src/preferences/keymap/KeymapApplication.h +++ b/src/preferences/keymap/KeymapApplication.h @@ -1,12 +1,12 @@ /* - * Copyright 2004-2006 Haiku Inc. All rights reserved. + * Copyright 2004-2014 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: - * Sandor Vroemisse * Jérôme Duval + * John Scipione, jscipione@gmail.com + * Sandor Vroemisse */ - #ifndef KEYMAP_APPLICATION_H #define KEYMAP_APPLICATION_H @@ -41,4 +41,5 @@ private: ModifierKeysWindow* fModifierKeysWindow; }; -#endif // KEYMAP_APPLICATION_H + +#endif // KEYMAP_APPLICATION_H diff --git a/src/preferences/keymap/ModifierKeysWindow.cpp b/src/preferences/keymap/ModifierKeysWindow.cpp index 3ac2cf2cf0..c260953c0e 100644 --- a/src/preferences/keymap/ModifierKeysWindow.cpp +++ b/src/preferences/keymap/ModifierKeysWindow.cpp @@ -341,8 +341,6 @@ ModifierKeysWindow::ModifierKeysWindow() _MarkMenuItems(); _ValidateDuplicateKeys(); - - CenterOnScreen(); }