* Created an icon for the Mail preflet, based on the Mail app icon.
* Added vector icon loading for the interface (Haiku build). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24246 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2007-2008, Haiku Inc. All Rights Reserved.
|
||||
* Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved.
|
||||
* Copyright 2007, Haiku Inc. All Rights Reserved.
|
||||
*
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
@@ -32,19 +32,22 @@
|
||||
#include <Resources.h>
|
||||
#include <Region.h>
|
||||
|
||||
#include <AppFileInfo.h>
|
||||
#include <Entry.h>
|
||||
#include <Directory.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <Path.h>
|
||||
#include <AppFileInfo.h>
|
||||
|
||||
#include <MailSettings.h>
|
||||
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <MDRLanguage.h>
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// define if you want to have an apply button
|
||||
//#define HAVE_APPLY_BUTTON
|
||||
|
||||
@@ -53,7 +56,7 @@ const char *kMailto = "mailto:[email protected]";
|
||||
const char *kBugsitePretty = "Bug-Tracker at SourceForge.net";
|
||||
const char *kBugsite = "http://sourceforge.net/tracker/?func=add&group_id=26926&atid=388726";
|
||||
const char *kWebsite = "http://www.haiku-os.org";
|
||||
const rgb_color kLinkColor = {40,40,180};
|
||||
const rgb_color kLinkColor = { 40, 40, 180, 255 };
|
||||
|
||||
|
||||
const uint32 kMsgAccountSelected = 'acsl';
|
||||
@@ -88,11 +91,13 @@ class AccountsListView : public BListView {
|
||||
class BitmapView : public BView
|
||||
{
|
||||
public:
|
||||
BitmapView(BBitmap *bitmap) : BView(bitmap->Bounds(),NULL,B_FOLLOW_NONE,B_WILL_DRAW)
|
||||
BitmapView(BBitmap *bitmap) : BView(bitmap->Bounds(), NULL,
|
||||
B_FOLLOW_NONE, B_WILL_DRAW)
|
||||
{
|
||||
fBitmap = bitmap;
|
||||
|
||||
SetDrawingMode(B_OP_ALPHA);
|
||||
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
|
||||
}
|
||||
|
||||
~BitmapView()
|
||||
@@ -104,12 +109,13 @@ class BitmapView : public BView
|
||||
{
|
||||
SetViewColor(Parent()->ViewColor());
|
||||
|
||||
MoveTo((Parent()->Bounds().Width() - Bounds().Width()) / 2,Frame().top);
|
||||
MoveTo((Parent()->Bounds().Width() - Bounds().Width()) / 2,
|
||||
Frame().top);
|
||||
}
|
||||
|
||||
virtual void Draw(BRect updateRect)
|
||||
{
|
||||
DrawBitmap(fBitmap,updateRect,updateRect);
|
||||
DrawBitmap(fBitmap, updateRect, updateRect);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -120,24 +126,22 @@ class BitmapView : public BView
|
||||
class AboutTextView : public BTextView
|
||||
{
|
||||
public:
|
||||
AboutTextView(BRect rect) : BTextView(rect,NULL,rect.OffsetToCopy(B_ORIGIN),B_FOLLOW_NONE,B_WILL_DRAW)
|
||||
AboutTextView(BRect rect) : BTextView(rect, NULL,
|
||||
rect.OffsetToCopy(B_ORIGIN), B_FOLLOW_NONE, B_WILL_DRAW)
|
||||
{
|
||||
int32 major = 0,middle = 0,minor = 0,variety = 0,internal = 1;
|
||||
|
||||
// get version information for app
|
||||
|
||||
app_info appInfo;
|
||||
if (be_app->GetAppInfo(&appInfo) == B_OK)
|
||||
{
|
||||
BFile file(&appInfo.ref,B_READ_ONLY);
|
||||
if (file.InitCheck() == B_OK)
|
||||
{
|
||||
if (be_app->GetAppInfo(&appInfo) == B_OK) {
|
||||
BFile file(&appInfo.ref, B_READ_ONLY);
|
||||
if (file.InitCheck() == B_OK) {
|
||||
BAppFileInfo info(&file);
|
||||
if (info.InitCheck() == B_OK)
|
||||
{
|
||||
if (info.InitCheck() == B_OK) {
|
||||
version_info versionInfo;
|
||||
if (info.GetVersionInfo(&versionInfo,B_APP_VERSION_KIND) == B_OK)
|
||||
{
|
||||
if (info.GetVersionInfo(&versionInfo,
|
||||
B_APP_VERSION_KIND) == B_OK) {
|
||||
major = versionInfo.major;
|
||||
middle = versionInfo.middle;
|
||||
minor = versionInfo.minor;
|
||||
@@ -440,12 +444,13 @@ ConfigWindow::~ConfigWindow()
|
||||
void
|
||||
ConfigWindow::MakeHowToView()
|
||||
{
|
||||
#ifndef HAIKU_TARGET_PLATFORM_HAIKU
|
||||
BResources *resources = BApplication::AppResources();
|
||||
if (resources) {
|
||||
size_t length;
|
||||
char *buffer = (char *)resources->FindResource(B_LARGE_ICON_TYPE, 101, &length);
|
||||
if (buffer) {
|
||||
BBitmap *bitmap = new BBitmap(BRect(0, 0, 63, 63), B_CMAP8);
|
||||
BBitmap *bitmap = new (nothrow) BBitmap(BRect(0, 0, 63, 63), B_CMAP8);
|
||||
if (bitmap && bitmap->InitCheck() == B_OK) {
|
||||
// copy and enlarge a 32x32 8-bit bitmap
|
||||
char *bits = (char *)bitmap->Bits();
|
||||
@@ -461,6 +466,20 @@ ConfigWindow::MakeHowToView()
|
||||
delete bitmap;
|
||||
}
|
||||
}
|
||||
#else
|
||||
app_info info;
|
||||
if (be_app->GetAppInfo(&info) == B_OK) {
|
||||
BFile appFile(&info.ref, B_READ_ONLY);
|
||||
BAppFileInfo appFileInfo(&appFile);
|
||||
if (appFileInfo.InitCheck() == B_OK) {
|
||||
BBitmap *bitmap = new (nothrow) BBitmap(BRect(0, 0, 63, 63), B_RGBA32);
|
||||
if (appFileInfo.GetIcon(bitmap, B_LARGE_ICON) == B_OK) {
|
||||
fConfigView->AddChild(new BitmapView(bitmap));
|
||||
} else
|
||||
delete bitmap;
|
||||
}
|
||||
}
|
||||
#endif // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
|
||||
BRect rect = fConfigView->Bounds();
|
||||
BTextView *text = new BTextView(rect, NULL, rect, B_FOLLOW_NONE, B_WILL_DRAW);
|
||||
|
||||
@@ -15,9 +15,57 @@ resource app_version {
|
||||
internal = 3,
|
||||
|
||||
short_info = "E-mail",
|
||||
long_info = "E-mail ©2005-2006 Haiku"
|
||||
long_info = "E-mail ©2005-2008 Haiku"
|
||||
};
|
||||
|
||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||
|
||||
resource vector_icon {
|
||||
$"6E63696619050004006A020006063C55F93D5C9ABF48EE3E484E4B6A43C35976"
|
||||
$"495F849385EAF7FFA2A5B7C2C2A0BCCCDC748994FF829AB2020006033B9EE13B"
|
||||
$"9EE1BB9EE13B9EE14A10E147F9EB00ACD3DB9FFFFFFFFF6492A8020006023A2A"
|
||||
$"16B8F45D3AE2F43C1D5446BCF5477C2100F7FBFDFF31596B02000603BA68BD3A"
|
||||
$"CB11BCBEBBBC5E184A35D549E60100343D412F364145FF566F7A020006023B4E"
|
||||
$"07BA96743B15213BEFCE499B3D4A176700435563FF2D404802000602B275353A"
|
||||
$"6F4ABC7EBAB484CB49DE564A6F2E00BED1DBFF8DADBA020006033C0E4E3CF575"
|
||||
$"BF48EE3E484E4BCE1841BF59495F849385EAF7FFC4A0BCCC020006023A11DA3A"
|
||||
$"5196BACC2E3A7F4848C35C4A23C100FFEEC0FFE7D6A80200060238DDE0B86563"
|
||||
$"3B86F63C1C2A48AFCD493E7A00B4A06BFFA28B4E03826A310357697C03F20606"
|
||||
$"020006022F146D3B80D3BC7FF03032974B85E5482BA200FFC7BAFFC31A1A0200"
|
||||
$"06022F146D3B80D3BC7FF03032974B85E5482BA201E3E3E3FF59697A02000602"
|
||||
$"2F146D3B80D3BC7FF03032974B75E5484BA200D6D9DCFF78899903FAA28E0200"
|
||||
$"16023C9F493AEA2DBAABFF3C6759485B5A4A38E400FFFFDA0300337F02000603"
|
||||
$"2E9D8036396AB97D97320D5448FDF84B9FEA00FFEECEE3F4A91AFFD78F05059E"
|
||||
$"020006022E56F335D63CB97D683220C948CD3E4BB3CA00FFE2CEFFA67C620200"
|
||||
$"1602320FFC35FEF8B8E7A334FFA04A967B4B950500F5FF94020006022E56F335"
|
||||
$"D63CB97D683220C948ED3E4BB3CA00FFDBD5FFFCA98F190610AAAC2FFE465631"
|
||||
$"5C2B5E31604A4D5E4D604D5C4A5CC2FC564C56C41E564E5653535155C788C71B"
|
||||
$"C9764E5B5F48CB8147CB8147CC4D4460406043603D5C3B5E3C5C3B0204464745"
|
||||
$"3BC291BE263C2DC189B9DE382B2F2D342B342D392F362DBFCBBADC0608FEAF5A"
|
||||
$"405A345A345A2B4E23572649213F2545223F252E2D2E2DB7AFB8FEB6FDBC282A"
|
||||
$"BA75B6FDBC282A49C1BCC81F0607FE1A5A405A345A345A2B4E23572649213F25"
|
||||
$"45223F252E2D44455608022C3AC131C13E0404FE44564446444F443D382FC066"
|
||||
$"BAE5BAE0B8222D2F302D2D2F0606EF03382F382FB89AB6FEB6FDBD5A2A30B6FD"
|
||||
$"BD5A2A492B3A2B3A2B30382F2E2A382FBC910605EF03382F382FB89AB6FEB763"
|
||||
$"BD5A2B30B763BD5A2B49C0BBBDBDC0BBBDBDC000BB9BBC912FBE9DBA00BC912F"
|
||||
$"0605FE022C4A444D3B49444D44454445C156C041C0BBBDBDC122BEEAC0BBBDBD"
|
||||
$"2A490A0844C7EB44442C3A2C4ABE31C68A3F4A434CBFEFC74D0A04BE31C68A3F"
|
||||
$"4A434CBFEFC74D0A054EBA2B4E285623562C50310A044CB9BA4C274E284EBA20"
|
||||
$"0A044C274E28562354220A044E404EBA2B4F324F3F0A044E404C3F4CB9C54EBA"
|
||||
$"390A084C274C3F4E404F3F4F32562C562354220606B60E304246384CBB53C34B"
|
||||
$"BDB7C5AF3C52404C3C48BF65C3B6BC53C1CB0A0E314534463549384A384B3B4B"
|
||||
$"3B4D3E4C3C4B3B4939493847364734450606CA022B5A3058484A5A4A584A5C48"
|
||||
$"5C300A0430584658465C305C0A032B5AB82DC9CAB838CA710A04B82DC9CA3058"
|
||||
$"305CB838CA710A0446584858485C465C06032E48584A5A4A584A5C485C190A01"
|
||||
$"0100000A000202131001178402040A020103000A030101000A00010510011784"
|
||||
$"00040A040106000A050107000A060108000A070109000A0C010A000A08010410"
|
||||
$"01178200040A0001101001178400040A0D010B000A0E010C000A11010D000A0F"
|
||||
$"010E000A10010F000A0001111001178400040A120111000A1301120815FF0A14"
|
||||
$"0114000A150115000A160116000A170117000A18011800"
|
||||
};
|
||||
|
||||
#else // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@@ -72,4 +120,7 @@ resource mini_icon {
|
||||
$"FFFF00000F0F0F0F0FFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
#endif // HAIKU_TARGET_PLATFORM_HAIKU
|
||||
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
Reference in New Issue
Block a user