Input preferences: fix crash and add icon

Fixes #15680.
This commit is contained in:
Adrien Destugues 2020-02-06 22:29:13 +01:00
parent 4438fc6589
commit 145f127f3a
3 changed files with 43 additions and 2 deletions

View File

@ -0,0 +1,38 @@
resource app_signature "application/x-vnd.Haiku-Input";
resource app_name_catalog_entry "x-vnd.Haiku-Input:System name:Input";
resource app_flags B_SINGLE_LAUNCH;
resource app_version {
major = 1,
middle = 0,
minor = 0,
/* 0 = development 1 = alpha 2 = beta
3 = gamma 4 = golden master 5 = final */
variety = 2,
internal = 0,
short_info = "Input Preferences",
long_info = "Input Preferences ©2002-2020 Haiku"
};
resource vector_icon {
$"6E636966080301000002000202AC6DA33A810CBCBF0CAEA9C248C4E546BB2A00"
$"01000000FF010000FF020016023D2328BA287D3B40A23E5D334837CE48FA2500"
$"69FF01020116023E40000000000000003E400048000048000000FBFFC0020106"
$"02B832FBBACA8D3ACA8DB832FB48D3BB493902FFBEBEBE0001000005BE05FC01"
$"0100007D0604033E2C3C2436263E222E2E282E342E2802082C4CB5EDC39ABA27"
$"C5B7BFBFC883BD60C754C19AC9715052C4C9C842C722C5E9544EC6B5C656C90E"
$"C3FDC7B7C08BC992C179C558BF5C4038C21FBDBFBDE5BBA232BD5BBB83BC04B9"
$"2ABE5DB6FB42B7FDBF8AB5A4C1E30208475443544B54C6EB50C660C6ABC777C5"
$"9456C487C803C508C9DBC33056405842543E42334E3536312C3A3036283EB628"
$"C223B628C2232A4A344AB80EC27CBE0FC50F0604EE2E383838323638383B3635"
$"333B332F3304032F3049304930433A36BA1DBE14413141330606FE0B4659C487"
$"59C36B59C5605954C8E9C6D7C95AC91CC837CBD7C4FBCB67C614CC30C41DCAE7"
$"C289CBC8C2FAC983C1D75443080A070105000A0101001001178400040A000302"
$"01031001178422040A020101000A030102000A0001041001178100040A060104"
$"123FE3AA0000000000003FDFFC41DB9540107701178100040A04010300"
};

View File

@ -57,8 +57,10 @@ InputWindow::MessageReceived(BMessage* message)
switch (message->what) {
case ITEM_SELECTED:
{
int32 name = message->GetInt32("index", 0);
fCardView->CardLayout()->SetVisibleItem(name);
int32 index = message->GetInt32("index", 0);
if (index >= 0)
fCardView->CardLayout()->SetVisibleItem(index);
break;
}
case kMsgMouseType:
case kMsgMouseMap:

View File

@ -16,6 +16,7 @@ Preference Input :
MouseSettings.cpp
SettingsView.cpp
: be [ TargetLibsupc++ ] localestub
: Input.rdef
;
DoCatalogs Input :
x-vnd.Haiku-Input