2 * Copyright 2010-2017, Haiku, Inc. All Rights Reserved.
3 * Copyright 2009, Pier Luigi Fiorini.
4 * Distributed under the terms of the MIT License.
10 #include <ColumnListView.h>
13 #include <notification/AppUsage.h>
15 #include "AppRefFilter.h"
16 #include "SettingsPane.h"
18 typedef std::map
<BString
, AppUsage
*> appusage_t
;
27 class AppRow
: public BRow
{
29 AppRow(const char* name
,
30 const char* signature
, bool allowed
);
32 const char* Name() const { return fName
.String(); }
33 const char* Signature() { return fSignature
.String(); };
34 void SetAllowed(bool allowed
);
35 bool Allowed() { return fAllowed
; };
36 void RefreshEnabledField();
45 class NotificationsView
: public SettingsPane
{
47 NotificationsView(SettingsHost
* host
);
50 virtual void AttachedToWindow();
51 virtual void MessageReceived(BMessage
* msg
);
53 bool RevertPossible();
55 bool DefaultsPossible();
56 bool UseDefaultRevertButtons();
59 status_t
Load(BMessage
&);
60 status_t
Save(BMessage
&);
61 void _ClearItemSettings();
62 void _UpdateSelectedItem();
63 void _RecallItemSettings();
64 void _PopulateApplications();
66 appusage_t fAppFilters
;
67 AppRefFilter
* fPanelFilter
;
68 BFilePanel
* fAddAppPanel
;
70 BButton
* fRemoveButton
;
72 BColumnListView
* fApplications
;
74 BStringColumn
* fAppCol
;
75 BStringColumn
* fAppEnabledCol
;
78 #endif // _APPS_VIEW_H