Network: removed dummy add-ons.
This commit is contained in:
parent
85fb1470bf
commit
14f5b52b21
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2004-2011 Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "NetworkSetupAddOn.h"
|
||||
|
||||
NetworkSetupAddOn*
|
||||
get_nth_addon(image_id image, int index)
|
||||
{
|
||||
if (index != 0)
|
||||
return NULL;
|
||||
return new NetworkSetupAddOn(image);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
SubDir HAIKU_TOP src preferences network DummyAddOn ;
|
||||
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src preferences network ] ;
|
||||
|
||||
Addon Dummy :
|
||||
DummyAddOn.cpp
|
||||
: be <nogrist>Network [ TargetLibstdc++ ] # $(HAIKU_NETWORK_LIBS)
|
||||
;
|
||||
|
@ -1,9 +0,0 @@
|
||||
SubDir HAIKU_TOP src preferences network MultipleAddOns ;
|
||||
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) src preferences network ] ;
|
||||
|
||||
Addon Multiple :
|
||||
MultipleAddOn.cpp
|
||||
: be <nogrist>Network [ TargetLibstdc++ ] # $(HAIKU_NETWORK_LIBS)
|
||||
;
|
||||
|
@ -1,62 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "NetworkSetupAddOn.h"
|
||||
|
||||
class MultipleAddOn : public NetworkSetupAddOn {
|
||||
public:
|
||||
MultipleAddOn(image_id addon_image, int index);
|
||||
~MultipleAddOn();
|
||||
BView* CreateView(BRect* bounds);
|
||||
const char* Name();
|
||||
|
||||
private:
|
||||
char* fName;
|
||||
rgb_color fViewColor;
|
||||
};
|
||||
|
||||
|
||||
MultipleAddOn::MultipleAddOn(image_id image, int i)
|
||||
:
|
||||
NetworkSetupAddOn(image)
|
||||
{
|
||||
fName = (char*) malloc(64);
|
||||
sprintf(fName, "Multi #%d", i);
|
||||
|
||||
fViewColor.red = rand() % 256;
|
||||
fViewColor.blue = rand() % 256;
|
||||
fViewColor.green = rand() % 256;
|
||||
fViewColor.alpha = 255;
|
||||
}
|
||||
|
||||
|
||||
MultipleAddOn::~MultipleAddOn()
|
||||
{
|
||||
free(fName);
|
||||
}
|
||||
|
||||
|
||||
BView*
|
||||
MultipleAddOn::CreateView(BRect* bounds)
|
||||
{
|
||||
BView *v = new BView(*bounds, "a view", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
v->SetViewColor(fViewColor);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
||||
const char*
|
||||
MultipleAddOn::Name()
|
||||
{
|
||||
return fName;
|
||||
}
|
||||
|
||||
|
||||
NetworkSetupAddOn*
|
||||
get_nth_addon(image_id image, int index)
|
||||
{
|
||||
if (index < 0 || index > 3)
|
||||
return NULL;
|
||||
|
||||
return new MultipleAddOn(image, index);
|
||||
}
|
Loading…
Reference in New Issue
Block a user