* 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]
|
* Pier Luigi Fiorini, [email protected]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "NotificationWindow.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
@@ -23,16 +26,20 @@
|
|||||||
#include "AppGroupView.h"
|
#include "AppGroupView.h"
|
||||||
#include "AppUsage.h"
|
#include "AppUsage.h"
|
||||||
#include "BorderView.h"
|
#include "BorderView.h"
|
||||||
#include "NotificationWindow.h"
|
|
||||||
|
|
||||||
property_info main_prop_list[] = {
|
property_info main_prop_list[] = {
|
||||||
{"message", {B_GET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0}, "get a message"},
|
{"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_COUNT_PROPERTIES, 0}, {B_DIRECT_SPECIFIER, 0},
|
||||||
{ "message", {B_CREATE_PROPERTY, 0}, {B_DIRECT_SPECIFIER, 0}, "create a message"},
|
"count messages"},
|
||||||
{ "message", {B_SET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0 }, "modify a message" },
|
{"message", {B_CREATE_PROPERTY, 0}, {B_DIRECT_SPECIFIER, 0},
|
||||||
0
|
"create a message"},
|
||||||
|
{"message", {B_SET_PROPERTY, 0}, {B_INDEX_SPECIFIER, 0},
|
||||||
|
"modify a message"},
|
||||||
|
{0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const float kCloseSize = 8;
|
const float kCloseSize = 8;
|
||||||
const float kExpandSize = 8;
|
const float kExpandSize = 8;
|
||||||
const float kPenSize = 1;
|
const float kPenSize = 1;
|
||||||
@@ -142,12 +149,14 @@ NotificationWindow::MessageReceived(BMessage* message)
|
|||||||
messageOkay = false;
|
messageOkay = false;
|
||||||
if (message->FindString("title", &title) != B_OK)
|
if (message->FindString("title", &title) != B_OK)
|
||||||
messageOkay = false;
|
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;
|
messageOkay = false;
|
||||||
|
|
||||||
if (messageOkay) {
|
if (messageOkay) {
|
||||||
NotificationView* view = new NotificationView(this, (notification_type)type, app,
|
NotificationView* view = new NotificationView(this,
|
||||||
title, content, new BMessage(*message));
|
(notification_type)type, app, title, content,
|
||||||
|
new BMessage(*message));
|
||||||
|
|
||||||
appfilter_t::iterator fIt = fAppFilters.find(app);
|
appfilter_t::iterator fIt = fAppFilters.find(app);
|
||||||
bool allow = false;
|
bool allow = false;
|
||||||
@@ -175,9 +184,9 @@ NotificationWindow::MessageReceived(BMessage* message)
|
|||||||
group = new AppGroupView(this, app);
|
group = new AppGroupView(this, app);
|
||||||
fAppViews[app] = group;
|
fAppViews[app] = group;
|
||||||
fBorder->AddChild(group);
|
fBorder->AddChild(group);
|
||||||
} else {
|
} else
|
||||||
group = aIt->second;
|
group = aIt->second;
|
||||||
};
|
|
||||||
group->AddInfo(view);
|
group->AddInfo(view);
|
||||||
|
|
||||||
ResizeAll();
|
ResizeAll();
|
||||||
@@ -279,7 +288,6 @@ NotificationWindow::Timeout()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
infoview_layout
|
infoview_layout
|
||||||
NotificationWindow::Layout()
|
NotificationWindow::Layout()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user