* Fix 'missing braces around initializer for 'property_info'' warning
* Style cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -11,6 +11,9 @@
|
||||
* Pier Luigi Fiorini, [email protected]
|
||||
*/
|
||||
|
||||
|
||||
#include "NotificationWindow.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <Alert.h>
|
||||
@@ -23,16 +26,20 @@
|
||||
#include "AppGroupView.h"
|
||||
#include "AppUsage.h"
|
||||
#include "BorderView.h"
|
||||
#include "NotificationWindow.h"
|
||||
|
||||
|
||||
property_info main_prop_list[] = {
|
||||
{"message", {B_GET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0}, "get a message"},
|
||||
{ "message", {B_COUNT_PROPERTIES, 0}, {B_DIRECT_SPECIFIER, 0}, "count messages"},
|
||||
{ "message", {B_CREATE_PROPERTY, 0}, {B_DIRECT_SPECIFIER, 0}, "create a message"},
|
||||
{ "message", {B_SET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0 }, "modify a message" },
|
||||
0
|
||||
{"message", {B_COUNT_PROPERTIES, 0}, {B_DIRECT_SPECIFIER, 0},
|
||||
"count messages"},
|
||||
{"message", {B_CREATE_PROPERTY, 0}, {B_DIRECT_SPECIFIER, 0},
|
||||
"create a message"},
|
||||
{"message", {B_SET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0},
|
||||
"modify a message"},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
const float kCloseSize = 8;
|
||||
const float kExpandSize = 8;
|
||||
const float kPenSize = 1;
|
||||
@@ -142,12 +149,14 @@ NotificationWindow::MessageReceived(BMessage* message)
|
||||
messageOkay = false;
|
||||
if (message->FindString("title", &title) != B_OK)
|
||||
messageOkay = false;
|
||||
if (message->FindString("app", &app) != B_OK && message->FindString("appTitle", &app) != B_OK)
|
||||
if (message->FindString("app", &app) != B_OK
|
||||
&& message->FindString("appTitle", &app) != B_OK)
|
||||
messageOkay = false;
|
||||
|
||||
if (messageOkay) {
|
||||
NotificationView* view = new NotificationView(this, (notification_type)type, app,
|
||||
title, content, new BMessage(*message));
|
||||
NotificationView* view = new NotificationView(this,
|
||||
(notification_type)type, app, title, content,
|
||||
new BMessage(*message));
|
||||
|
||||
appfilter_t::iterator fIt = fAppFilters.find(app);
|
||||
bool allow = false;
|
||||
@@ -175,9 +184,9 @@ NotificationWindow::MessageReceived(BMessage* message)
|
||||
group = new AppGroupView(this, app);
|
||||
fAppViews[app] = group;
|
||||
fBorder->AddChild(group);
|
||||
} else {
|
||||
} else
|
||||
group = aIt->second;
|
||||
};
|
||||
|
||||
group->AddInfo(view);
|
||||
|
||||
ResizeAll();
|
||||
@@ -279,7 +288,6 @@ NotificationWindow::Timeout()
|
||||
}
|
||||
|
||||
|
||||
|
||||
infoview_layout
|
||||
NotificationWindow::Layout()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user