Commit cc62c4d051b36488ff77933ed29c3c91f970a4b2

Authored by oliverhaag
1 parent cd5e7a37

Added OSX support provided by Florian Schirmer

openhantek/ChangeLog
@@ -78,3 +78,6 @@ @@ -78,3 +78,6 @@
78 * Made export dialog title translatable 78 * Made export dialog title translatable
79 * Fixed export shortcut 79 * Fixed export shortcut
80 * Added csv export 80 * Added csv export
  81 +
  82 +2010-09-15 Oliver Haag <oliver.haag@gmail.com>
  83 +* Added OSX patches by Florian Schirmer <jolt@tuxbox.org>, thanks :)
openhantek/OpenHantek.pro
@@ -58,6 +58,7 @@ DISTFILES += ChangeLog \ @@ -58,6 +58,7 @@ DISTFILES += ChangeLog \
58 COPYING \ 58 COPYING \
59 INSTALL \ 59 INSTALL \
60 res/images/*.png \ 60 res/images/*.png \
  61 + res/images/*.icns \
61 res/images/*.svg \ 62 res/images/*.svg \
62 translations/*.qm \ 63 translations/*.qm \
63 translations/*.ts \ 64 translations/*.ts \
@@ -105,7 +106,7 @@ unix:!macx { @@ -105,7 +106,7 @@ unix:!macx {
105 translations.path = $${PREFIX}/share/apps/openhantek/translations 106 translations.path = $${PREFIX}/share/apps/openhantek/translations
106 INCLUDEPATH += /usr/include/libusb 107 INCLUDEPATH += /usr/include/libusb
107 DEFINES += QMAKE_TRANSLATIONS_PATH=\\\"$${translations.path}\\\" \ 108 DEFINES += QMAKE_TRANSLATIONS_PATH=\\\"$${translations.path}\\\" \
108 - OS_UNIX 109 + OS_UNIX VERSION=\\\"$${VERSION}\\\"
109 } 110 }
110 macx { 111 macx {
111 isEmpty(PREFIX):PREFIX = OpenHantek.app 112 isEmpty(PREFIX):PREFIX = OpenHantek.app
@@ -114,8 +115,11 @@ macx { @@ -114,8 +115,11 @@ macx {
114 # Installation directories 115 # Installation directories
115 target.path = $${PREFIX}/Contents/MacOS 116 target.path = $${PREFIX}/Contents/MacOS
116 translations.path = $${PREFIX}/Contents/Resources/translations 117 translations.path = $${PREFIX}/Contents/Resources/translations
117 - DEFINES += QMAKE_TRANSLATIONS_PATH=\\\"Contents/Resources/translations\\\" \  
118 - OS_DARWIN 118 + INCLUDEPATH += src
  119 + LIBS += -framework IOKit -framework CoreFoundation
  120 + ICON = res/images/openhantek.icns
  121 + DEFINES += QMAKE_TRANSLATIONS_PATH=\"Contents/Resources/translations\" \
  122 + OS_DARWIN VERSION=\"$${VERSION}\"
119 } 123 }
120 win32 { 124 win32 {
121 isEmpty(PREFIX):PREFIX = OpenHantek 125 isEmpty(PREFIX):PREFIX = OpenHantek
@@ -125,12 +129,11 @@ win32 { @@ -125,12 +129,11 @@ win32 {
125 target.path = $${PREFIX} 129 target.path = $${PREFIX}
126 translations.path = $${PREFIX}/translations 130 translations.path = $${PREFIX}/translations
127 DEFINES += QMAKE_TRANSLATIONS_PATH=\\\"translations\\\" \ 131 DEFINES += QMAKE_TRANSLATIONS_PATH=\\\"translations\\\" \
128 - OS_WINDOWS 132 + OS_WINDOWS VERSION=\\\"$${VERSION}\\\"
129 } 133 }
130 translations.files += translations/*.qm 134 translations.files += translations/*.qm
131 INSTALLS += target \ 135 INSTALLS += target \
132 translations 136 translations
133 -DEFINES += VERSION=\\\"$${VERSION}\\\"  
134 137
135 # Custom target "doc" for Doxygen 138 # Custom target "doc" for Doxygen
136 doxygen.target = doc 139 doxygen.target = doc
openhantek/res/images/openhantek.icns 0 → 100644
No preview for this file type
openhantek/src/dsowidget.cpp
@@ -443,6 +443,7 @@ bool DsoWidget::exportAs() { @@ -443,6 +443,7 @@ bool DsoWidget::exportAs() {
443 443
444 QFileDialog fileDialog((QWidget *) this->parent(), tr("Export file..."), QString(), filters.join(";;")); 444 QFileDialog fileDialog((QWidget *) this->parent(), tr("Export file..."), QString(), filters.join(";;"));
445 fileDialog.setFileMode(QFileDialog::AnyFile); 445 fileDialog.setFileMode(QFileDialog::AnyFile);
  446 + fileDialog.setAcceptMode(QFileDialog::AcceptSave);
446 if(fileDialog.exec() != QDialog::Accepted) 447 if(fileDialog.exec() != QDialog::Accepted)
447 return false; 448 return false;
448 449