Keymap: Center Modifier Keys window in main window

This commit is contained in:
John Scipione
2014-02-21 17:11:46 -05:00
parent a44b74d545
commit 313b1c624f
3 changed files with 13 additions and 9 deletions
+8 -3
View File
@@ -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, [email protected]
* 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
+5 -4
View File
@@ -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, [email protected]
* 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
@@ -341,8 +341,6 @@ ModifierKeysWindow::ModifierKeysWindow()
_MarkMenuItems();
_ValidateDuplicateKeys();
CenterOnScreen();
}