preferencesAboutTextFull
agriche 9 years ago
commit b1124a66a9
  1. 34
      OpenBoard.pro
  2. 2
      src/adaptors/UBThumbnailAdaptor.cpp
  3. 3
      src/board/UBBoardView.cpp
  4. 40
      src/core/UBApplication.cpp
  5. 9
      src/core/UBApplication.h
  6. 3
      src/core/UBApplicationController.cpp
  7. 2
      src/core/core.pri
  8. 3
      src/desktop/UBWindowCapture_mac.mm
  9. 1
      src/frameworks/UBPlatformUtils.h
  10. 5
      src/frameworks/UBPlatformUtils_linux.cpp
  11. 31
      src/frameworks/UBPlatformUtils_mac.mm
  12. 4
      src/frameworks/UBPlatformUtils_win.cpp
  13. 2
      src/gui/UBFloatingPalette.cpp
  14. 6
      src/gui/UBKeyboardPalette_mac.mm
  15. 2
      src/gui/UBMagnifer.cpp
  16. 10
      src/gui/UBRubberBand.cpp
  17. 3
      src/gui/gui.pri
  18. 14
      src/podcast/UBPodcastController.cpp
  19. 16
      src/podcast/podcast.pri

@ -128,32 +128,34 @@ win32 {
macx {
LIBS += -framework Foundation
LIBS += -framework Cocoa
LIBS += -framework Carbon
LIBS += -lcrypto
CONFIG(release, debug|release):CONFIG += x86
CONFIG(release, debug|release):CONFIG += x86_64
CONFIG(debug, debug|release):CONFIG += x86_64
# [03-02-2011] We must use the 32bit version for the moment
# because the Quicktime components used by this application
# are not yet available in 64bits.
CONFIG(debug, debug|release):CONFIG += x86
# TODO Craig: switch to 64bit
QMAKE_MAC_SDK = "/Developer/SDKs/MacOSX10.6.sdk"
QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.5"
QMAKE_MAC_SDK = macosx
QMAKE_MACOSX_DEPLOYMENT_TARGET = "10.10"
VERSION_RC_PATH = "$$BUILD_DIR/version_rc"
QMAKE_CXXFLAGS += -Wno-overloaded-virtual
#VERSION_RC_PATH = "$$BUILD_DIR/version_rc"
# No references to breakpad in the code =>is this still used?
# Embed version into executable for breakpad
QMAKE_LFLAGS += -sectcreate \
__DATA \
__version \
$$VERSION_RC_PATH
#QMAKE_LFLAGS += -sectcreate \
# __DATA \
# __version \
# $$VERSION_RC_PATH
QMAKE_CXXFLAGS_RELEASE += -gdwarf-2 \
-mdynamic-no-pic
QMAKE_CFLAGS += -fopenmp
QMAKE_CXXFLAGS += -fopenmp
QMAKE_LFLAGS += -fopenmp
# QMAKE_CFLAGS += -fopenmp
# QMAKE_CXXFLAGS += -fopenmp
# QMAKE_LFLAGS += -fopenmp
CONTENTS_DIR = "Contents"
RESOURCES_DIR = "Contents/Resources"
@ -364,7 +366,7 @@ macx {
system(mkdir -p $$BUILD_DIR)
system(printf \""$$OSX_VERSION"\" > $$BUILD_DIR/osx_version)
system(printf \""$$VERSION"\" > $$BUILD_DIR/version)
system(printf "%02x%02x%02x%02x" `printf $$VERSION_RC | cut -d ',' -f 1` `printf $$VERSION_RC | cut -d ',' -f 2` `printf $$VERSION_RC | cut -d ',' -f 3` `printf $$VERSION_RC | cut -d ',' -f 4` | xxd -r -p > "$$VERSION_RC_PATH")
# system(printf "%02x%02x%02x%02x" `printf $$VERSION_RC | cut -d ',' -f 1` `printf $$VERSION_RC | cut -d ',' -f 2` `printf $$VERSION_RC | cut -d ',' -f 3` `printf $$VERSION_RC | cut -d ',' -f 4` | xxd -r -p > "$$VERSION_RC_PATH")
}
linux-g++* {

@ -98,7 +98,7 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
#ifdef Q_OS_LINUX
pix->load(fileName, 0, Qt::AutoColor);
#else
pix->load(fileName, 0, Qt::AutoColor, false);
pix->load(fileName, 0, Qt::AutoColor);
#endif
}
return pix;

@ -872,7 +872,6 @@ bool UBBoardView::directTabletEvent(QEvent *event)
tEvent = new QTabletEvent(tEvent->type()
, mapFromGlobal(tEvent->pos())
, tEvent->globalPos()
, tEvent->hiResGlobalPos()
, tEvent->device()
, tEvent->pointerType()
, tEvent->pressure()
@ -905,7 +904,7 @@ QWidget *UBBoardView::widgetForTabletEvent(QWidget *w, const QPoint &pos)
QWidget *childAtPos = NULL;
QList<QObject *> childs = w->childItems();
QList<QObject *> childs = w->children();
foreach(QObject *child, childs)
{
QWidget *childWidget = qobject_cast<QWidget *>(child);

@ -33,10 +33,6 @@
#include <QFontDatabase>
#include <QStyleFactory>
#if defined(Q_OS_OSX)
#include <Carbon/Carbon.h>
#endif
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
@ -91,27 +87,6 @@ bool bIsMinimized = false;
QObject* UBApplication::staticMemoryCleaner = 0;
#if defined(Q_OS_OSX)
static OSStatus ub_appleEventProcessor(const AppleEvent *ae, AppleEvent *event, long handlerRefCon)
{
Q_UNUSED(event);
OSType aeID = typeWildCard;
OSType aeClass = typeWildCard;
AEGetAttributePtr(ae, keyEventClassAttr, typeType, 0, &aeClass, sizeof(aeClass), 0);
AEGetAttributePtr(ae, keyEventIDAttr, typeType, 0, &aeID, sizeof(aeID), 0);
if (aeClass == kCoreEventClass && aeID == kAEReopenApplication)
{
// User clicked on Uniboard in the Dock
((UBApplicationController*)handlerRefCon)->hideDesktop();
return noErr;
}
return eventNotHandledErr;
}
#endif
UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSingleApplication(id, argc, argv)
, mPreferencesController(NULL)
@ -368,11 +343,6 @@ int UBApplication::exec(const QString& pFileToImport)
if (pFileToImport.length() > 0)
UBApplication::applicationController->importFile(pFileToImport);
#if defined(Q_OS_OSX)
static AEEventHandlerUPP ub_proc_ae_handlerUPP = AEEventHandlerUPP(ub_appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, ub_proc_ae_handlerUPP, SRefCon(UBApplication::applicationController), true);
#endif
if (UBSettings::settings()->appStartMode->get().toInt())
applicationController->showDesktop();
else
@ -390,14 +360,14 @@ void UBApplication::onScreenCountChanged(int newCount)
mainWindow->actionMultiScreen->setEnabled(displayManager.numScreens() > 1);
}
#ifdef Q_OS_OSX
void UBApplication::showMinimized()
{
#ifdef Q_OS_OSX
mainWindow->hide();
bIsMinimized = true;
#endif
}
#endif
void UBApplication::startScript()
{
@ -590,11 +560,7 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event)
{
QFileOpenEvent *fileToOpenEvent = static_cast<QFileOpenEvent *>(event);
#if defined(Q_OS_OSX)
ProcessSerialNumber psn;
GetCurrentProcess(&psn);
SetFrontProcess(&psn);
#endif
UBPlatformUtils::setFrontProcess();
applicationController->importFile(fileToOpenEvent->file());
}

@ -124,9 +124,9 @@ class UBApplication : public QtSingleApplication
private slots:
void closing();
#ifdef Q_OS_OSX
//#ifdef Q_OS_OSX // for some reason this is not compiled if the ifdef is uncommented
void showMinimized();
#endif
//#endif
void onScreenCountChanged(int newCount);
private:
@ -136,10 +136,11 @@ class UBApplication : public QtSingleApplication
bool mIsVerbose;
QString checkLanguageAvailabilityForSankore(QString& language);
protected:
#if defined(Q_OS_OSX) && !defined(QT_MAC_USE_COCOA)
/*
#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA)
bool macEventFilter(EventHandlerCallRef caller, EventRef event);
#endif
*/
UBPreferencesController* mPreferencesController;
QTranslator* mApplicationTranslator;

@ -67,9 +67,6 @@
#include "ui_mainWindow.h"
#ifdef Q_OS_OSX
#include <Carbon/Carbon.h>
#endif
#include "core/memcheck.h"

@ -34,5 +34,3 @@ SOURCES += src/core/main.cpp \
src/core/UBOpenSankoreImporter.cpp \
src/core/UBTextTools.cpp \
src/core/UBPersistenceWorker.cpp

@ -26,9 +26,10 @@
#include "UBWindowCapture.h"
#include "UBDesktopAnnotationController.h"
#include <QDialog>
#import <Foundation/NSAutoreleasePool.h>
#import <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
UBWindowCapture::UBWindowCapture(UBDesktopAnnotationController *parent)

@ -203,6 +203,7 @@ public:
static UBKeyboardLocale** getKeyboardLayouts(int& nCount);
static QString urlFromClipboard();
static QStringList availableTranslations();
static void setFrontProcess();
#ifdef Q_OS_OSX
static void SetMacLocaleByIdentifier(const QString& id);

@ -429,3 +429,8 @@ QString UBPlatformUtils::urlFromClipboard()
return qsRet;
}
void UBPlatformUtils::setFrontProcess()
{
}

@ -33,6 +33,7 @@
#include <QWidget>
#import <Foundation/NSAutoreleasePool.h>
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
#import <APELite.h>
@ -51,7 +52,7 @@ OSStatus emptySetSystemUIMode (
return noErr;
}
void *originalSetSystemUIMode = 0;
//void *originalSetSystemUIMode = 0;
void UBPlatformUtils::init()
{
@ -62,7 +63,7 @@ void UBPlatformUtils::init()
// http://developer.apple.com/mac/library/documentation/Carbon/Reference/Dock_Manager/Reference/reference.html#//apple_ref/c/func/SetSystemUIMode
//
originalSetSystemUIMode = APEPatchCreate((const void *)SetSystemUIMode, (const void *)emptySetSystemUIMode);
//originalSetSystemUIMode = APEPatchCreate((const void *)SetSystemUIMode, (const void *)emptySetSystemUIMode);
setDesktopMode(false);
@ -92,9 +93,9 @@ void UBPlatformUtils::init()
void UBPlatformUtils::setDesktopMode(bool desktop)
{
{ /*
#ifndef OS_NEWER_THAN_OR_EQUAL_TO_1010
OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode;
//OSStatus (*functor)(SystemUIMode, SystemUIOptions) = (OSStatus (*)(SystemUIMode, SystemUIOptions))originalSetSystemUIMode;
if (desktop)
{
@ -105,6 +106,7 @@ void UBPlatformUtils::setDesktopMode(bool desktop)
functor(kUIModeAllHidden, 0);
}
#endif
*/
}
@ -533,13 +535,16 @@ void UBPlatformUtils::SetMacLocaleByIdentifier(const QString& id)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
const char * strName = id.toAscii().data();
const char * strName = id.toLatin1().data();
CFStringRef iName = CFStringCreateWithCString(NULL, strName, kCFStringEncodingISOLatin1 );
CFStringRef iName = CFStringCreateWithCString(NULL, strName, kCFStringEncodingMacRoman );
CFStringRef keys[] = { kTISPropertyInputSourceCategory, kTISPropertyInputSourceID };
CFStringRef values[] = { kTISCategoryKeyboardInputSource, iName };
CFDictionaryRef dict = CFDictionaryCreate(NULL, (const void **)keys, (const void **)values, 2, NULL, NULL);
// get list of current enabled keyboard layouts. dict filters the list
CFArrayRef kbds = TISCreateInputSourceList(dict, true);
if (kbds!=NULL)
{
@ -552,3 +557,17 @@ void UBPlatformUtils::SetMacLocaleByIdentifier(const QString& id)
}
[pool drain];
}
/**
* @brief Activate the current application
*/
void UBPlatformUtils::setFrontProcess()
{
NSRunningApplication* app = [NSRunningApplication currentApplication];
// activate the application, forcing focus on it
[app activateWithOptions: NSApplicationActivateIgnoringOtherApps];
// other option:NSApplicationActivateAllWindows. This won't steal focus from another app, e.g
// if the user is doing something else while waiting for OpenBoard to load
}

@ -424,3 +424,7 @@ QString UBPlatformUtils::urlFromClipboard()
// Not implemented yet
return qsRet;
}
void UBPlatformUtils::setFrontProcess()
{
}

@ -60,7 +60,7 @@ UBFloatingPalette::UBFloatingPalette(Qt::Corner position, QWidget *parent)
#endif
#ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow);
//setAttribute(Qt::WA_MacNonActivatingToolWindow); // no longer exists
setAttribute(Qt::WA_MacNoShadow);
#endif
}

@ -30,7 +30,9 @@
#include <stdio.h>
#include <CoreServices/CoreServices.h>
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
#include <QMap>
#include <QString>
@ -74,6 +76,7 @@ void UBKeyboardPalette::createCtrlButtons()
void UBKeyboardPalette::checkLayout()
{
TISInputSourceRef selectedLocale = TISCopyCurrentKeyboardInputSource();
CFStringRef sr = (CFStringRef) TISGetInputSourceProperty(selectedLocale,
@ -96,6 +99,7 @@ void UBKeyboardPalette::checkLayout()
}
}
}
}
void UBKeyboardPalette::onActivated(bool)

@ -85,7 +85,7 @@ UBMagnifier::UBMagnifier(QWidget *parent, bool isInteractive)
#endif
#ifdef Q_OS_OSX
setAttribute(Qt::WA_MacAlwaysShowToolWindow);
setAttribute(Qt::WA_MacNonActivatingToolWindow);
//setAttribute(Qt::WA_MacNonActivatingToolWindow);
setAttribute(Qt::WA_MacNoShadow);
#endif
}

@ -31,15 +31,11 @@
#include <QStyleFactory>
#include <QStyle>
#ifdef Q_OS_OSX
#include <QtGui/QMacStyle>
#endif
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
#include "board/UBBoardView.h"
#include "core/memcheck.h"
#include "core/UBApplication.h"
#include "board/UBBoardController.h"
UBRubberBand::UBRubberBand(Shape s, QWidget * p)
: QRubberBand(s, p)
@ -53,7 +49,7 @@ UBRubberBand::UBRubberBand(Shape s, QWidget * p)
#ifdef Q_OS_WIN
customStyle = new QWindowsXPStyle();
#elif defined(Q_OS_OSX)
customStyle = new QMacStyle();
customStyle = QStyleFactory::create("macintosh");
#elif defined(Q_OS_LINUX)
customStyle = QStyleFactory::create("oxygen");
#endif

@ -85,7 +85,8 @@ SOURCES += src/gui/UBThumbnailView.cpp \
src/gui/UBOpenSankoreImporterWidget.cpp \
src/gui/UBStartupHintsPalette.cpp
win32:SOURCES += src/gui/UBKeyboardPalette_win.cpp
macx:SOURCES += src/gui/UBKeyboardPalette_mac.cpp
macx:OBJECTIVE_SOURCES += src/gui/UBKeyboardPalette_mac.mm
linux-g++:SOURCES += src/gui/UBKeyboardPalette_linux.cpp
linux-g++-32:SOURCES += src/gui/UBKeyboardPalette_linux.cpp
linux-g++-64:SOURCES += src/gui/UBKeyboardPalette_linux.cpp

@ -59,9 +59,9 @@
#ifdef Q_OS_WIN
#include "windowsmedia/UBWindowsMediaVideoEncoder.h"
#include "windowsmedia/UBWaveRecorder.h"
#elif defined(Q_OS_OSX)
#include "quicktime/UBQuickTimeVideoEncoder.h"
#include "quicktime/UBAudioQueueRecorder.h"
//#elif defined(Q_OS_OSX)
// #include "quicktime/UBQuickTimeVideoEncoder.h"
// #include "quicktime/UBAudioQueueRecorder.h"
#endif
#include "core/memcheck.h"
@ -305,8 +305,8 @@ void UBPodcastController::start()
#ifdef Q_OS_WIN
mVideoEncoder = new UBWindowsMediaVideoEncoder(this); //deleted on stop
#elif defined(Q_OS_OSX)
mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
//#elif defined(Q_OS_OSX)
// mVideoEncoder = new UBQuickTimeVideoEncoder(this); //deleted on stop
#endif
if (mVideoEncoder)
@ -795,8 +795,8 @@ QStringList UBPodcastController::audioRecordingDevices()
#ifdef Q_OS_WIN
devices = UBWaveRecorder::waveInDevices();
#elif defined(Q_OS_OSX)
devices = UBAudioQueueRecorder::waveInDevices();
//#elif defined(Q_OS_OSX)
// devices = UBAudioQueueRecorder::waveInDevices();
#endif
return devices;

@ -22,13 +22,13 @@ win32 {
src/podcast/windowsmedia/UBWaveRecorder.h
}
macx {
#macx {
SOURCES += src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp \
src/podcast/quicktime/UBQuickTimeFile.cpp \
src/podcast/quicktime/UBAudioQueueRecorder.cpp
# SOURCES += src/podcast/quicktime/UBQuickTimeVideoEncoder.cpp \
# src/podcast/quicktime/UBQuickTimeFile.cpp \
# src/podcast/quicktime/UBAudioQueueRecorder.cpp
HEADERS += src/podcast/quicktime/UBQuickTimeVideoEncoder.h \
src/podcast/quicktime/UBQuickTimeFile.h \
src/podcast/quicktime/UBAudioQueueRecorder.h
}
# HEADERS += src/podcast/quicktime/UBQuickTimeVideoEncoder.h \
# src/podcast/quicktime/UBQuickTimeFile.h \
# src/podcast/quicktime/UBAudioQueueRecorder.h
#}

Loading…
Cancel
Save