style tab cleanup; start using classy kMsg style BMessage vars; no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40599 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -35,7 +35,7 @@ NetworkSetupWindow::NetworkSetupWindow(const char *title)
|
||||
{
|
||||
// ---- Profiles section
|
||||
BMenu *profilesPopup = new BPopUpMenu("<none>");
|
||||
_BuildProfilesMenu(profilesPopup, SELECT_PROFILE_MSG);
|
||||
_BuildProfilesMenu(profilesPopup, kMsgProfileSelected);
|
||||
|
||||
BMenuField *profilesMenuField = new BMenuField("profiles_menu",
|
||||
B_TRANSLATE("Profile:"), profilesPopup);
|
||||
@@ -51,10 +51,10 @@ NetworkSetupWindow::NetworkSetupWindow(const char *title)
|
||||
bottomDivider->SetBorder(B_PLAIN_BORDER);
|
||||
|
||||
fApplyButton = new BButton("apply", B_TRANSLATE("Apply"),
|
||||
new BMessage(APPLY_NOW_MSG));
|
||||
new BMessage(kMsgApply));
|
||||
|
||||
fRevertButton = new BButton("revert", B_TRANSLATE("Revert"),
|
||||
new BMessage(REVERT_MSG));
|
||||
new BMessage(kMsgRevert));
|
||||
fRevertButton->SetEnabled(false);
|
||||
|
||||
// Enable boxes resizing modes
|
||||
@@ -78,7 +78,7 @@ NetworkSetupWindow::NetworkSetupWindow(const char *title)
|
||||
.SetInsets(10, 10, 10, 10)
|
||||
);
|
||||
|
||||
_BuildShowTabView(SHOW_MSG);
|
||||
_BuildShowTabView(kMsgAddonShow);
|
||||
|
||||
bottomDivider->SetExplicitMaxSize(BSize(B_SIZE_UNSET, 1));
|
||||
fPanel->SetExplicitMinSize(BSize(fMinAddonViewRect.Width(),
|
||||
@@ -107,11 +107,10 @@ void
|
||||
NetworkSetupWindow::MessageReceived(BMessage* msg)
|
||||
{
|
||||
switch (msg->what) {
|
||||
|
||||
case NEW_PROFILE_MSG:
|
||||
case kMsgProfileNew:
|
||||
break;
|
||||
|
||||
case SELECT_PROFILE_MSG: {
|
||||
case kMsgProfileSelected: {
|
||||
BPath name;
|
||||
const char *path;
|
||||
bool is_default;
|
||||
@@ -129,7 +128,7 @@ NetworkSetupWindow::MessageReceived(BMessage* msg)
|
||||
break;
|
||||
}
|
||||
|
||||
case SHOW_MSG: {
|
||||
case kMsgAddonShow: {
|
||||
if (fAddonView)
|
||||
fAddonView->RemoveSelf();
|
||||
|
||||
@@ -193,9 +192,9 @@ NetworkSetupWindow::_BuildProfilesMenu(BMenu* menu, int32 msg_what)
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("New" B_UTF8_ELLIPSIS),
|
||||
new BMessage(NEW_PROFILE_MSG)));
|
||||
new BMessage(kMsgProfileNew)));
|
||||
menu->AddItem(new BMenuItem(B_TRANSLATE("Manage" B_UTF8_ELLIPSIS),
|
||||
new BMessage(MANAGE_PROFILES_MSG)));
|
||||
new BMessage(kMsgProfileManage)));
|
||||
|
||||
if (strlen(current_profile)) {
|
||||
item = menu->FindItem(current_profile);
|
||||
|
||||
@@ -23,18 +23,12 @@ class NetworkSetupWindow : public BWindow
|
||||
|
||||
typedef BWindow inherited;
|
||||
|
||||
enum {
|
||||
SELECT_PROFILE_MSG = 'prof',
|
||||
MANAGE_PROFILES_MSG = 'mngp',
|
||||
NEW_PROFILE_MSG = 'newp',
|
||||
COPY_PROFILE_MSG = 'cpyp',
|
||||
DELETE_PROFILE_MSG = 'delp',
|
||||
SHOW_MSG = 'show',
|
||||
HELP_MSG = 'help',
|
||||
DONT_TOUCH_MSG = 'lock',
|
||||
APPLY_NOW_MSG = 'aply',
|
||||
REVERT_MSG = 'rvrt'
|
||||
};
|
||||
static const uint32 kMsgAddonShow = 'show';
|
||||
static const uint32 kMsgProfileSelected = 'prof';
|
||||
static const uint32 kMsgProfileManage = 'mngp';
|
||||
static const uint32 kMsgProfileNew = 'newp';
|
||||
static const uint32 kMsgApply = 'aply';
|
||||
static const uint32 kMsgRevert = 'rvrt';
|
||||
|
||||
bool QuitRequested();
|
||||
void MessageReceived(BMessage* msg);
|
||||
@@ -52,4 +46,6 @@ class NetworkSetupWindow : public BWindow
|
||||
BRect fMinAddonViewRect;
|
||||
};
|
||||
|
||||
|
||||
#endif // ifdef NETWORKSETUPWINDOW_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user