* Cleanup of signatures and version infos - this is part of a fix to bug #909.
I've done all preferences apps for now, and some related. * Some other related cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19090 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
287751449f
commit
37ec4f04fe
@ -2,7 +2,8 @@
|
||||
* Copyright (c) 2005-2006, Haiku, Inc.
|
||||
* Distributed under the terms of the MIT license.
|
||||
*
|
||||
* Author: DarkWyrm <bpmagic@columbus.rr.com>
|
||||
* Author:
|
||||
* DarkWyrm <bpmagic@columbus.rr.com>
|
||||
*/
|
||||
|
||||
|
||||
@ -79,7 +80,7 @@ class AboutView : public BView {
|
||||
|
||||
|
||||
AboutApp::AboutApp(void)
|
||||
: BApplication("application/x-vnd.haiku-AboutHaiku")
|
||||
: BApplication("application/x-vnd.Haiku-About")
|
||||
{
|
||||
AboutWindow *window = new AboutWindow();
|
||||
window->Show();
|
||||
|
@ -1,7 +1,24 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-About";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_BETA,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "AboutHaiku",
|
||||
long_info = "AboutHaiku ©2005-2006 Haiku, Inc."
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource(1, "haikulogo.png") #'PNG ' import "../../../data/artwork/HAIKU logo - black on white - tiny.png";
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array {
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF62FFFFFFFFFF"
|
||||
@ -36,7 +53,7 @@ resource(101, "BEOS:L:STD_ICON") #'ICON' array {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array {
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -54,20 +71,3 @@ resource(101, "BEOS:M:STD_ICON") #'MICN' array {
|
||||
$"FFFFFFFFFFFF83FFFFFF1DFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.haiku-AboutHaiku";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_ALPHA,
|
||||
|
||||
internal = 3,
|
||||
|
||||
short_info = "AboutHaiku 1.0.0",
|
||||
long_info = "AboutHaiku ©2005 Haiku, Inc."
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"02000000";
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.Haiku-DiskProbe";
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message
|
||||
{
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message {
|
||||
"types" = "application/octet-stream"
|
||||
};
|
||||
|
||||
resource app_version
|
||||
{
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
@ -19,11 +19,10 @@ resource app_version
|
||||
internal = 3,
|
||||
|
||||
short_info = "DiskProbe",
|
||||
long_info = "DiskProbe 1.0.0 ©2004-2005 Haiku"
|
||||
long_info = "DiskProbe ©2004-2006 Haiku"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -58,8 +57,7 @@ resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFF0000FFFFFFFFFFFFFFFF"
|
||||
@ -77,5 +75,3 @@ resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
$"FFFFFFFFFF0000171C0E000F0FFFFFFF"
|
||||
$"FFFFFFFFFFFFFF0000000E0FFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"00000000";
|
||||
|
@ -1,81 +1,78 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// Program: desklink
|
||||
// Author: Jérôme DUVAL
|
||||
// Description: VolumeControl and link items in Deskbar
|
||||
// Created : October 20, 2003
|
||||
// Modified by: Jérome Duval
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
|
||||
#include "DeskButton.h"
|
||||
|
||||
#include <Dragger.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Message.h>
|
||||
#include <String.h>
|
||||
#include <Alert.h>
|
||||
#include <Bitmap.h>
|
||||
#include <Dragger.h>
|
||||
#include <MenuItem.h>
|
||||
#include <Message.h>
|
||||
#include <NodeInfo.h>
|
||||
#include <PopUpMenu.h>
|
||||
#include <MenuItem.h>
|
||||
#include <Roster.h>
|
||||
#include <String.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "DeskButton.h"
|
||||
|
||||
#define OPEN_REF 'opre'
|
||||
#define DO_ACTION 'doac'
|
||||
|
||||
extern char *app_signature;
|
||||
extern const char *kAppSignature;
|
||||
// from desklink.cpp
|
||||
|
||||
DeskButton::DeskButton(BRect frame, entry_ref *entry_ref, const char *name, BList &titles, BList &actions,
|
||||
uint32 resizeMask, uint32 flags)
|
||||
: BView(frame, name, resizeMask, flags),
|
||||
ref(*entry_ref),
|
||||
actionList(actions),
|
||||
titleList(titles)
|
||||
|
||||
DeskButton::DeskButton(BRect frame, entry_ref* ref, const char* name,
|
||||
BList& titles, BList& actions, uint32 resizeMask, uint32 flags)
|
||||
: BView(frame, name, resizeMask, flags),
|
||||
fRef(*ref),
|
||||
fActionList(actions),
|
||||
fTitleList(titles)
|
||||
{
|
||||
// Background Color
|
||||
SetViewColor(184,184,184);
|
||||
SetViewColor(184, 184, 184);
|
||||
|
||||
//add dragger
|
||||
BRect rect(Bounds());
|
||||
rect.left = rect.right-7.0;
|
||||
rect.top = rect.bottom-7.0;
|
||||
rect.left = rect.right - 7.0;
|
||||
rect.top = rect.bottom - 7.0;
|
||||
BDragger *dragger = new BDragger(rect, this, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||
AddChild(dragger);
|
||||
dragger->SetViewColor(B_TRANSPARENT_32_BIT);
|
||||
|
||||
segments = new BBitmap(BRect(0,0,15,15), B_CMAP8);
|
||||
BNodeInfo::GetTrackerIcon(&ref, segments, B_MINI_ICON);
|
||||
fSegments = new BBitmap(BRect(0,0,15,15), B_CMAP8);
|
||||
BNodeInfo::GetTrackerIcon(&fRef, fSegments, B_MINI_ICON);
|
||||
}
|
||||
|
||||
|
||||
DeskButton::DeskButton(BMessage *message)
|
||||
: BView(message)
|
||||
{
|
||||
message->FindRef("ref", &ref);
|
||||
message->FindRef("ref", &fRef);
|
||||
|
||||
BString title, action;
|
||||
int32 index = 0;
|
||||
while(message->FindString("title", index, &title)==B_OK
|
||||
&& message->FindString("action", index, &action)==B_OK) {
|
||||
titleList.AddItem(new BString(title));
|
||||
actionList.AddItem(new BString(action));
|
||||
fTitleList.AddItem(new BString(title));
|
||||
fActionList.AddItem(new BString(action));
|
||||
index++;
|
||||
}
|
||||
|
||||
segments = new BBitmap(BRect(0,0,15,15), B_CMAP8);
|
||||
BNodeInfo::GetTrackerIcon(&ref, segments, B_MINI_ICON);
|
||||
fSegments = new BBitmap(BRect(0,0,15,15), B_CMAP8);
|
||||
BNodeInfo::GetTrackerIcon(&fRef, fSegments, B_MINI_ICON);
|
||||
}
|
||||
|
||||
|
||||
DeskButton::~DeskButton()
|
||||
{
|
||||
delete segments;
|
||||
delete fSegments;
|
||||
}
|
||||
|
||||
|
||||
@ -85,6 +82,7 @@ DeskButton::Instantiate(BMessage *data)
|
||||
{
|
||||
if (!validate_instantiation(data, "DeskButton"))
|
||||
return NULL;
|
||||
|
||||
return new DeskButton(data);
|
||||
}
|
||||
|
||||
@ -94,19 +92,19 @@ DeskButton::Archive(BMessage *data, bool deep) const
|
||||
{
|
||||
BView::Archive(data, deep);
|
||||
|
||||
data->AddRef("ref", &ref);
|
||||
data->AddRef("ref", &fRef);
|
||||
|
||||
for(int32 i=0; i<titleList.CountItems() &&
|
||||
i<actionList.CountItems(); i++) {
|
||||
data->AddString("title", *(BString*)titleList.ItemAt(i));
|
||||
data->AddString("action", *(BString*)actionList.ItemAt(i));
|
||||
for (int32 i = 0; i < fTitleList.CountItems()
|
||||
&& i < fActionList.CountItems(); i++) {
|
||||
data->AddString("title", *(BString*)fTitleList.ItemAt(i));
|
||||
data->AddString("action", *(BString*)fActionList.ItemAt(i));
|
||||
}
|
||||
|
||||
data->AddString("add_on", app_signature);
|
||||
data->AddString("add_on", kAppSignature);
|
||||
return B_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
DeskButton::MessageReceived(BMessage *message)
|
||||
{
|
||||
@ -114,15 +112,15 @@ DeskButton::MessageReceived(BMessage *message)
|
||||
case B_ABOUT_REQUESTED:
|
||||
(new BAlert("About Desklink", "Desklink (Replicant)\n"
|
||||
" Brought to you by Jérôme DUVAL.\n\n"
|
||||
"OpenBeOS, 2003","OK"))->Go();
|
||||
"Copyright " B_UTF8_COPYRIGHT "2003-2006, Haiku","OK"))->Go();
|
||||
break;
|
||||
case OPEN_REF:
|
||||
be_roster->Launch(&ref);
|
||||
be_roster->Launch(&fRef);
|
||||
break;
|
||||
case DO_ACTION:
|
||||
{
|
||||
BString action;
|
||||
if(message->FindString("action", &action)==B_OK) {
|
||||
if (message->FindString("action", &action) == B_OK) {
|
||||
action += " &";
|
||||
system(action.String());
|
||||
}
|
||||
@ -139,33 +137,34 @@ void
|
||||
DeskButton::Draw(BRect rect)
|
||||
{
|
||||
BView::Draw(rect);
|
||||
|
||||
|
||||
SetDrawingMode(B_OP_OVER);
|
||||
DrawBitmap(segments);
|
||||
DrawBitmap(fSegments);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DeskButton::MouseDown(BPoint point)
|
||||
{
|
||||
uint32 mouseButtons;
|
||||
BPoint where;
|
||||
GetMouse(&where, &mouseButtons, true);
|
||||
|
||||
where = ConvertToScreen(point);
|
||||
|
||||
uint32 mouseButtons = 0;
|
||||
if (Window()->CurrentMessage() != NULL)
|
||||
mouseButtons = Window()->CurrentMessage()->FindInt32("buttons");
|
||||
|
||||
BPoint where = ConvertToScreen(point);
|
||||
|
||||
if (mouseButtons & B_SECONDARY_MOUSE_BUTTON) {
|
||||
BString label = "Open ";
|
||||
label += ref.name;
|
||||
label += fRef.name;
|
||||
BPopUpMenu *menu = new BPopUpMenu("", false, false);
|
||||
menu->SetFont(be_plain_font);
|
||||
menu->AddItem(new BMenuItem(label.String(), new BMessage(OPEN_REF)));
|
||||
if(titleList.CountItems()>0 && actionList.CountItems()>0) {
|
||||
if (fTitleList.CountItems() > 0 && fActionList.CountItems() > 0) {
|
||||
menu->AddSeparatorItem();
|
||||
for(int32 i=0; i<titleList.CountItems() && i<actionList.CountItems(); i++) {
|
||||
for (int32 i = 0; i < fTitleList.CountItems()
|
||||
&& i < fActionList.CountItems(); i++) {
|
||||
BMessage *message = new BMessage(DO_ACTION);
|
||||
message->AddString("action", *(BString*)actionList.ItemAt(i));
|
||||
menu->AddItem(new BMenuItem(((BString*)titleList.ItemAt(i))->String(), message));
|
||||
message->AddString("action", *(BString*)fActionList.ItemAt(i));
|
||||
menu->AddItem(new BMenuItem(((BString*)fTitleList.ItemAt(i))->String(), message));
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,6 +172,6 @@ DeskButton::MouseDown(BPoint point)
|
||||
menu->Go(where, true, true, BRect(where - BPoint(4, 4),
|
||||
where + BPoint(4, 4)));
|
||||
} else if (mouseButtons & B_PRIMARY_MOUSE_BUTTON) {
|
||||
be_roster->Launch(&ref);
|
||||
be_roster->Launch(&fRef);
|
||||
}
|
||||
}
|
||||
|
@ -1,50 +1,40 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// Program: desklink
|
||||
// Author: Jérôme DUVAL
|
||||
// Description: VolumeControl and link items in Deskbar
|
||||
// Created : October 20, 2003
|
||||
// Modified by: Jérome Duval
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
#ifndef DESKBUTTON_H
|
||||
#define DESKBUTTON_H
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Jérôme Duval
|
||||
*/
|
||||
#ifndef DESK_BUTTON_H
|
||||
#define DESK_BUTTON_H
|
||||
|
||||
|
||||
#include <View.h>
|
||||
#include <List.h>
|
||||
#include <Entry.h>
|
||||
|
||||
|
||||
class DeskButton : public BView {
|
||||
public:
|
||||
DeskButton(BRect frame, entry_ref *ref, const char *name, BList &titleList, BList &actionList,
|
||||
uint32 resizeMask = B_FOLLOW_ALL,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||
|
||||
DeskButton(BMessage *);
|
||||
// BMessage * based constructor needed to support archiving
|
||||
virtual ~DeskButton();
|
||||
|
||||
// archiving overrides
|
||||
static DeskButton *Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
public:
|
||||
DeskButton(BRect frame, entry_ref* ref, const char* name, BList& titleList,
|
||||
BList& actionList, uint32 resizeMask = B_FOLLOW_ALL,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||
DeskButton(BMessage* archive);
|
||||
virtual ~DeskButton();
|
||||
|
||||
// misc BView overrides
|
||||
virtual void MouseDown(BPoint);
|
||||
|
||||
virtual void Draw(BRect );
|
||||
// archiving overrides
|
||||
static DeskButton* Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
virtual void MessageReceived(BMessage *);
|
||||
private:
|
||||
BBitmap * segments;
|
||||
entry_ref ref;
|
||||
BList actionList, titleList;
|
||||
// misc BView overrides
|
||||
virtual void MouseDown(BPoint);
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
BBitmap* fSegments;
|
||||
entry_ref fRef;
|
||||
BList fActionList, fTitleList;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif // DESK_BUTTON_H
|
||||
|
@ -1,20 +1,18 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// Program: desklink
|
||||
// Author: Jérôme DUVAL
|
||||
// Description: VolumeControl and link items in Deskbar
|
||||
// Created : October 20, 2003
|
||||
// Modified by: Jérome Duval
|
||||
// Modified by: François Revol, 10/31/2003
|
||||
// Modified by: Marcus Overhagen, 15/08/2004
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Jérôme Duval
|
||||
* François Revol
|
||||
* Marcus Overhagen
|
||||
*/
|
||||
|
||||
//! VolumeControl and link items in Deskbar
|
||||
|
||||
#include "VolumeSlider.h"
|
||||
#include "DeskButton.h"
|
||||
#include "iconfile.h"
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Application.h>
|
||||
@ -22,8 +20,8 @@
|
||||
#include <Debug.h>
|
||||
#include <Deskbar.h>
|
||||
#include <Dragger.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <File.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <List.h>
|
||||
#include <MenuItem.h>
|
||||
#include <Message.h>
|
||||
@ -32,11 +30,9 @@
|
||||
#include <Roster.h>
|
||||
#include <String.h>
|
||||
#include <View.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
#include "VolumeSlider.h"
|
||||
#include "DeskButton.h"
|
||||
#include "iconfile.h"
|
||||
|
||||
#define MEDIA_SETTINGS 'mese'
|
||||
#define SOUND_SETTINGS 'sose'
|
||||
@ -44,13 +40,14 @@
|
||||
#define TOGGLE_DONT_BEEP 'tdbp'
|
||||
#define SET_VOLUME_WHICH 'svwh'
|
||||
|
||||
#define VOLUME_CTL_NAME "MediaReplicant" /* R5 name needed, Media prefs manel removes by name */
|
||||
#define VOLUME_CTL_NAME "MediaReplicant"
|
||||
/* R5 name needed, Media prefs manel removes by name */
|
||||
|
||||
#define SETTINGS_FILE "x-vnd.OBOS.DeskbarVolumeControlSettings"
|
||||
|
||||
const char *app_signature = "application/x-vnd.be.desklink";
|
||||
// the application signature used by the replicant to find the supporting
|
||||
// code
|
||||
const char *kAppSignature = "application/x-vnd.Haiku-desklink";
|
||||
// the application signature used by the replicant to find the
|
||||
// supporting code
|
||||
|
||||
class _EXPORT MediaReplicant;
|
||||
// the dragger part has to be exported
|
||||
@ -60,7 +57,6 @@ public:
|
||||
MediaReplicant(BRect frame, const char *name,
|
||||
uint32 resizeMask = B_FOLLOW_ALL,
|
||||
uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|
||||
|
||||
MediaReplicant(BMessage *);
|
||||
// BMessage * based constructor needed to support archiving
|
||||
virtual ~MediaReplicant();
|
||||
@ -69,23 +65,24 @@ public:
|
||||
static MediaReplicant *Instantiate(BMessage *data);
|
||||
virtual status_t Archive(BMessage *data, bool deep = true) const;
|
||||
|
||||
|
||||
// misc BView overrides
|
||||
virtual void MouseDown(BPoint);
|
||||
virtual void MouseUp(BPoint);
|
||||
|
||||
virtual void Draw(BRect );
|
||||
virtual void Draw(BRect updateRect);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
virtual void MessageReceived(BMessage *);
|
||||
private:
|
||||
status_t LaunchByPath(const char *path);
|
||||
status_t LaunchBySig(const char *sig);
|
||||
void LoadSettings();
|
||||
void SaveSettings();
|
||||
BBitmap * segments;
|
||||
VolumeSlider *volumeSlider;
|
||||
bool confDontBeep; /* don't beep on volume change */
|
||||
int32 confVolumeWhich; /* which volume parameter to act on (Mixer/Phys.Output) */
|
||||
|
||||
BBitmap* fSegments;
|
||||
VolumeSlider* fVolumeSlider;
|
||||
bool fDontBeep;
|
||||
/* don't beep on volume change */
|
||||
int32 fVolumeWhich;
|
||||
/* which volume parameter to act on (Mixer/Phys.Output) */
|
||||
};
|
||||
|
||||
//
|
||||
@ -102,12 +99,13 @@ instantiate_deskbar_item()
|
||||
|
||||
|
||||
MediaReplicant::MediaReplicant(BRect frame, const char *name,
|
||||
uint32 resizeMask, uint32 flags)
|
||||
: BView(frame, name, resizeMask, flags)
|
||||
uint32 resizeMask, uint32 flags)
|
||||
: BView(frame, name, resizeMask, flags),
|
||||
fVolumeSlider(NULL)
|
||||
{
|
||||
// Background Bitmap
|
||||
segments = new BBitmap(BRect(0, 0, kSpeakerWidth - 1, kSpeakerHeight - 1), B_CMAP8);
|
||||
segments->SetBits(kSpeakerBits, kSpeakerWidth*kSpeakerHeight, 0, B_CMAP8);
|
||||
fSegments = new BBitmap(BRect(0, 0, kSpeakerWidth - 1, kSpeakerHeight - 1), B_CMAP8);
|
||||
fSegments->SetBits(kSpeakerBits, kSpeakerWidth*kSpeakerHeight, 0, B_CMAP8);
|
||||
// Background Color
|
||||
SetViewColor(184,184,184);
|
||||
|
||||
@ -123,29 +121,29 @@ MediaReplicant::MediaReplicant(BRect frame, const char *name,
|
||||
|
||||
|
||||
MediaReplicant::MediaReplicant(BMessage *message)
|
||||
: BView(message),
|
||||
volumeSlider(NULL)
|
||||
: BView(message),
|
||||
fVolumeSlider(NULL)
|
||||
{
|
||||
// Background Bitmap
|
||||
segments = new BBitmap(BRect(0, 0, 16 - 1, 16 - 1), B_CMAP8);
|
||||
segments->SetBits(kSpeakerBits, 16*16, 0, B_CMAP8);
|
||||
fSegments = new BBitmap(BRect(0, 0, 16 - 1, 16 - 1), B_CMAP8);
|
||||
fSegments->SetBits(kSpeakerBits, 16*16, 0, B_CMAP8);
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
|
||||
MediaReplicant::~MediaReplicant()
|
||||
{
|
||||
delete segments;
|
||||
delete fSegments;
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
// archiving overrides
|
||||
MediaReplicant *
|
||||
MediaReplicant::Instantiate(BMessage *data)
|
||||
{
|
||||
if (!validate_instantiation(data, VOLUME_CTL_NAME))
|
||||
return NULL;
|
||||
|
||||
return new MediaReplicant(data);
|
||||
}
|
||||
|
||||
@ -153,10 +151,11 @@ MediaReplicant::Instantiate(BMessage *data)
|
||||
status_t
|
||||
MediaReplicant::Archive(BMessage *data, bool deep) const
|
||||
{
|
||||
BView::Archive(data, deep);
|
||||
status_t status = BView::Archive(data, deep);
|
||||
if (status < B_OK)
|
||||
return status;
|
||||
|
||||
data->AddString("add_on", app_signature);
|
||||
return B_NO_ERROR;
|
||||
return data->AddString("add_on", kAppSignature);
|
||||
}
|
||||
|
||||
|
||||
@ -167,43 +166,40 @@ MediaReplicant::MessageReceived(BMessage *message)
|
||||
case B_ABOUT_REQUESTED:
|
||||
(new BAlert("About Volume Control", "Volume Control (Replicant)\n"
|
||||
" Brought to you by Jérôme DUVAL.\n\n"
|
||||
"OpenBeOS, 2003","OK"))->Go();
|
||||
"Copyright " B_UTF8_COPYRIGHT "2003-2006, Haiku","OK"))->Go();
|
||||
break;
|
||||
case OPEN_MEDIA_PLAYER:
|
||||
// launch the media player app
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Haiku.MediaPlayer"))
|
||||
break;
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Be.MediaPlayer"))
|
||||
break;
|
||||
if (B_OK == LaunchByPath("/boot/beos/apps/MediaPlayer"))
|
||||
if (LaunchBySig("application/x-vnd.Haiku.MediaPlayer") == B_OK
|
||||
|| LaunchBySig("application/x-vnd.Be.MediaPlayer") == B_OK
|
||||
|| LaunchByPath("/boot/beos/apps/MediaPlayer") == B_OK)
|
||||
break;
|
||||
|
||||
(new BAlert("desklink", "Couldn't launch MediaPlayer", "OK"))->Go();
|
||||
break;
|
||||
case MEDIA_SETTINGS:
|
||||
// launch the media prefs app
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Haiku.MediaPrefs"))
|
||||
break;
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Be.MediaPrefs"))
|
||||
break;
|
||||
if (B_OK == LaunchByPath("/boot/home/config/be/Preferences/Media"))
|
||||
if (LaunchBySig("application/x-vnd.Haiku-Media") == B_OK
|
||||
|| LaunchBySig("application/x-vnd.Be.MediaPrefs") == B_OK
|
||||
|| LaunchByPath("/boot/home/config/be/Preferences/Media") == B_OK)
|
||||
break;
|
||||
|
||||
(new BAlert("desklink", "Couldn't launch Media Preferences", "OK"))->Go();
|
||||
break;
|
||||
case SOUND_SETTINGS:
|
||||
// launch the sounds prefs app
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Haiku.SoundsPrefs"))
|
||||
break;
|
||||
if (B_OK == LaunchBySig("application/x-vnd.Be.SoundsPrefs"))
|
||||
break;
|
||||
if (B_OK == LaunchByPath("/boot/home/config/be/Preferences/Sounds"))
|
||||
if (LaunchBySig("application/x-vnd.Haiku-Sounds") == B_OK
|
||||
|| LaunchBySig("application/x-vnd.Be.SoundsPrefs") == B_OK
|
||||
|| LaunchByPath("/boot/home/config/be/Preferences/Sounds") == B_OK)
|
||||
break;
|
||||
|
||||
(new BAlert("desklink", "Couldn't launch Sounds Preferences", "OK"))->Go();
|
||||
break;
|
||||
case TOGGLE_DONT_BEEP:
|
||||
confDontBeep = !confDontBeep;
|
||||
fDontBeep = !fDontBeep;
|
||||
break;
|
||||
case SET_VOLUME_WHICH:
|
||||
message->FindInt32("volwhich", &confVolumeWhich);
|
||||
message->FindInt32("volwhich", &fVolumeWhich);
|
||||
break;
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
@ -258,7 +254,7 @@ MediaReplicant::Draw(BRect rect)
|
||||
BView::Draw(rect);
|
||||
|
||||
SetDrawingMode(B_OP_OVER);
|
||||
DrawBitmap(segments);
|
||||
DrawBitmap(fSegments);
|
||||
}
|
||||
|
||||
|
||||
@ -281,20 +277,20 @@ MediaReplicant::MouseDown(BPoint point)
|
||||
menu->AddSeparatorItem();
|
||||
BMenuItem *tmpItem = new BMenuItem("Don't beep", new BMessage(TOGGLE_DONT_BEEP));
|
||||
menu->AddItem(tmpItem);
|
||||
tmpItem->SetMarked(confDontBeep);
|
||||
tmpItem->SetMarked(fDontBeep);
|
||||
BMenu *volMenu = new BMenu("Act On");
|
||||
volMenu->SetFont(be_plain_font);
|
||||
BMessage *msg;
|
||||
msg = new BMessage(SET_VOLUME_WHICH);
|
||||
msg->AddInt32("volwhich", VOLUME_USE_MIXER);
|
||||
tmpItem = new BMenuItem("System Mixer", msg);
|
||||
tmpItem->SetMarked(confVolumeWhich == VOLUME_USE_MIXER);
|
||||
tmpItem->SetMarked(fVolumeWhich == VOLUME_USE_MIXER);
|
||||
volMenu->AddItem(tmpItem);
|
||||
msg = new BMessage(SET_VOLUME_WHICH);
|
||||
msg->AddInt32("volwhich", VOLUME_USE_PHYS_OUTPUT);
|
||||
tmpItem = new BMenuItem("Physical Output", msg);
|
||||
volMenu->AddItem(tmpItem);
|
||||
tmpItem->SetMarked(confVolumeWhich == VOLUME_USE_PHYS_OUTPUT);
|
||||
tmpItem->SetMarked(fVolumeWhich == VOLUME_USE_PHYS_OUTPUT);
|
||||
menu->AddItem(volMenu);
|
||||
|
||||
menu->SetTargetForItems(this);
|
||||
@ -303,8 +299,9 @@ MediaReplicant::MouseDown(BPoint point)
|
||||
where + BPoint(4, 4)));
|
||||
} else if (mouseButtons & B_PRIMARY_MOUSE_BUTTON) {
|
||||
// Show VolumeSlider
|
||||
volumeSlider = new VolumeSlider(BRect(where.x,where.y,where.x+207,where.y+19), confDontBeep, confVolumeWhich);
|
||||
volumeSlider->Show();
|
||||
fVolumeSlider = new VolumeSlider(BRect(where.x, where.y, where.x + 207, where.y + 19),
|
||||
fDontBeep, fVolumeWhich);
|
||||
fVolumeSlider->Show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,10 +312,13 @@ MediaReplicant::MouseUp(BPoint point)
|
||||
/* don't Quit() ! thanks for FFM users */
|
||||
}
|
||||
|
||||
void MediaReplicant::LoadSettings()
|
||||
|
||||
void
|
||||
MediaReplicant::LoadSettings()
|
||||
{
|
||||
confDontBeep = false;
|
||||
confVolumeWhich = VOLUME_USE_MIXER;
|
||||
fDontBeep = false;
|
||||
fVolumeWhich = VOLUME_USE_MIXER;
|
||||
|
||||
BPath p;
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &p, false) < B_OK)
|
||||
return;
|
||||
@ -329,11 +329,13 @@ void MediaReplicant::LoadSettings()
|
||||
BMessage msg;
|
||||
if (msg.Unflatten(&settings) < B_OK)
|
||||
return;
|
||||
msg.FindInt32("volwhich", &confVolumeWhich);
|
||||
msg.FindBool("dontbeep", &confDontBeep);
|
||||
msg.FindInt32("volwhich", &fVolumeWhich);
|
||||
msg.FindBool("dontbeep", &fDontBeep);
|
||||
}
|
||||
|
||||
void MediaReplicant::SaveSettings()
|
||||
|
||||
void
|
||||
MediaReplicant::SaveSettings()
|
||||
{
|
||||
BPath p;
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &p, false) < B_OK)
|
||||
@ -343,8 +345,8 @@ void MediaReplicant::SaveSettings()
|
||||
if (settings.InitCheck() < B_OK)
|
||||
return;
|
||||
BMessage msg('CNFG');
|
||||
msg.AddInt32("volwhich", confVolumeWhich);
|
||||
msg.AddBool("dontbeep", confDontBeep);
|
||||
msg.AddInt32("volwhich", fVolumeWhich);
|
||||
msg.AddBool("dontbeep", fDontBeep);
|
||||
ssize_t len=0;
|
||||
if (msg.Flatten(&settings, &len) < B_OK)
|
||||
return;
|
||||
@ -354,13 +356,12 @@ void MediaReplicant::SaveSettings()
|
||||
int
|
||||
main(int, char **argv)
|
||||
{
|
||||
BApplication app(app_signature);
|
||||
BApplication app(kAppSignature);
|
||||
bool atLeastOnePath = false;
|
||||
BList titleList;
|
||||
BList actionList;
|
||||
|
||||
for(int32 i=1; argv[i]!=NULL; i++) {
|
||||
|
||||
for (int32 i = 1; argv[i]!=NULL; i++) {
|
||||
if (strcmp(argv[i], "--list") == 0) {
|
||||
BDeskbar db;
|
||||
int32 i, found = 0, count;
|
||||
@ -391,11 +392,11 @@ main(int, char **argv)
|
||||
printf("removed %ld items.\n", found);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (strncmp(argv[i], "cmd=", 4) == 0) {
|
||||
BString *title = new BString(argv[i] + 4);
|
||||
int32 index = title->FindFirst(':');
|
||||
if(index<=0) {
|
||||
if (index <= 0) {
|
||||
printf("desklink: usage: cmd=title:action\n");
|
||||
} else {
|
||||
title->Truncate(index);
|
||||
@ -406,30 +407,28 @@ main(int, char **argv)
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
atLeastOnePath = true;
|
||||
|
||||
|
||||
BEntry entry(argv[i], true);
|
||||
if(!entry.Exists()) {
|
||||
printf("desklink: cannot find '%s'\n", argv[i]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
entry_ref ref;
|
||||
entry.GetRef(&ref);
|
||||
|
||||
status_t err;
|
||||
err = BDeskbar().AddItem(new DeskButton(BRect(0, 0, 15, 15), &ref, "DeskButton",
|
||||
titleList, actionList));
|
||||
|
||||
if(err!=B_OK) {
|
||||
|
||||
status_t err = BDeskbar().AddItem(new DeskButton(BRect(0, 0, 15, 15),
|
||||
&ref, "DeskButton", titleList, actionList));
|
||||
if (err != B_OK) {
|
||||
printf("desklink: Deskbar refuses link to '%s': %s\n", argv[i], strerror(err));
|
||||
}
|
||||
|
||||
|
||||
titleList.MakeEmpty();
|
||||
actionList.MakeEmpty();
|
||||
}
|
||||
|
||||
|
||||
if (!atLeastOnePath) {
|
||||
// print a simple usage string
|
||||
printf( "usage: desklink { [ --list|--remove|[cmd=title:action ... ] path ] } ...\n"
|
||||
@ -437,6 +436,6 @@ main(int, char **argv)
|
||||
"--remove: delete all desklink addons.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,13 +1,21 @@
|
||||
|
||||
resource app_signature "application/x-vnd.be.desklink";
|
||||
resource app_signature "application/x-vnd.Haiku-desklink";
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Haiku-Desklink",
|
||||
long_info = "Haiku version of Desklink"
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "desklink",
|
||||
long_info = "desklink ©2003-2006 Haiku"
|
||||
};
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH|B_ARGV_ONLY|B_BACKGROUND_APP ;
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH | B_ARGV_ONLY | B_BACKGROUND_APP ;
|
||||
|
@ -1,8 +1,26 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Backgrounds";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Backgrounds",
|
||||
long_info = "Backgrounds ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFF"
|
||||
$"FFFF000000F8F8000000FFFFFFFFFFFFFFFF001D1D1D1D1D00FFFFFFFFFFFFFF"
|
||||
@ -37,8 +55,7 @@ resource large_icon
|
||||
$"FFFFFFFF0000000F0F0F0F0F0F0F0F0F0F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFF00000000FFFFFF"
|
||||
$"FF0000FFFFFFFFFF003F1D1D1D00FFFF"
|
||||
$"003FF80000FFFFFF00163F3F1600FFFF"
|
||||
@ -56,14 +73,3 @@ resource mini_icon
|
||||
$"FF002B2F00FFFF0F0F0F000D000F0F0F"
|
||||
$"FFFF00000E0F0F0F0F0F0F000F0F0FFF"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.haiku-backgrounds";
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Haiku-Backgrounds",
|
||||
long_info = "Haiku version of Backgrounds"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
resource app_signature "application/x-vnd.haiku-translations";
|
||||
resource app_signature "application/x-vnd.Haiku-Translations";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
@ -12,10 +12,10 @@ resource app_version {
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 1,
|
||||
internal = 0,
|
||||
|
||||
short_info = "DataTranslations",
|
||||
long_info = "DataTranslations, Copyright 2002-2006 Haiku Inc."
|
||||
long_info = "DataTranslations ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon array {
|
||||
|
@ -23,9 +23,10 @@ resource app_version {
|
||||
internal = 1,
|
||||
|
||||
short_info = "FileTypes",
|
||||
long_info = "FileTypes, Copyright 2006 Haiku Inc."
|
||||
long_info = "FileTypes ©2006 Haiku Inc."
|
||||
};
|
||||
|
||||
|
||||
resource mini_icon array {
|
||||
$"FFFFFFFFFFFFFFFF020200FFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF04151E1500FFFFFFFF"
|
||||
|
@ -1,4 +1,23 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Fonts";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Fonts",
|
||||
long_info = "Fonts ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource large_icon
|
||||
@ -56,14 +75,3 @@ resource mini_icon
|
||||
$"FF002B2F00FFFF00B28C21000F0E0FFF"
|
||||
$"FFFF00000E0F0F0F0000000E0F0FFFFF"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Fonts";
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Haiku-Fonts",
|
||||
long_info = "Haiku version of Fonts"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
|
@ -1,49 +1,41 @@
|
||||
/*
|
||||
* Copyright 2004-2006, the Haiku project. All rights reserved.
|
||||
* Distributed under the terms of the Haiku License.
|
||||
* Copyright 2004-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* mccall@digitalparadise.co.uk
|
||||
* Jérôme Duval
|
||||
* Marcus Overhagen
|
||||
*/
|
||||
#include <Alert.h>
|
||||
* Andrew McCall, mccall@digitalparadise.co.uk
|
||||
* Jérôme Duval
|
||||
* Marcus Overhagen
|
||||
*/
|
||||
|
||||
|
||||
#include "Keyboard.h"
|
||||
#include "KeyboardWindow.h"
|
||||
#include "KeyboardMessages.h"
|
||||
|
||||
#include <Alert.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
KeyboardApplication myApplication;
|
||||
|
||||
myApplication.Run();
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
KeyboardApplication::KeyboardApplication()
|
||||
: BApplication("application/x-vnd.Haiku-KeyboardPrefs")
|
||||
: BApplication("application/x-vnd.Haiku-Keyboard")
|
||||
{
|
||||
new KeyboardWindow();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
KeyboardApplication::MessageReceived(BMessage *message)
|
||||
KeyboardApplication::MessageReceived(BMessage* message)
|
||||
{
|
||||
switch(message->what) {
|
||||
case ERROR_DETECTED: {
|
||||
BAlert *errorAlert = new BAlert("Error",
|
||||
"Something has gone wrong!",
|
||||
"OK",NULL,NULL,
|
||||
B_WIDTH_AS_USUAL,
|
||||
B_OFFSET_SPACING,
|
||||
B_WARNING_ALERT);
|
||||
errorAlert->Go();
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
}
|
||||
case ERROR_DETECTED:
|
||||
{
|
||||
BAlert *errorAlert = new BAlert("Error", "Something has gone wrong!",
|
||||
"OK", NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
||||
B_WARNING_ALERT);
|
||||
errorAlert->Go();
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
BApplication::MessageReceived(message);
|
||||
break;
|
||||
@ -52,7 +44,21 @@ KeyboardApplication::MessageReceived(BMessage *message)
|
||||
|
||||
|
||||
void
|
||||
KeyboardApplication::AboutRequested(void)
|
||||
KeyboardApplication::AboutRequested()
|
||||
{
|
||||
(new BAlert("about", "Written by Andrew Edward McCall", "OK"))->Go();
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
KeyboardApplication app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,24 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-KeyboardPrefs";
|
||||
resource app_signature "application/x-vnd.Haiku-Keyboard";
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Keyboard",
|
||||
long_info = "Haiku Keyboard Preferences"
|
||||
};
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Keyboard",
|
||||
long_info = "Keyboard ©2004-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFF001B1C1B0000FFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFF001B151C3F1B1C0000FFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -44,8 +53,7 @@ resource large_icon
|
||||
$"FFFFFFFFFFFFFF0000000E0F0F0F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFF0000FFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFF001B1C0000FFFFFFFFFF"
|
||||
$"FFFFFFFFFF001B1C1B1C1C0000FFFFFF"
|
||||
@ -66,8 +74,7 @@ resource mini_icon
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource(601, "key_bmap") #'bits' array
|
||||
{
|
||||
resource(601, "key_bmap") #'bits' array {
|
||||
$"424D14050000000000003A000000280000001100000012000000010018000000"
|
||||
$"0000DA040000130B0000130B00000000F0420000F042FFFFFFFFD8D8D8D8D8D8"
|
||||
$"D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8000000000000D8D8D8D8D8"
|
||||
@ -111,8 +118,7 @@ resource(601, "key_bmap") #'bits' array
|
||||
$"91FF000015430000004000001543000090419292"
|
||||
};
|
||||
|
||||
resource(602, "clock_bmap") #'bits' array
|
||||
{
|
||||
resource(602, "clock_bmap") #'bits' array {
|
||||
$"424DEB030000000000003A000000280000000F0000000F000000010018000000"
|
||||
$"0000B1030000130B0000130B00000800000008000000FFFFFFFFD8D8D8D8D8D8"
|
||||
$"D8D8D8D8D8D8D8D8D8000000000000000000000000000000D8D8D8D8D8D8D8D8"
|
||||
|
@ -1,6 +1,28 @@
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource app_signature "application/x-vnd.Haiku-Keymap";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Keymap",
|
||||
long_info = "Keymap ©2004-2006 Haiku"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource file_types message {
|
||||
"types" = "application/x-vnd.Be-kmap"
|
||||
};
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003F0000FFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003F173F170000FFFFFFFFFFFFFFFFFFFF"
|
||||
@ -35,8 +57,26 @@ resource large_icon
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(0, "BEOS:L:application/x-vnd.be-kmap") #'ICON' array
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFF0000FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF0017170000FFFFFFFF"
|
||||
$"FFFFFFFFFFFF00170B1717180000FFFF"
|
||||
$"FFFFFFFFFF00170B170B170B17170000"
|
||||
$"FFFFFFFF00170B170B170B17170A0B00"
|
||||
$"FFFFFF00170B170B170B17170A0A000F"
|
||||
$"FFFF00170B170B170B17170B0A000F0F"
|
||||
$"FF00170B170B170B17170B0A000F0FFF"
|
||||
$"001717180A180A18170A0B000F0FFFFF"
|
||||
$"00111117170B17170A0A000F0FFFFFFF"
|
||||
$"001111111117170A0A000F0FFFFFFFFF"
|
||||
$"FF00001111110A0B000F0FFFFFFFFFFF"
|
||||
$"FFFFFF0000110A000F0FFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF00000F0FFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(0, "BEOS:L:application/x-vnd.be-kmap") #'ICON' array {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF003F0000FFFFFFFFFFFFFFFFFF"
|
||||
@ -71,28 +111,7 @@ resource(0, "BEOS:L:application/x-vnd.be-kmap") #'ICON' array
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFF0000FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF0017170000FFFFFFFF"
|
||||
$"FFFFFFFFFFFF00170B1717180000FFFF"
|
||||
$"FFFFFFFFFF00170B170B170B17170000"
|
||||
$"FFFFFFFF00170B170B170B17170A0B00"
|
||||
$"FFFFFF00170B170B170B17170A0A000F"
|
||||
$"FFFF00170B170B170B17170B0A000F0F"
|
||||
$"FF00170B170B170B17170B0A000F0FFF"
|
||||
$"001717180A180A18170A0B000F0FFFFF"
|
||||
$"00111117170B17170A0A000F0FFFFFFF"
|
||||
$"001111111117170A0A000F0FFFFFFFFF"
|
||||
$"FF00001111110A0B000F0FFFFFFFFFFF"
|
||||
$"FFFFFF0000110A000F0FFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF00000F0FFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(0, "BEOS:M:application/x-vnd.be-kmap") #'MICN' array
|
||||
{
|
||||
resource(0, "BEOS:M:application/x-vnd.be-kmap") #'MICN' array {
|
||||
$"FFFFFFFFFFFFFFFFFFFF00FFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFF003F0000FFFFFF"
|
||||
$"FFFFFFFFFFFFFFFF003F1717170000FF"
|
||||
@ -110,19 +129,3 @@ resource(0, "BEOS:M:application/x-vnd.be-kmap") #'MICN' array
|
||||
$"FFFFFFFFAE0000000000AEFFFFFFFFFF"
|
||||
$"FFFFFFFFFFAE00AEFFAEFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource file_types message
|
||||
{
|
||||
"types" = "application/x-vnd.Be-kmap"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.haiku.Keymap";
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Haiku-Keymap",
|
||||
long_info = "Haiku version of Keymap"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
|
@ -1,36 +1,37 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2004, Haiku
|
||||
//
|
||||
// This software is part of the Haiku distribution and is covered
|
||||
// by the Haiku license.
|
||||
//
|
||||
//
|
||||
// File: KeymapApplication.cpp
|
||||
// Author: Sandor Vroemisse, Jérôme Duval
|
||||
// Description: Keymap Preferences
|
||||
// Created : July 12, 2004
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2004-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Sandor Vroemisse
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
|
||||
#include "KeymapApplication.h"
|
||||
|
||||
|
||||
KeymapApplication::KeymapApplication()
|
||||
: BApplication( APP_SIGNATURE )
|
||||
: BApplication("application/x-vnd.Haiku-Keymap")
|
||||
{
|
||||
// create the window
|
||||
fWindow = new KeymapWindow();
|
||||
fWindow->Show();
|
||||
}
|
||||
|
||||
void KeymapApplication::MessageReceived( BMessage * message )
|
||||
|
||||
void
|
||||
KeymapApplication::MessageReceived(BMessage* message)
|
||||
{
|
||||
BApplication::MessageReceived( message );
|
||||
BApplication::MessageReceived(message);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
new KeymapApplication;
|
||||
be_app->Run();
|
||||
|
@ -1,40 +1,30 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2004, Haiku
|
||||
//
|
||||
// This software is part of the Haiku distribution and is covered
|
||||
// by the Haiku license.
|
||||
//
|
||||
//
|
||||
// File: KeymapApplication.h
|
||||
// Author: Sandor Vroemisse, Jérôme Duval
|
||||
// Description: Keymap Preferences
|
||||
// Created : July 12, 2004
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
|
||||
/*
|
||||
* Copyright 2004-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Sandor Vroemisse
|
||||
* Jérôme Duval
|
||||
*/
|
||||
#ifndef KEYMAP_APPLICATION_H
|
||||
#define KEYMAP_APPLICATION_H
|
||||
|
||||
#include <Application.h>
|
||||
#include <Entry.h>
|
||||
|
||||
#include "KeymapWindow.h"
|
||||
|
||||
#define APP_SIGNATURE "application/x-vnd.haiku.Keymap"
|
||||
#include <Application.h>
|
||||
#include <Entry.h>
|
||||
|
||||
|
||||
class KeymapApplication : public BApplication {
|
||||
public:
|
||||
KeymapApplication();
|
||||
void MessageReceived(BMessage *message);
|
||||
|
||||
bool UseKeymap( BEntry *keymap );
|
||||
public:
|
||||
KeymapApplication();
|
||||
|
||||
protected:
|
||||
KeymapWindow *fWindow;
|
||||
|
||||
bool IsValidKeymap( BFile *inFile );
|
||||
int NotifyInputServer();
|
||||
void MessageReceived(BMessage* message);
|
||||
bool UseKeymap(BEntry* keymap);
|
||||
|
||||
private:
|
||||
KeymapWindow* fWindow;
|
||||
};
|
||||
|
||||
#endif // KEYMAP_APPLICATION_H
|
||||
|
@ -1,5 +1,9 @@
|
||||
resource app_version
|
||||
{
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Mail";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = 3,
|
||||
middle = 0,
|
||||
minor = 3,
|
||||
@ -10,12 +14,11 @@ resource app_version
|
||||
|
||||
internal = 3,
|
||||
|
||||
short_info = "E-mail Preferences 3.0.3",
|
||||
long_info = "E-mail Preferences 3.0.3 ©2005 Haiku"
|
||||
short_info = "E-mail",
|
||||
long_info = "E-mail ©2005-2006 Haiku"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -50,8 +53,7 @@ resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0F0F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF00FFFFFFFFFFFFFFFFFFFF"
|
||||
@ -71,7 +73,3 @@ resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
};
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.Be-mprf";
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"00000000";
|
||||
|
@ -9,15 +9,15 @@
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
class MailConfigApp : public BApplication
|
||||
{
|
||||
class MailConfigApp : public BApplication {
|
||||
public:
|
||||
MailConfigApp();
|
||||
~MailConfigApp();
|
||||
};
|
||||
|
||||
|
||||
MailConfigApp::MailConfigApp() : BApplication("application/x-vnd.Be-mprf")
|
||||
MailConfigApp::MailConfigApp()
|
||||
: BApplication("application/x-vnd.Haiku-Mail")
|
||||
{
|
||||
(new ConfigWindow())->Show();
|
||||
}
|
||||
@ -31,10 +31,12 @@ MailConfigApp::~MailConfigApp()
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int main(int argc,char **argv)
|
||||
int
|
||||
main(int argc,char **argv)
|
||||
{
|
||||
(new MailConfigApp())->Run();
|
||||
|
||||
delete be_app;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,32 +1,26 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: Media.cpp
|
||||
// Author: Sikosis, Jérôme Duval
|
||||
// Description: Media Preferences
|
||||
// Created : June 25, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Sikosis
|
||||
* Jérôme Duval
|
||||
*/
|
||||
|
||||
|
||||
// Includes -------------------------------------------------------------------------------------------------- //
|
||||
#include "Media.h"
|
||||
|
||||
#include <StorageKit.h>
|
||||
#include <Roster.h>
|
||||
#include <String.h>
|
||||
#include <stdio.h>
|
||||
#include "Media.h"
|
||||
|
||||
// Media -- constructor
|
||||
|
||||
Media::Media()
|
||||
: BApplication (APP_SIGNATURE)
|
||||
: BApplication("application/x-vnd.Haiku-Media")
|
||||
{
|
||||
BRect rect(32,64,637,442);
|
||||
|
||||
|
||||
BPath path;
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) {
|
||||
path.Append(SETTINGS_FILE);
|
||||
@ -35,19 +29,19 @@ Media::Media()
|
||||
char buffer[255];
|
||||
ssize_t size = 0;
|
||||
while ((size = file.Read(buffer, 255)) > 0) {
|
||||
int32 i=0;
|
||||
while(buffer[i]=='#') {
|
||||
while(i<size&&buffer[i]!='\n')
|
||||
int32 i = 0;
|
||||
while (buffer[i] == '#') {
|
||||
while (i < size && buffer[i] != '\n')
|
||||
i++;
|
||||
i++;
|
||||
}
|
||||
int32 a,b,c,d;
|
||||
int32 a, b, c, d;
|
||||
if (sscanf(&buffer[i], " rect = %li,%li,%li,%li", &a, &b, &c, &d) > 0) {
|
||||
if (c-a >= rect.IntegerWidth()) {
|
||||
if (c - a >= rect.IntegerWidth()) {
|
||||
rect.left = a;
|
||||
rect.right = c;
|
||||
}
|
||||
if (d-b >= rect.IntegerHeight()) {
|
||||
if (d - b >= rect.IntegerHeight()) {
|
||||
rect.top = b;
|
||||
rect.bottom = d;
|
||||
}
|
||||
@ -58,14 +52,14 @@ Media::Media()
|
||||
|
||||
fWindow = new MediaWindow(rect);
|
||||
fWindow->SetSizeLimits(605.0, 10000.0, 378.0, 10000.0);
|
||||
|
||||
be_roster->StartWatching(BMessenger(this));
|
||||
|
||||
be_roster->StartWatching(BMessenger(this));
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
||||
|
||||
Media::~Media()
|
||||
{
|
||||
be_roster->StopWatching(BMessenger(this));
|
||||
be_roster->StopWatching(BMessenger(this));
|
||||
}
|
||||
|
||||
|
||||
@ -78,28 +72,32 @@ Media::InitCheck()
|
||||
}
|
||||
|
||||
|
||||
// Media::MessageReceived -- handles incoming messages
|
||||
void Media::MessageReceived (BMessage *message)
|
||||
void
|
||||
Media::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch(message->what)
|
||||
{
|
||||
switch (message->what) {
|
||||
case B_SOME_APP_LAUNCHED:
|
||||
case B_SOME_APP_QUIT:
|
||||
fWindow->PostMessage(message);
|
||||
break;
|
||||
|
||||
default:
|
||||
BApplication::MessageReceived(message); // pass it along ...
|
||||
BApplication::MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// ---------------------------------------------------------------------------------------------------------- //
|
||||
|
||||
// Media Main
|
||||
int main(void)
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
Media theApp;
|
||||
if (theApp.InitCheck() == B_OK)
|
||||
theApp.Run();
|
||||
Media app;
|
||||
if (app.InitCheck() == B_OK)
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
// end ------------------------------------------------------------------------------------------------------ //
|
||||
|
||||
|
@ -1,39 +1,30 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: Media.h
|
||||
// Author: Sikosis, Jérôme Duval
|
||||
// Description: Media Preferences
|
||||
// Created : June 25, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Sikosis
|
||||
* Jérôme Duval
|
||||
*/
|
||||
#ifndef MEDIA_H
|
||||
#define MEDIA_H
|
||||
|
||||
|
||||
#ifndef __MEDIA_H__
|
||||
#define __MEDIA_H__
|
||||
|
||||
// Constants ------------------------------------------------------------------------------------------------- //
|
||||
const char *APP_SIGNATURE = "application/x-vnd.Haiku.MediaPrefs"; // Application Signature
|
||||
|
||||
#include <Application.h>
|
||||
#include "MediaWindow.h"
|
||||
|
||||
class Media : public BApplication
|
||||
{
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
class Media : public BApplication {
|
||||
public:
|
||||
Media();
|
||||
~Media();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
status_t InitCheck();
|
||||
|
||||
Media();
|
||||
virtual ~Media();
|
||||
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
status_t InitCheck();
|
||||
|
||||
private:
|
||||
MediaWindow *fWindow;
|
||||
|
||||
MediaWindow* fWindow;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // MEDIA_H
|
||||
|
@ -1,18 +1,26 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku.MediaPrefs";
|
||||
resource app_signature "application/x-vnd.Haiku-Media";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Media",
|
||||
long_info = "Haiku Media Preferences"
|
||||
long_info = "Media ©2003-2006 Haiku"
|
||||
};
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -47,8 +55,7 @@ resource large_icon
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFF00000E0F0F0F0F0F0F0F0F0F0FFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFF00FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF0000FFFF00FFFF00FFFFFF"
|
||||
|
@ -1,6 +1,80 @@
|
||||
|
||||
resource(128, "CTL") array
|
||||
{
|
||||
resource app_signature "application/x-vnd.Haiku-Menu";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Menu",
|
||||
long_info = "Menu ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B1C1C3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B00001C1B1C1C3F3F0000FFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF0017171C1C00001B1C1B1C3F3F0000FFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F3F17171C1C00001B1C1B1C3F3F0000FFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B3F3F17171C1C00001B1C1C1C3F3F0000FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B3F3F17171C1C00001B1C1B1C3F3F0000FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B00001C1B3F3F17171C1C1B1C1B1C1C1B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B00001C1C3F3F17171C1C1B001C1B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C007B7B000F1B1C3F3F17171C1C001B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B0000DA7B7B001C001C1B3F3F17171C1C1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B002B2BDA7B001C1C1B1C1B1C3F3F17171800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B002B2F2F00001C1C1B1C1B1C1C1B3F3F1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F002B2CEB2F001B00001C1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F002B2F2F001B1C1C1B00001C1B1C1C001B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF00002B2CEB2F0000001B1C1B1C1C1B1C1C1B1C1700FFFFFFFF"
|
||||
$"FFFF000000FFFF00002B2F2F001B1C1C00001B1C1B1C1C001B1C1700FFFFFFFF"
|
||||
$"FF007B7B7B00FF002B2CEB2F00001B1C1B1C00001C1B1C1C001B1800FFFFFFFF"
|
||||
$"007B7B7BDA00FF002B2F2F001B1C00001C1B1C1B1C1C1B1C1C1B1800FFFFFFFF"
|
||||
$"002B2CDA7B7B002B2CEB2F001B1C1C1B00001C1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FF002B2CDA7B2B2CEB2F000017171C1C1B1C00001C1B1C1B001C1700FFFFFFFF"
|
||||
$"FF002B2CDA7B2B2CEB2F00FF000017171A1B1C1C1B1C1C1B1C1B1800FFFFFFFF"
|
||||
$"FFFF002B2C2B2B2F2F00FFFFFFFF000017171A1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FFFF002B2C2B2B2F2F00FFFFFFFFFFFF000017171C1C1B1C001B1800FFFFFFFF"
|
||||
$"FFFFFF002B2CEB2F00FFFFFFFFFFFFFFFFFF000017171C1C1B1C1700FFFFFFFF"
|
||||
$"FFFFFF002B2CEB2F00FFFFFFFFFFFFFFFFFFFFFF000017171C1C1700FFFFFFFF"
|
||||
$"FFFFFFFF002B2F000E0F0F0F0F0F0F0F0E0FFFFFFFFF0000171718000F0EFFFF"
|
||||
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0E0F0FFFFFFFFFFFFF000017000F0F0F0E"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000E0F0F0F"
|
||||
};
|
||||
|
||||
resource mini_icon {
|
||||
$"FFFFFF000000FFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFF003F3F0000FFFFFFFFFFFFFFFF"
|
||||
$"FFFFFF003F1B3F3F0000FFFFFFFFFFFF"
|
||||
$"FFFFFF003F1B1C1B3F3F0000FFFFFFFF"
|
||||
$"FFFFFF003F1B00001C1B3F3F0000FFFF"
|
||||
$"FFFFFF003F1B1C1B001C1C1B1800FFFF"
|
||||
$"FFFFFF003F1B001C1B1C001C1700FFFF"
|
||||
$"FFFFFF003F007B001B1C1B1C1700FFFF"
|
||||
$"FFFFFF003F002F001B1C001B1800FFFF"
|
||||
$"FFFFFF00002F001B1C1B1C1C1700FFFF"
|
||||
$"FF00FF00002F001B1C1B001C1700FFFF"
|
||||
$"002B00002F0017171C1C1B1C1700FFFF"
|
||||
$"002B7B2CEB00000017171C1C1700FFFF"
|
||||
$"FF002B2F00FFFFFF000017171800FFFF"
|
||||
$"FF002B2F00FFFFFFFFFF000017000FFF"
|
||||
$"FFFF00000E0F0F0F0FFFFFFF00000E0F"
|
||||
};
|
||||
|
||||
resource(128, "CTL") array {
|
||||
$"424D760400000000000036000000280000001100000010000000010020000000"
|
||||
$"000040040000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -39,8 +113,7 @@ resource(128, "CTL") array
|
||||
$"77007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(129, "ALT") array
|
||||
{
|
||||
resource(129, "ALT") array {
|
||||
$"424D760400000000000036000000280000001100000010000000010020000000"
|
||||
$"000040040000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -79,8 +152,7 @@ resource(129, "ALT") array
|
||||
$"77007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(130, "SEP0") array
|
||||
{
|
||||
resource(130, "SEP0") array {
|
||||
$"424D361200000000000036000000280000004800000010000000010020000000"
|
||||
$"000000120000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -229,8 +301,7 @@ resource(130, "SEP0") array
|
||||
$"77007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(131, "SEP1") array
|
||||
{
|
||||
resource(131, "SEP1") array {
|
||||
$"424D361200000000000036000000280000004800000010000000010020000000"
|
||||
$"000000120000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -379,8 +450,7 @@ resource(131, "SEP1") array
|
||||
$"77007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(132, "SEP2") array
|
||||
{
|
||||
resource(132, "SEP2") array {
|
||||
$"424D361200000000000036000000280000004800000010000000010020000000"
|
||||
$"000000120000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -529,8 +599,7 @@ resource(132, "SEP2") array
|
||||
$"77007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(133, "CHECK") array
|
||||
{
|
||||
resource(133, "CHECK") array {
|
||||
$"424DDA0200000000000036000000280000000D0000000D000000010020000000"
|
||||
$"0000A4020000130B0000130B0000000000000000000077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
@ -555,91 +624,3 @@ resource(133, "CHECK") array
|
||||
$"7700777477007774770077747700777477007774770077747700777477007774"
|
||||
$"7700777477007774770077747700777477007774770077747700"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.Be-GGUI";
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
resource(1, "BEOS:APP_VERSION") #'APPV' array
|
||||
{
|
||||
$"0500000000000000000000000500000001000000523500000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"000000000000000000000000000000000000000042654F53203520C2A9313939"
|
||||
$"312D3230303020426520496E636F72706F726174656400000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000050000000000000000000000"
|
||||
$"0500000001000000523500000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"000000000000000042654F53203520C2A9313939312D3230303020426520496E"
|
||||
$"636F72706F726174656400000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
$"FFFFFFFFFFFFFF000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B1C1C3F3F0000FFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B00001C1B1C1C3F3F0000FFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF0017171C1C00001B1C1B1C3F3F0000FFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F3F17171C1C00001B1C1B1C3F3F0000FFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B3F3F17171C1C00001B1C1C1C3F3F0000FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B3F3F17171C1C00001B1C1B1C3F3F0000FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B00001C1B3F3F17171C1C1B1C1B1C1C1B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C1B00001C1C3F3F17171C1C1B001C1B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B1C007B7B000F1B1C3F3F17171C1C001B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B0000DA7B7B001C001C1B3F3F17171C1C1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B002B2BDA7B001C1C1B1C1B1C3F3F17171800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F1B002B2F2F00001C1C1B1C1B1C1C1B3F3F1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F002B2CEB2F001B00001C1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF003F002B2F2F001B1C1C1B00001C1B1C1C001B1800FFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF00002B2CEB2F0000001B1C1B1C1C1B1C1C1B1C1700FFFFFFFF"
|
||||
$"FFFF000000FFFF00002B2F2F001B1C1C00001B1C1B1C1C001B1C1700FFFFFFFF"
|
||||
$"FF007B7B7B00FF002B2CEB2F00001B1C1B1C00001C1B1C1C001B1800FFFFFFFF"
|
||||
$"007B7B7BDA00FF002B2F2F001B1C00001C1B1C1B1C1C1B1C1C1B1800FFFFFFFF"
|
||||
$"002B2CDA7B7B002B2CEB2F001B1C1C1B00001C1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FF002B2CDA7B2B2CEB2F000017171C1C1B1C00001C1B1C1B001C1700FFFFFFFF"
|
||||
$"FF002B2CDA7B2B2CEB2F00FF000017171A1B1C1C1B1C1C1B1C1B1800FFFFFFFF"
|
||||
$"FFFF002B2C2B2B2F2F00FFFFFFFF000017171A1B1C1C1B001C1C1700FFFFFFFF"
|
||||
$"FFFF002B2C2B2B2F2F00FFFFFFFFFFFF000017171C1C1B1C001B1800FFFFFFFF"
|
||||
$"FFFFFF002B2CEB2F00FFFFFFFFFFFFFFFFFF000017171C1C1B1C1700FFFFFFFF"
|
||||
$"FFFFFF002B2CEB2F00FFFFFFFFFFFFFFFFFFFFFF000017171C1C1700FFFFFFFF"
|
||||
$"FFFFFFFF002B2F000E0F0F0F0F0F0F0F0E0FFFFFFFFF0000171718000F0EFFFF"
|
||||
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0E0F0FFFFFFFFFFFFF000017000F0F0F0E"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000E0F0F0F"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
$"FFFFFF000000FFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFF003F3F0000FFFFFFFFFFFFFFFF"
|
||||
$"FFFFFF003F1B3F3F0000FFFFFFFFFFFF"
|
||||
$"FFFFFF003F1B1C1B3F3F0000FFFFFFFF"
|
||||
$"FFFFFF003F1B00001C1B3F3F0000FFFF"
|
||||
$"FFFFFF003F1B1C1B001C1C1B1800FFFF"
|
||||
$"FFFFFF003F1B001C1B1C001C1700FFFF"
|
||||
$"FFFFFF003F007B001B1C1B1C1700FFFF"
|
||||
$"FFFFFF003F002F001B1C001B1800FFFF"
|
||||
$"FFFFFF00002F001B1C1B1C1C1700FFFF"
|
||||
$"FF00FF00002F001B1C1B001C1700FFFF"
|
||||
$"002B00002F0017171C1C1B1C1700FFFF"
|
||||
$"002B7B2CEB00000017171C1C1700FFFF"
|
||||
$"FF002B2F00FFFFFF000017171800FFFF"
|
||||
$"FF002B2F00FFFFFFFFFF000017000FFF"
|
||||
$"FFFF00000E0F0F0F0FFFFFFF00000E0F"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"00000000";
|
||||
|
@ -1,9 +1,20 @@
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* <unknown, please fill in who knows>
|
||||
* Jack Burton
|
||||
*/
|
||||
|
||||
|
||||
#include "MenuApp.h"
|
||||
#include "MenuWindow.h"
|
||||
#include "msg.h"
|
||||
|
||||
|
||||
MenuApp::MenuApp()
|
||||
: BApplication("application/x-vnd.Be-GGUI")
|
||||
: BApplication("application/x-vnd.Haiku-Menu")
|
||||
{
|
||||
fMenuWindow = new MenuWindow(BRect(100, 100, 400, 300));
|
||||
fMenuWindow->Show();
|
||||
@ -13,8 +24,7 @@ MenuApp::MenuApp()
|
||||
void
|
||||
MenuApp::MessageReceived(BMessage *msg)
|
||||
{
|
||||
switch(msg->what) {
|
||||
//others
|
||||
switch (msg->what) {
|
||||
case UPDATE_WINDOW:
|
||||
case CLICK_OPEN_MSG:
|
||||
case ALLWAYS_TRIGGERS_MSG:
|
||||
@ -32,10 +42,15 @@ MenuApp::MessageReceived(BMessage *msg)
|
||||
}
|
||||
|
||||
|
||||
int main()
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
new MenuApp();
|
||||
be_app->Run();
|
||||
delete be_app;
|
||||
MenuApp app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,16 +1,27 @@
|
||||
#ifndef __MENU_APP_H
|
||||
#define __MENU_APP_H
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* <unknown, please fill in who knows>
|
||||
* Jack Burton
|
||||
*/
|
||||
#ifndef MENU_APP_H
|
||||
#define MENU_APP_H
|
||||
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
class MenuWindow;
|
||||
|
||||
class MenuApp : public BApplication {
|
||||
public:
|
||||
MenuApp();
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
|
||||
private:
|
||||
MenuWindow *fMenuWindow;
|
||||
public:
|
||||
MenuApp();
|
||||
virtual void MessageReceived(BMessage* msg);
|
||||
|
||||
private:
|
||||
MenuWindow* fMenuWindow;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MENU_APP_H
|
||||
|
@ -1,32 +1,26 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: Mouse.cpp
|
||||
// Authors: Jérôme Duval,
|
||||
// Andrew McCall (mccall@digitalparadise.co.uk)
|
||||
// Axel Dörfler (axeld@pinc-software.de)
|
||||
// Description: Mouse Preferences
|
||||
// Created: December 10, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Andrew McCall (mccall@digitalparadise.co.uk)
|
||||
* Jérôme Duval
|
||||
* Axel Dörfler (axeld@pinc-software.de)
|
||||
*/
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Screen.h>
|
||||
|
||||
#include "Mouse.h"
|
||||
#include "MouseWindow.h"
|
||||
|
||||
#include <Alert.h>
|
||||
#include <Screen.h>
|
||||
|
||||
const char kMouseApplicationSig[] = "application/x-vnd.haiku.Mouse";
|
||||
|
||||
const char* kSignature = "application/x-vnd.Haiku-Mouse";
|
||||
|
||||
|
||||
MouseApplication::MouseApplication()
|
||||
: BApplication(kMouseApplicationSig)
|
||||
: BApplication(kSignature)
|
||||
{
|
||||
BRect rect(0, 0, 397, 293);
|
||||
MouseWindow *window = new MouseWindow(rect);
|
||||
@ -35,7 +29,7 @@ MouseApplication::MouseApplication()
|
||||
|
||||
|
||||
void
|
||||
MouseApplication::AboutRequested(void)
|
||||
MouseApplication::AboutRequested()
|
||||
{
|
||||
(new BAlert("about", "...by Andrew Edward McCall", "Dig Deal"))->Go();
|
||||
}
|
||||
|
@ -1,19 +1,12 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: Mouse.h
|
||||
// Authors: Jérôme Duval,
|
||||
// Andrew McCall (mccall@digitalparadise.co.uk)
|
||||
// Axel Dörfler (axeld@pinc-software.de)
|
||||
// Description: Mouse Preferences
|
||||
// Created: December 10, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Andrew McCall (mccall@digitalparadise.co.uk)
|
||||
* Jérôme Duval
|
||||
* Axel Dörfler (axeld@pinc-software.de)
|
||||
*/
|
||||
#ifndef MOUSE_H
|
||||
#define MOUSE_H
|
||||
|
||||
@ -21,12 +14,11 @@
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
class MouseApplication : public BApplication
|
||||
{
|
||||
class MouseApplication : public BApplication {
|
||||
public:
|
||||
MouseApplication();
|
||||
|
||||
virtual void AboutRequested(void);
|
||||
virtual void AboutRequested();
|
||||
};
|
||||
|
||||
#endif /* MOUSE_H */
|
||||
|
@ -1,13 +1,26 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku-Mouse";
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Haiku-Mouse",
|
||||
long_info = "The Haiku replacement for the Mouse preference panel."
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Mouse",
|
||||
long_info = "Mouse ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFF000000000000000000000EFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFF00000E0F0F0F0F0F0F0F0E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFF00000E0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -42,8 +55,7 @@ resource large_icon
|
||||
$"FFFFFFFFFF0000000E0F0F0F0F0F0F0F0F0F0FFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FF00000000000E0F0FFFFFFFFFFFFFFF"
|
||||
$"000F0F0F000000FFFFFFFFFFFFFFFFFF"
|
||||
$"000FFF001717180000FFFFFFFFFFFFFF"
|
||||
@ -62,12 +74,7 @@ resource mini_icon
|
||||
$"FFFF00000E0F0F0F0FFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.haiku.Mouse";
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource(601, "double_click_bmap") #'bits' array
|
||||
{
|
||||
resource(601, "double_click_bmap") #'bits' array {
|
||||
$"424D06070000000000003A000000280000000E0000001E000000010018000000"
|
||||
$"0000CC060000130B0000130B00000000000000000000FFFFFFFFD8D8D8000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
@ -127,8 +134,7 @@ resource(601, "double_click_bmap") #'bits' array
|
||||
$"000000000000"
|
||||
};
|
||||
|
||||
resource(602, "speed_bmap") #'bits' array
|
||||
{
|
||||
resource(602, "speed_bmap") #'bits' array {
|
||||
$"424DE8080000000000003A000000280000001900000016000000010018000000"
|
||||
$"0000AE080000130B0000130B00000000000000000000FFFFFFFFD8D8D8D8D8D8"
|
||||
$"D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8"
|
||||
@ -203,8 +209,7 @@ resource(602, "speed_bmap") #'bits' array
|
||||
$"0000000000000000"
|
||||
};
|
||||
|
||||
resource(603, "acceleration_bmap") #'bits' array
|
||||
{
|
||||
resource(603, "acceleration_bmap") #'bits' array {
|
||||
$"424D83080000000000003A000000280000001900000015000000010018000000"
|
||||
$"000049080000130B0000130B00000000F8410000F841FFFFFFFFD8D8D8D8D8D8"
|
||||
$"D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D8D80000"
|
||||
|
@ -13,7 +13,7 @@ Preference Printers :
|
||||
SpoolFolder.cpp
|
||||
Globals.cpp
|
||||
: libbe.so libtranslation.so libprint.a
|
||||
: Printers.FileTypes.rdef
|
||||
: Printers.rdef
|
||||
;
|
||||
|
||||
# TODO remove dependency to libtranslation (BeUtils)
|
||||
|
@ -1,34 +1,24 @@
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"00000000";
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource(1, "BEOS:APP_VERSION") #'APPV' array
|
||||
{
|
||||
$"0100000000000000000000000000000001000000312E302E3064310000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"00000000000000000000000000000000000000004F70656E42654F5320312E30"
|
||||
$"2C20C2A92032303031204F70656E42654F532E20416C6C205269676874732052"
|
||||
$"657365727665642E000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000"
|
||||
resource app_signature "application/x-vnd.Be-PRNT2";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Printers",
|
||||
long_info = "Printers ©2001-2006 Haiku"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFF0000FFFF0404FFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFF003F3F00043F3F0404FFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFF003F1717113F3FFE3F3F0404FFFFFFFFFFFFFFFFFF"
|
||||
@ -63,8 +53,7 @@ resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
$"FFFFFFFF0000000F0F0F0F0F0F0F0F0F0F0FFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array {
|
||||
$"FFFFFFFFFFFF0000000000FFFFFFFFFF"
|
||||
$"FFFFFFFFFF003F1711FE110000FFFFFF"
|
||||
$"FFFFFFFF003F1711FEFEFEFE1100FFFF"
|
||||
@ -83,12 +72,9 @@ resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
$"FFFF00000E0F0F0F0FFFFFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.Be-PRNT2";
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
resource(0, "init_icon") #'bits' array
|
||||
{
|
||||
resource(0, "init_icon") #'bits' array {
|
||||
$"424D369000000000000036000000280000004000000090000000010020000000"
|
||||
$"000000900000130B0000130B00000000000000000000808080FFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
@ -1,10 +1,26 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Be-SCRN";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version { major = 0, minor = 8 };
|
||||
resource file_types message;
|
||||
|
||||
resource large_icon
|
||||
{
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Screen",
|
||||
long_info = "Screen ©2001-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFF00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFF001B0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFF003F1B1C1B0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
@ -39,8 +55,7 @@ resource large_icon
|
||||
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0E0F0FFFFFFFFFFF000000FFFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource mini_icon
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFF0000FFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFF001B1B0000FFFFFFFFFFFFFFFFFF"
|
||||
$"FFFF000F151B1C0000FFFFFFFFFFFFFF"
|
||||
@ -58,7 +73,3 @@ resource mini_icon
|
||||
$"FFFF2B2F00FF000015151B1C1500FFFF"
|
||||
$"FFFF00000E0F0F0F000000000000FFFF"
|
||||
};
|
||||
|
||||
resource app_signature "application/x-vnd.Be-SCRN";
|
||||
|
||||
resource file_types message;
|
||||
|
@ -1,36 +1,26 @@
|
||||
|
||||
resource app_signature "application/x-vnd.haiku.ScreenSaver";
|
||||
resource app_signature "application/x-vnd.Haiku-ScreenSaver";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource(1, "BEOS:FILE_TYPES") message;
|
||||
|
||||
resource(1, "BEOS:APP_VERSION") #'APPV' array
|
||||
{
|
||||
$"0100000000000000000000000200000001000000523100000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"00000000000000000000000000000000000000004F70656E42654F5320536372"
|
||||
$"65656E5361766572205265706C6163656D656E7420507265666C657400000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"00000000000000000000000000000000000000003B0700003D0700003E070000"
|
||||
$"40070000420700004407000046070000480700004A0700004C0700004E070000"
|
||||
$"5007000052070000530700005507000057070000590700005B0700005D070000"
|
||||
$"5E0700005F070000610700006207000063070000650700006707000069070000"
|
||||
$"6B0700006D0700006E0700006F07000070070000720700007307000074070000"
|
||||
$"75070000760700007707000078070000790700007A0700007B0700007C070000"
|
||||
$"7D0700007E0700007F0700008007000081070000820700008307000084070000"
|
||||
$"8507000086070000890700008C0700008D0700008F0700009107000093070000"
|
||||
$"9507000097070000990700009B0700009D0700009F070000A1070000A3070000"
|
||||
$"A5070000A7070000A9070000AB070000AD070000AF070000B1070000B3070000"
|
||||
$"B5070000B7070000B9070000BB070000BD070000BF070000C1070000C3070000"
|
||||
$"C5070000C7070000"
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "ScreenSaver",
|
||||
long_info = "ScreenSaver ©2004-2006 Haiku"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFF00000000000000000000FFFFFFFFFFFFFFFF00FFFFFFFFFFFF"
|
||||
$"FFFFFFFF0000001B3F3F3F3F3F3F3F3F3F0000FFFFFFFFFF00FFFF000000FFFF"
|
||||
@ -65,8 +55,7 @@ resource(101, "BEOS:L:STD_ICON") #'ICON' array
|
||||
$"FFFFFFFFFFFF0000000F0F0F0F0F0F0F0F0FFFFFFF000000111111FFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFF0404040404FFFFFF00FFFFFF"
|
||||
$"FFFF00003F3F3F3F3F00FFFF00FF00FF"
|
||||
$"FF003F1C3F3F1C1C16190A00FFFF00FF"
|
||||
@ -84,5 +73,3 @@ resource(101, "BEOS:M:STD_ICON") #'MICN' array
|
||||
$"FFFF002B2F00FF06001516150F0011FF"
|
||||
$"FFFFFF00000F0F0FFF0600060011FFFF"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"00000000";
|
||||
|
@ -30,7 +30,7 @@ class ScreenSaverApp : public BApplication {
|
||||
|
||||
|
||||
ScreenSaverApp::ScreenSaverApp()
|
||||
: BApplication("application/x-vnd.haiku.ScreenSaver")
|
||||
: BApplication("application/x-vnd.Haiku-ScreenSaver")
|
||||
{
|
||||
fScreenSaverWindow = new ScreenSaverWindow();
|
||||
fScreenSaverWindow->Show();
|
||||
|
@ -1,47 +1,36 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: HApp.cpp
|
||||
// Author: Jérôme Duval, Oliver Ruiz Dorantes, Atsushi Takamatsu
|
||||
// Description: Sounds Preferences
|
||||
// Created : November 24, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Atsushi Takamatsu
|
||||
* Jérôme Duval
|
||||
* Oliver Ruiz Dorantes
|
||||
*/
|
||||
|
||||
|
||||
#include <Alert.h>
|
||||
#include "HApp.h"
|
||||
#include "HWindow.h"
|
||||
|
||||
#define APP_SIG "application/x-vnd.Haiku.SoundsPrefs"
|
||||
#include <Alert.h>
|
||||
|
||||
/***********************************************************
|
||||
* Constructor
|
||||
***********************************************************/
|
||||
HApp::HApp() :BApplication(APP_SIG)
|
||||
|
||||
HApp::HApp()
|
||||
: BApplication("application/x-vnd.Haiku-Sounds")
|
||||
{
|
||||
BRect rect;
|
||||
rect.Set(200,150,500,450);
|
||||
|
||||
HWindow *win = new HWindow(rect,"Sounds");
|
||||
rect.Set(200, 150, 500, 450);
|
||||
|
||||
HWindow *win = new HWindow(rect, "Sounds");
|
||||
win->Show();
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* Destructor
|
||||
***********************************************************/
|
||||
HApp::~HApp()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
* AboutRequested
|
||||
***********************************************************/
|
||||
|
||||
HApp::~HApp()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HApp::AboutRequested()
|
||||
{
|
||||
@ -50,13 +39,19 @@ HApp::AboutRequested()
|
||||
" Oliver Ruiz Dorantes\n"
|
||||
" Jérôme DUVAL.\n"
|
||||
" Original work from Atsushi Takamatsu.\n"
|
||||
"OpenBeOS, 2003","OK"))->Go();
|
||||
"Copyright " B_UTF8_COPYRIGHT "2003-2006 Haiku","OK"))->Go();
|
||||
}
|
||||
|
||||
int main()
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
HApp app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,28 +1,26 @@
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
//
|
||||
// Copyright (c) 2003, OpenBeOS
|
||||
//
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//
|
||||
//
|
||||
// File: HApp.h
|
||||
// Author: Jérôme Duval, Oliver Ruiz Dorantes, Atsushi Takamatsu
|
||||
// Description: Sounds Preferences
|
||||
// Created : November 24, 2003
|
||||
//
|
||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
||||
/*
|
||||
* Copyright 2003-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Atsushi Takamatsu
|
||||
* Jérôme Duval
|
||||
* Oliver Ruiz Dorantes
|
||||
*/
|
||||
#ifndef HAPP_H
|
||||
#define HAPP_H
|
||||
|
||||
#ifndef __HAPP_H__
|
||||
#define __HAPP_H__
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
class HApp :public BApplication{
|
||||
public:
|
||||
HApp();
|
||||
virtual ~HApp();
|
||||
protected:
|
||||
virtual void AboutRequested();
|
||||
|
||||
class HApp :public BApplication {
|
||||
public:
|
||||
HApp();
|
||||
virtual ~HApp();
|
||||
|
||||
protected:
|
||||
virtual void AboutRequested();
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // HAPP_H
|
||||
|
@ -1,14 +1,23 @@
|
||||
|
||||
resource app_signature "application/x-vnd.Haiku.SoundsPrefs";
|
||||
|
||||
resource app_version
|
||||
{
|
||||
short_info = "Sounds",
|
||||
long_info = "Haiku Sounds Preferences"
|
||||
};
|
||||
resource app_signature "application/x-vnd.Haiku-Sounds";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Sounds",
|
||||
long_info = "Sounds ©2003-2006 Haiku"
|
||||
};
|
||||
|
||||
resource file_types message;
|
||||
|
||||
resource large_icon
|
||||
|
@ -1,51 +1,45 @@
|
||||
/*
|
||||
* Time.cpp
|
||||
* Time mccall@@digitalparadise.co.uk
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Andrew McCall, mccall@digitalparadise.co.uk
|
||||
* Mike Berg
|
||||
*/
|
||||
|
||||
#include <Alert.h>
|
||||
|
||||
#include "Time.h"
|
||||
#include "TimeSettings.h"
|
||||
#include "TimeMessages.h"
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
new TimeApplication();
|
||||
|
||||
be_app->Run();
|
||||
|
||||
delete be_app;
|
||||
return(0);
|
||||
}
|
||||
#include <Alert.h>
|
||||
|
||||
|
||||
TimeApplication::TimeApplication()
|
||||
:BApplication(HAIKU_APP_SIGNATURE)
|
||||
: BApplication(HAIKU_APP_SIGNATURE)
|
||||
{
|
||||
f_settings = new TimeSettings();
|
||||
f_window = new TTimeWindow();
|
||||
fSettings = new TimeSettings();
|
||||
fWindow = new TTimeWindow();
|
||||
}
|
||||
|
||||
|
||||
TimeApplication::~TimeApplication()
|
||||
{
|
||||
delete f_settings;
|
||||
delete fSettings;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TimeApplication::MessageReceived(BMessage *message)
|
||||
{
|
||||
switch(message->what) {
|
||||
switch (message->what) {
|
||||
case ERROR_DETECTED:
|
||||
{
|
||||
(new BAlert("Error", "Something has gone wrong!","OK",NULL,NULL,B_WIDTH_AS_USUAL, B_OFFSET_SPACING, B_WARNING_ALERT))->Go();
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
}
|
||||
(new BAlert("Error", "Something has gone wrong!", "OK",
|
||||
NULL, NULL, B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
||||
B_WARNING_ALERT))->Go();
|
||||
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||
break;
|
||||
|
||||
default:
|
||||
BApplication::MessageReceived(message);
|
||||
break;
|
||||
@ -54,14 +48,14 @@ TimeApplication::MessageReceived(BMessage *message)
|
||||
|
||||
|
||||
void
|
||||
TimeApplication::ReadyToRun(void)
|
||||
TimeApplication::ReadyToRun()
|
||||
{
|
||||
f_window->Show();
|
||||
fWindow->Show();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TimeApplication::AboutRequested(void)
|
||||
TimeApplication::AboutRequested()
|
||||
{
|
||||
(new BAlert("about", "...by Andrew Edward McCall\n...Mike Berg too", "Big Deal"))->Go();
|
||||
}
|
||||
@ -70,5 +64,19 @@ TimeApplication::AboutRequested(void)
|
||||
void
|
||||
TimeApplication::SetWindowCorner(BPoint corner)
|
||||
{
|
||||
f_settings->SetWindowCorner(corner);
|
||||
fSettings->SetWindowCorner(corner);
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
TimeApplication app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,27 +1,38 @@
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Andrew McCall, mccall@digitalparadise.co.uk
|
||||
* Mike Berg
|
||||
*/
|
||||
#ifndef TIME_H
|
||||
#define TIME_H
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
#include "TimeSettings.h"
|
||||
#include "TimeWindow.h"
|
||||
|
||||
#include <Application.h>
|
||||
|
||||
|
||||
class TimeApplication : public BApplication {
|
||||
public:
|
||||
TimeApplication();
|
||||
virtual ~TimeApplication();
|
||||
|
||||
void MessageReceived(BMessage *message);
|
||||
|
||||
void ReadyToRun(void);
|
||||
void AboutRequested(void);
|
||||
|
||||
|
||||
void MessageReceived(BMessage* message);
|
||||
|
||||
void ReadyToRun();
|
||||
void AboutRequested();
|
||||
|
||||
void SetWindowCorner(BPoint corner);
|
||||
BPoint WindowCorner() const
|
||||
{ return f_settings->WindowCorner(); }
|
||||
{ return fSettings->WindowCorner(); }
|
||||
|
||||
private:
|
||||
TimeSettings *f_settings;
|
||||
TTimeWindow *f_window;
|
||||
TimeSettings *fSettings;
|
||||
TTimeWindow *fWindow;
|
||||
};
|
||||
|
||||
#endif //TIME_H
|
||||
#endif // TIME_H
|
||||
|
@ -1,6 +1,24 @@
|
||||
|
||||
resource(0, "BEOS:L:STD_ICON") #'ICON' array
|
||||
{
|
||||
resource app_signature "application/x-vnd.Be-TIME";
|
||||
|
||||
resource app_flags B_SINGLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 2,
|
||||
|
||||
internal = 0,
|
||||
|
||||
short_info = "Time",
|
||||
long_info = "Time ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon {
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000000000FFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFFFF00006D474747470000FFFFFFFFFFFFFFFFFFFF"
|
||||
$"FFFFFFFFFFFFFFFFFFFFFFFF006D6D47474747473F470000FFFFFFFFFFFFFFFF"
|
||||
@ -35,8 +53,7 @@ resource(0, "BEOS:L:STD_ICON") #'ICON' array
|
||||
$"FFFFFFFF0000000E0F0F0F0F0F0F0F0E0F0FFFFFFF0000000F0F0FFFFFFFFFFF"
|
||||
};
|
||||
|
||||
resource(0, "BEOS:M:STD_ICON") #'MICN' array
|
||||
{
|
||||
resource mini_icon {
|
||||
$"FFFFFFFFFF0000000000FFFFFFFFFFFF"
|
||||
$"FFFFFFFF006D6D4747470000FFFFFFFF"
|
||||
$"FFFFFF006D94943F3F476D9400FFFFFF"
|
||||
@ -54,33 +71,3 @@ resource(0, "BEOS:M:STD_ICON") #'MICN' array
|
||||
$"FF002B2F00FF000000949400000F0FFF"
|
||||
$"FFFF00000E0F0F0F0F0000000F0FFFFF"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_VERSION") #'APPV' array
|
||||
{
|
||||
$"00000000000000000200000002000000010000004861696B752054696D652050"
|
||||
$"7265666572656E636573004200008841474E4F4C056572726F720000913B0100"
|
||||
$"48000000480000000400000010000000040000004861696B752054696D652050"
|
||||
$"7265666572656E6365730065727300001400000020B505800000000006746172"
|
||||
$"67657400493B0100900000004800000004000000100000000400000001000000"
|
||||
$"1C00000010B50580474E4F4C0A62653A7472616E73697400474E534D08726570"
|
||||
$"000000006F004040100D000000000100D8000000480000000800000010000000"
|
||||
$"08000000010000001C00000000000000544E50420D62653A766965775F776865"
|
||||
$"7265004D087265700000A44200008841100D000000000100AD000000B13A0100"
|
||||
$"0A000000000000000800000018000000080000000100000014000000A8B50580"
|
||||
$"474E4C4C08696E74657276616C00653A30750000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000000000000000000000000000000000000000000000000000"
|
||||
$"0000000000000000"
|
||||
};
|
||||
|
||||
resource(1, "BEOS:APP_SIG") #'MIMS' "application/x-vnd.Be-TIME";
|
||||
|
||||
resource(1, "BEOS:APP_FLAGS") #'APPF' $"01000000";
|
||||
|
@ -1,9 +1,16 @@
|
||||
/*
|
||||
* TimeSettings.cpp
|
||||
* Time mccall@@digitalparadise.co.uk
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Andrew McCall, mccall@digitalparadise.co.uk
|
||||
* Mike Berg
|
||||
*/
|
||||
|
||||
|
||||
#include "TimeSettings.h"
|
||||
#include "TimeMessages.h"
|
||||
|
||||
#include <Application.h>
|
||||
#include <FindDirectory.h>
|
||||
#include <File.h>
|
||||
@ -11,8 +18,6 @@
|
||||
#include <String.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "TimeSettings.h"
|
||||
#include "TimeMessages.h"
|
||||
|
||||
const char TimeSettings::kTimeSettingsFile[] = "Time_settings";
|
||||
|
||||
@ -27,12 +32,12 @@ TimeSettings::TimeSettings()
|
||||
if (file.InitCheck() == B_OK) {
|
||||
// Now read in the data
|
||||
if (file.Read(&fCorner, sizeof(BPoint)) != sizeof(BPoint)) {
|
||||
fCorner.x=50;
|
||||
fCorner.y=50;
|
||||
};
|
||||
fCorner.x = 50;
|
||||
fCorner.y = 50;
|
||||
}
|
||||
} else {
|
||||
fCorner.x=50;
|
||||
fCorner.y=50;
|
||||
fCorner.x = 50;
|
||||
fCorner.y = 50;
|
||||
}
|
||||
} else
|
||||
be_app->PostMessage(ERROR_DETECTED);
|
||||
@ -40,10 +45,9 @@ TimeSettings::TimeSettings()
|
||||
|
||||
|
||||
TimeSettings::~TimeSettings()
|
||||
{
|
||||
{
|
||||
BPath path;
|
||||
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY,&path) < B_OK)
|
||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) < B_OK)
|
||||
return;
|
||||
|
||||
path.Append(kTimeSettingsFile);
|
||||
@ -52,13 +56,11 @@ TimeSettings::~TimeSettings()
|
||||
if (file.InitCheck() == B_OK) {
|
||||
file.Write(&fCorner, sizeof(BPoint));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TimeSettings::SetWindowCorner(BPoint corner)
|
||||
{
|
||||
fCorner=corner;
|
||||
fCorner = corner;
|
||||
}
|
||||
|
@ -1,21 +1,29 @@
|
||||
#ifndef TIME_SETTINGS_H_
|
||||
#define TIME_SETTINGS_H_
|
||||
/*
|
||||
* Copyright 2002-2006, Haiku. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors in chronological order:
|
||||
* Andrew McCall, mccall@digitalparadise.co.uk
|
||||
* Mike Berg
|
||||
*/
|
||||
#ifndef TIME_SETTINGS_H
|
||||
#define TIME_SETTINGS_H
|
||||
|
||||
|
||||
#include <Point.h>
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
class TimeSettings {
|
||||
public :
|
||||
TimeSettings();
|
||||
~TimeSettings();
|
||||
|
||||
|
||||
BPoint WindowCorner() const { return fCorner; }
|
||||
void SetWindowCorner(BPoint corner);
|
||||
|
||||
private:
|
||||
static const char kTimeSettingsFile[];
|
||||
BPoint fCorner;
|
||||
|
||||
};
|
||||
|
||||
#endif //TIME_SETTINGS_H_
|
||||
|
||||
|
||||
#endif // TIME_SETTINGS_H
|
||||
|
@ -1,45 +1,24 @@
|
||||
/*
|
||||
** input_server.rdef
|
||||
**
|
||||
*/
|
||||
|
||||
/* BEOS:APP_SIG :
|
||||
application:/x-vnd.obos.app-name
|
||||
*/
|
||||
* input_server.rdef
|
||||
*/
|
||||
|
||||
resource app_signature "application/x-vnd.Be-input_server";
|
||||
|
||||
/* BEOS:APP_FLAGS :
|
||||
00000000 = SINGLE LAUNCH
|
||||
00000001 = MULTIPLE LAUNCH
|
||||
00000002 = EXCLUSIVE LAUNCH
|
||||
00000004 = BACKGROUND APP + SINGLE LAUNCH
|
||||
00000005 = BACKGROUND APP + MULTIPLE LAUNCH
|
||||
00000006 = BACKGROUND APP + EXCLUSIVE LAUNCH
|
||||
00000008 = ARGV_ONLY + SINGLE LAUNCH
|
||||
00000009 = ARGV_ONLY + MULTIPLE LAUNCH
|
||||
0000000A = ARGV_ONLY + EXCLUSIVE LAUNCH
|
||||
0000000C = ARGV_ONLY + BACKGROUND APP + SINGLE LAUNCH
|
||||
0000000D = ARGV_ONLY + BACKGROUND APP + MULTIPLE LAUNCH
|
||||
0000000E = ARGV_ONLY + BACKGROUND APP + EXCLUSIVE LAUNCH
|
||||
*/
|
||||
|
||||
resource app_flags B_EXCLUSIVE_LAUNCH | B_BACKGROUND_APP;
|
||||
|
||||
resource app_version {
|
||||
|
||||
major = 1,
|
||||
middle = 0,
|
||||
minor = 0,
|
||||
|
||||
|
||||
/* 0 = development 1 = alpha 2 = beta
|
||||
3 = gamma 4 = golden master 5 = final */
|
||||
variety = 1,
|
||||
|
||||
|
||||
internal = 0,
|
||||
|
||||
|
||||
short_info = "input_server",
|
||||
long_info = "OpenBeOS - input_server"
|
||||
long_info = "input_server ©2002-2006 Haiku"
|
||||
};
|
||||
|
||||
resource large_icon array {
|
||||
|
@ -217,7 +217,7 @@ DeskbarView::MessageReceived(BMessage *message)
|
||||
break;
|
||||
}
|
||||
case MD_OPEN_PREFS:
|
||||
be_roster->Launch("application/x-vnd.Be-mprf");
|
||||
be_roster->Launch("application/x-vnd.Haiku-Mail");
|
||||
break;
|
||||
|
||||
case B_QUERY_UPDATE:
|
||||
|
Loading…
Reference in New Issue
Block a user