Added some needed stdio.h includes. I don't know what magic was used to compile
these for other people, but they wouldn't compile for me when building the app_server test environment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19479 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
6cc7630f36
commit
252f476782
|
@ -2,4 +2,5 @@ SubDir HAIKU_TOP src add-ons tracker ;
|
|||
|
||||
SubInclude HAIKU_TOP src add-ons tracker zipomatic ;
|
||||
SubInclude HAIKU_TOP src add-ons tracker filetype ;
|
||||
SubInclude HAIKU_TOP src add-ons tracker mark_as ;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "Exporter.h"
|
||||
|
||||
#include <fs_attr.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Alert.h>
|
||||
#include <File.h>
|
||||
|
|
|
@ -1595,6 +1595,13 @@ ShowImageView::KeyDown(const char* bytes, int32 numBytes)
|
|||
case B_DELETE:
|
||||
// TODO: move image to Trash (script Tracker)
|
||||
break;
|
||||
case '+':
|
||||
case '=':
|
||||
ZoomIn();
|
||||
break;
|
||||
case '-':
|
||||
ZoomOut();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ ShowImageWindow::BuildViewMenu(BMenu *menu)
|
|||
menu->AddSeparatorItem();
|
||||
|
||||
AddItemMenu(menu, "Original Size", MSG_ORIGINAL_SIZE, 0, 0, 'W', true);
|
||||
AddItemMenu(menu, "Zoom In", MSG_ZOOM_IN, '=', 0, 'W', true);
|
||||
AddItemMenu(menu, "Zoom In", MSG_ZOOM_IN, '+', 0, 'W', true);
|
||||
AddItemMenu(menu, "Zoom Out", MSG_ZOOM_OUT, '-', 0, 'W', true);
|
||||
|
||||
menu->AddSeparatorItem();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#include <PictureDataWriter.h>
|
||||
#include <PictureProtocol.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
PictureDataWriter::PictureDataWriter(BPositionIO *data)
|
||||
:
|
||||
fData(data)
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
#include <Size.h>
|
||||
#include <String.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "SimpleLayouter.h"
|
||||
|
||||
// Since the qoca headers are DEBUG and NDEBUG conditional, we get
|
||||
|
|
|
@ -48,7 +48,7 @@ SharedLibrary libmail.so :
|
|||
tracker
|
||||
$(TARGET_LIBSTDC++)
|
||||
$(NETWORK_LIBS)
|
||||
$(SELECT_UNAME_ETC_LIB)
|
||||
# $(SELECT_UNAME_ETC_LIB)
|
||||
;
|
||||
|
||||
Package haiku-maildaemon-cvs :
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <new>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||
extern "C" status_t _kern_get_safemode_option(const char *parameter,
|
||||
|
|
|
@ -216,20 +216,20 @@ WorkspacesLayer::_DrawWindow(DrawingEngine* drawingEngine, const BRect& workspac
|
|||
// so that it has only to be recalculated on demand. With double buffered
|
||||
// windows, this would also open up the door to have a more detailed
|
||||
// preview.
|
||||
#if 0
|
||||
BString title = window->Name();
|
||||
#if 1
|
||||
BString title(window->Title());
|
||||
|
||||
ServerFont font = fDrawState->Font();
|
||||
font.SetSize(7);
|
||||
fDrawState->SetFont(font);
|
||||
|
||||
fDrawState->Font().TruncateString(&title, B_TRUNCATE_END, frame.Width() - 4);
|
||||
float width = GetDrawingEngine()->StringWidth(title.String(), title.Length(),
|
||||
float width = drawingEngine->StringWidth(title.String(), title.Length(),
|
||||
fDrawState, NULL);
|
||||
float height = GetDrawingEngine()->StringHeight(title.String(), title.Length(),
|
||||
float height = drawingEngine->StringHeight(title.String(), title.Length(),
|
||||
fDrawState);
|
||||
|
||||
GetDrawingEngine()->DrawString(title.String(), title.Length(),
|
||||
drawingEngine->DrawString(title.String(), title.Length(),
|
||||
BPoint(frame.left + (frame.Width() - width) / 2,
|
||||
frame.top + (frame.Height() + height) / 2),
|
||||
fDrawState, NULL);
|
||||
|
|
|
@ -366,13 +366,25 @@ InputServer::QuitRequested()
|
|||
if (!BApplication::QuitRequested())
|
||||
return false;
|
||||
|
||||
fAddOnManager->SaveState();
|
||||
gDeviceManager.SaveState();
|
||||
PostMessage(SYSTEM_SHUTTING_DOWN);
|
||||
|
||||
delete_port(fEventLooperPort);
|
||||
// the event looper thread will exit after this
|
||||
fEventLooperPort = -1;
|
||||
return true;
|
||||
bool shutdown = false;
|
||||
CurrentMessage()->FindBool("_shutdown_", &shutdown);
|
||||
|
||||
// Don't actually quit when the system is being shutdown
|
||||
if (shutdown) {
|
||||
PRINT(("****RJL: The system is shutting down, so NOT QUITTING!\n"));
|
||||
return false;
|
||||
} else {
|
||||
PRINT(("****RJL: The system is NOT shutting down, so I AM QUITTING!\n"));
|
||||
fAddOnManager->SaveState();
|
||||
gDeviceManager.SaveState();
|
||||
|
||||
delete_port(fEventLooperPort);
|
||||
// the event looper thread will exit after this
|
||||
fEventLooperPort = -1;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ status_t our_image(image_info* image)
|
|||
|
||||
BView* instantiate_deskbar_item(void)
|
||||
{
|
||||
printf("Ryan was here!\n");
|
||||
return new DeskbarView(BRect(0, 0, 15, 15));
|
||||
}
|
||||
|
||||
|
@ -227,9 +228,11 @@ DeskbarView::MessageReceived(BMessage *message)
|
|||
switch (what) {
|
||||
case B_ENTRY_CREATED:
|
||||
fNewMessages++;
|
||||
printf("B_QUERY_UPDATE::B_ENTRY_CREATED, fNewMessages = %d\n", fNewMessages);
|
||||
break;
|
||||
case B_ENTRY_REMOVED:
|
||||
fNewMessages--;
|
||||
printf("B_QUERY_UPDATE::B_ENTRY_REMOVED, fNewMessages = %d\n", fNewMessages);
|
||||
break;
|
||||
}
|
||||
ChangeIcon((fNewMessages > 0) ? NEW_MAIL : NO_MAIL);
|
||||
|
|
|
@ -709,7 +709,7 @@ ShutdownProcess::Init(BMessage *request)
|
|||
|
||||
// get a list of all applications to shut down and sort them
|
||||
error = fRoster->GetShutdownApps(fUserApps, fSystemApps, fBackgroundApps,
|
||||
fVitalSystemApps, fInputServer);
|
||||
fVitalSystemApps);//, fInputServer);
|
||||
if (error != B_OK) {
|
||||
fRoster->RemoveWatcher(this);
|
||||
fRoster->SetShuttingDown(false);
|
||||
|
@ -1275,12 +1275,12 @@ ShutdownProcess::_WorkerDoShutdown()
|
|||
sync();
|
||||
|
||||
// notify the input server we are shutting down
|
||||
if (fInputServer.registration_time != 0) {
|
||||
/*if (fInputServer.registration_time != 0) {
|
||||
// The SYSTEM_SHUTTING_DOWN message is defined in InputServerTypes.h
|
||||
BMessage message(SYSTEM_SHUTTING_DOWN);
|
||||
SingleMessagingTargetSet target(fInputServer.port, B_PREFERRED_TOKEN);
|
||||
MessageDeliverer::Default()->DeliverMessage(&message, target);
|
||||
}
|
||||
}*/
|
||||
|
||||
// phase 1: terminate the user apps
|
||||
_SetPhase(USER_APP_TERMINATION_PHASE);
|
||||
|
@ -1413,6 +1413,8 @@ ShutdownProcess::_QuitApps(AppInfoList &list, bool disableCancel)
|
|||
return;
|
||||
}
|
||||
|
||||
PRINT(("****RJL: Asking %s to quit\n", appName));
|
||||
|
||||
// set window text
|
||||
char buffer[1024];
|
||||
snprintf(buffer, sizeof(buffer), "Asking \"%s\" to quit.", appName);
|
||||
|
|
|
@ -97,7 +97,7 @@ private:
|
|||
AppInfoList fSystemApps;
|
||||
AppInfoList fUserApps;
|
||||
AppInfoList fBackgroundApps;
|
||||
RosterAppInfo fInputServer;
|
||||
//RosterAppInfo fInputServer;
|
||||
TimeoutEvent *fTimeoutEvent;
|
||||
InternalEventList *fInternalEvents;
|
||||
sem_id fInternalEventSemaphore;
|
||||
|
|
|
@ -177,6 +177,7 @@ PRINT(("full registration: %d\n", fullReg));
|
|||
// check the parameters
|
||||
team_id otherTeam = -1;
|
||||
uint32 token = 0;
|
||||
RosterAppInfo *otherInfo = NULL;
|
||||
|
||||
uint32 launchFlags = flags & B_LAUNCH_MASK;
|
||||
|
||||
|
@ -187,13 +188,12 @@ PRINT(("full registration: %d\n", fullReg));
|
|||
PRINT(("flags: %lx\n", flags));
|
||||
PRINT(("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name));
|
||||
// check single/exclusive launchers
|
||||
RosterAppInfo *info = NULL;
|
||||
if ((launchFlags == B_SINGLE_LAUNCH
|
||||
|| launchFlags == B_EXCLUSIVE_LAUNCH)
|
||||
&& (((info = fRegisteredApps.InfoFor(&ref)))
|
||||
|| ((info = fEarlyPreRegisteredApps.InfoFor(&ref))))) {
|
||||
&& (((otherInfo = fRegisteredApps.InfoFor(&ref)))
|
||||
|| ((otherInfo = fEarlyPreRegisteredApps.InfoFor(&ref))))) {
|
||||
SET_ERROR(error, B_ALREADY_RUNNING);
|
||||
otherTeam = info->team;
|
||||
otherTeam = otherInfo->team;
|
||||
}
|
||||
} else
|
||||
SET_ERROR(error, B_ENTRY_NOT_FOUND);
|
||||
|
@ -202,13 +202,12 @@ PRINT(("ref: %ld, %lld, %s\n", ref.device, ref.directory, ref.name));
|
|||
// signature
|
||||
if (error == B_OK && signature) {
|
||||
// check exclusive launchers
|
||||
RosterAppInfo *info = NULL;
|
||||
if (launchFlags == B_EXCLUSIVE_LAUNCH
|
||||
&& (((info = fRegisteredApps.InfoFor(signature)))
|
||||
|| ((info = fEarlyPreRegisteredApps.InfoFor(signature))))) {
|
||||
&& (((otherInfo = fRegisteredApps.InfoFor(signature)))
|
||||
|| ((otherInfo = fEarlyPreRegisteredApps.InfoFor(signature))))) {
|
||||
SET_ERROR(error, B_ALREADY_RUNNING);
|
||||
otherTeam = info->team;
|
||||
token = info->token;
|
||||
otherTeam = otherInfo->team;
|
||||
token = otherInfo->token;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,6 +276,12 @@ PRINT(("added to early pre-regs, token: %lu\n", token));
|
|||
request->SendReply(&reply);
|
||||
}
|
||||
|
||||
if (otherInfo) {
|
||||
// Activate the other app
|
||||
printf("Trying to activate other app with team id: %d\n", otherInfo->team);
|
||||
ActivateApp(otherInfo);
|
||||
}
|
||||
|
||||
FUNCTION_END();
|
||||
}
|
||||
|
||||
|
@ -1245,7 +1250,7 @@ TRoster::ActivateApp(RosterAppInfo *info)
|
|||
_AppDeactivated(oldActiveApp);
|
||||
// activate the new app
|
||||
if (info) {
|
||||
info = fActiveApp;
|
||||
fActiveApp = info;
|
||||
_AppActivated(info);
|
||||
}
|
||||
}
|
||||
|
@ -1321,7 +1326,7 @@ TRoster::SetShuttingDown(bool shuttingDown)
|
|||
*/
|
||||
status_t
|
||||
TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
|
||||
AppInfoList &backgroundApps, hash_set<team_id> &vitalSystemApps, RosterAppInfo &inputServer)
|
||||
AppInfoList &backgroundApps, hash_set<team_id> &vitalSystemApps)
|
||||
{
|
||||
BAutolock _(fLock);
|
||||
|
||||
|
@ -1351,12 +1356,12 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
|
|||
}
|
||||
|
||||
// input server
|
||||
RosterAppInfo *info
|
||||
= fRegisteredApps.InfoFor("application/x-vnd.Be-input_server");
|
||||
RosterAppInfo *info;
|
||||
/* = fRegisteredApps.InfoFor("application/x-vnd.Be-input_server");
|
||||
if (info) {
|
||||
inputServer = *info;
|
||||
vitalSystemApps.insert(info->team);
|
||||
}
|
||||
}*/
|
||||
|
||||
// debug server
|
||||
info = fRegisteredApps.InfoFor("application/x-vnd.haiku-debug-server");
|
||||
|
@ -1370,12 +1375,12 @@ TRoster::GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
|
|||
if (vitalSystemApps.find(info->team) == vitalSystemApps.end()) {
|
||||
RosterAppInfo *clonedInfo = info->Clone();
|
||||
if (clonedInfo) {
|
||||
if (info->flags & B_BACKGROUND_APP) {
|
||||
if (!backgroundApps.AddInfo(clonedInfo))
|
||||
error = B_NO_MEMORY;
|
||||
} else if (_IsSystemApp(info)) {
|
||||
if (_IsSystemApp(info)) {
|
||||
if (!systemApps.AddInfo(clonedInfo))
|
||||
error = B_NO_MEMORY;
|
||||
} else if (info->flags & B_BACKGROUND_APP) {
|
||||
if (!backgroundApps.AddInfo(clonedInfo))
|
||||
error = B_NO_MEMORY;
|
||||
} else {
|
||||
if (!userApps.AddInfo(clonedInfo))
|
||||
error = B_NO_MEMORY;
|
||||
|
|
|
@ -92,8 +92,7 @@ public:
|
|||
|
||||
void SetShuttingDown(bool shuttingDown);
|
||||
status_t GetShutdownApps(AppInfoList &userApps, AppInfoList &systemApps,
|
||||
AppInfoList &backgroundApps, hash_set<team_id> &vitalSystemApps,
|
||||
RosterAppInfo &inputServer);
|
||||
AppInfoList &backgroundApps, hash_set<team_id> &vitalSystemApps);
|
||||
|
||||
status_t AddWatcher(Watcher *watcher);
|
||||
void RemoveWatcher(Watcher *watcher);
|
||||
|
|
Loading…
Reference in New Issue