Cleanup of KeymapWindow.cpp
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <File.h>
|
#include <File.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
#include <GroupLayoutBuilder.h>
|
|
||||||
#include <LayoutBuilder.h>
|
#include <LayoutBuilder.h>
|
||||||
#include <ListView.h>
|
#include <ListView.h>
|
||||||
#include <Locale.h>
|
#include <Locale.h>
|
||||||
@@ -218,7 +217,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
case B_SAVE_REQUESTED:
|
case B_SAVE_REQUESTED:
|
||||||
{
|
{
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
const char *name;
|
const char* name;
|
||||||
if (message->FindRef("directory", &ref) == B_OK
|
if (message->FindRef("directory", &ref) == B_OK
|
||||||
&& message->FindString("name", &name) == B_OK) {
|
&& message->FindString("name", &name) == B_OK) {
|
||||||
BDirectory directory(&ref);
|
BDirectory directory(&ref);
|
||||||
@@ -261,7 +260,7 @@ KeymapWindow::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
case kMsgMenuFontChanged:
|
case kMsgMenuFontChanged:
|
||||||
{
|
{
|
||||||
BMenuItem *item = fFontMenu->FindMarked();
|
BMenuItem* item = fFontMenu->FindMarked();
|
||||||
if (item != NULL) {
|
if (item != NULL) {
|
||||||
BFont font;
|
BFont font;
|
||||||
font.SetFamilyAndStyle(item->Label(), NULL);
|
font.SetFamilyAndStyle(item->Label(), NULL);
|
||||||
@@ -467,7 +466,7 @@ KeymapWindow::_CreateMenu()
|
|||||||
|
|
||||||
for (int32 i = 0; i < numFamilies; i++) {
|
for (int32 i = 0; i < numFamilies; i++) {
|
||||||
if (get_font_family(i, &family, &flags) == B_OK) {
|
if (get_font_family(i, &family, &flags) == B_OK) {
|
||||||
BMenuItem *item =
|
BMenuItem* item =
|
||||||
new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
|
new BMenuItem(family, new BMessage(kMsgMenuFontChanged));
|
||||||
fFontMenu->AddItem(item);
|
fFontMenu->AddItem(item);
|
||||||
|
|
||||||
@@ -850,7 +849,7 @@ KeymapWindow::_UseKeymap()
|
|||||||
void
|
void
|
||||||
KeymapWindow::_FillSystemMaps()
|
KeymapWindow::_FillSystemMaps()
|
||||||
{
|
{
|
||||||
BListItem *item;
|
BListItem* item;
|
||||||
while ((item = fSystemListView->RemoveItem(static_cast<int32>(0))))
|
while ((item = fSystemListView->RemoveItem(static_cast<int32>(0))))
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
@@ -1085,9 +1084,9 @@ KeymapWindow::_GetMarkedKeyboardLayoutPath(BMenu* menu)
|
|||||||
return _GetMarkedKeyboardLayoutPath(submenu);
|
return _GetMarkedKeyboardLayoutPath(submenu);
|
||||||
else {
|
else {
|
||||||
if (item->IsMarked()
|
if (item->IsMarked()
|
||||||
&& item->Message()->FindRef("ref", &ref) == B_OK) {
|
&& item->Message()->FindRef("ref", &ref) == B_OK) {
|
||||||
path.SetTo(&ref);
|
path.SetTo(&ref);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user