Cleanup. Thanks korli!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41068 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jonas Sundström
2011-03-21 12:26:05 +00:00
parent 9c87cb1b9f
commit bfb8680ff1
5 changed files with 22 additions and 18 deletions
@@ -14,12 +14,12 @@
#include <Alert.h> #include <Alert.h>
#include <Catalog.h> #include <Catalog.h>
#include <Entry.h>
#include <Directory.h> #include <Directory.h>
#include <Entry.h>
#include <FindDirectory.h> #include <FindDirectory.h>
#include <String.h> #include <String.h>
#include <TranslatorRoster.h>
#include <TextView.h> #include <TextView.h>
#include <TranslatorRoster.h>
#include "DataTranslationsWindow.h" #include "DataTranslationsWindow.h"
@@ -32,7 +32,8 @@ const char* kApplicationSignature = "application/x-vnd.Haiku-DataTranslations";
DataTranslationsApplication::DataTranslationsApplication() DataTranslationsApplication::DataTranslationsApplication()
: BApplication(kApplicationSignature) :
BApplication(kApplicationSignature)
{ {
new DataTranslationsWindow(); new DataTranslationsWindow();
} }
@@ -12,10 +12,8 @@
#include <Application.h> #include <Application.h>
#include <Directory.h>
#include <Entry.h>
class BDirectory;
class BEntry;
class DataTranslationsApplication : public BApplication { class DataTranslationsApplication : public BApplication {
@@ -14,15 +14,15 @@
#include <stdio.h> #include <stdio.h>
#include <Application.h>
#include <Alignment.h>
#include <Alert.h> #include <Alert.h>
#include <Entry.h> #include <Alignment.h>
#include <Application.h>
#include <Bitmap.h> #include <Bitmap.h>
#include <Box.h> #include <Box.h>
#include <Button.h> #include <Button.h>
#include <Catalog.h> #include <Catalog.h>
#include <ControlLook.h> #include <ControlLook.h>
#include <Entry.h>
#include <LayoutBuilder.h> #include <LayoutBuilder.h>
#include <ListView.h> #include <ListView.h>
#include <Path.h> #include <Path.h>
@@ -22,12 +22,14 @@ IconView::IconView(const BRect& frame, const char* name, uint32 resize,
SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
} }
IconView::~IconView() IconView::~IconView()
{ {
delete fIconBitmap; delete fIconBitmap;
fIconBitmap = NULL; fIconBitmap = NULL;
} }
bool bool
IconView::SetIcon(const BPath& path) IconView::SetIcon(const BPath& path)
{ {
@@ -45,6 +47,7 @@ IconView::SetIcon(const BPath& path)
return true; return true;
} }
bool bool
IconView::DrawIcon(bool draw) IconView::DrawIcon(bool draw)
{ {
@@ -56,6 +59,7 @@ IconView::DrawIcon(bool draw)
return prev; return prev;
} }
void void
IconView::Draw(BRect area) IconView::Draw(BRect area)
{ {
@@ -11,10 +11,10 @@
#include "TranslatorListView.h" #include "TranslatorListView.h"
#include <Application.h>
#include <string.h> #include <string.h>
#include <Application.h>
static int static int
compare_items(const void* a, const void* b) compare_items(const void* a, const void* b)
@@ -45,7 +45,7 @@ TranslatorItem::~TranslatorItem()
// #pragma mark - // #pragma mark -
TranslatorListView::TranslatorListView(const char *name, list_view_type type) TranslatorListView::TranslatorListView(const char* name, list_view_type type)
: :
BListView(name, B_SINGLE_SELECTION_LIST) BListView(name, B_SINGLE_SELECTION_LIST)
{ {
@@ -65,7 +65,7 @@ TranslatorListView::TranslatorAt(int32 index) const
void void
TranslatorListView::MessageReceived(BMessage *message) TranslatorListView::MessageReceived(BMessage* message)
{ {
uint32 type; uint32 type;
int32 count; int32 count;
@@ -90,15 +90,16 @@ TranslatorListView::MessageReceived(BMessage *message)
void void
TranslatorListView::MouseMoved(BPoint point, uint32 transit, const BMessage *dragMessage) TranslatorListView::MouseMoved(BPoint point, uint32 transit,
const BMessage* dragMessage)
{ {
if (dragMessage != NULL && transit == B_ENTERED_VIEW) { if (dragMessage != NULL && transit == B_ENTERED_VIEW) {
// Draw a red box around the inside of the view // Draw a red box around the inside of the view
// to tell the user that this view accepts drops // to tell the user that this view accepts drops
SetHighColor(220,0,0); SetHighColor(220, 0, 0);
SetPenSize(4); SetPenSize(4);
StrokeRect(Bounds()); StrokeRect(Bounds());
SetHighColor(0,0,0); SetHighColor(0, 0, 0);
} else if (dragMessage != NULL && transit == B_EXITED_VIEW) } else if (dragMessage != NULL && transit == B_EXITED_VIEW)
Invalidate(); Invalidate();
} }