Skip to content

Commit

Permalink
Merge branch 'master' into portable_build
Browse files Browse the repository at this point in the history
  • Loading branch information
melak committed Jul 14, 2019
2 parents 121e3c4 + e2db8d3 commit fcf91ac
Show file tree
Hide file tree
Showing 34 changed files with 458 additions and 157 deletions.
36 changes: 27 additions & 9 deletions HISTORY
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
2019-07-12: release 2.4.2

* Windows version: The new Ctrl-A, Ctrl-I, and Ctrl-T shortcuts (Paper Advance,
Copy Print-Out as Image, and Copy Print-Out as Text) didn't work, because I
hadn't updated the corresponding accelerator resources. Fixed.
* Windows and Linux versions: All Ctrl-<Key> shortcuts now work even when the
Print-Out window is on top.
* Android, iPhone, and Mac versions: When loading a skin in the skin browser,
they now force an un-cached load, so skin fixes can actually be loaded by
users without delay, and without having to resort to side-loading.
* Android and iPhone versions: Changed default landscape skin, from
desktop/42ct to android/SGS-L. The old skin had keys below the display that
didn't line up with the menus; you really have to have Σ+ 1/x √x LOG LN XEQ
below the display for a consistent user interface.
* iPhone version: Changed Standard-X skin, from Ehrling42sl.X to Matt42X. The
old skin was rather blurry; the new skin has nice and crisp text for all key
labels.

2019-07-03: release 2.4.1

* Fixed several bugs in BWRAP mode.
Expand Down Expand Up @@ -29,7 +47,7 @@
clipboard.)
* Mac version: Copy Print-Out as Image didn't handle wrap-around in the image
buffer correctly. Fixed.
* Windows and GTK version: Implemented Paper Advance, Copy Print-Out as Text,
* Windows and Linux version: Implemented Paper Advance, Copy Print-Out as Text,
and Copy Print-Out as Image.
* iPhone version: Fixed the top-of-screen menu trigger so that it no longer
sabotages keys that are also in that area, as in the HP_Mega_42 and SGS-L
Expand Down Expand Up @@ -84,7 +102,7 @@
behaviors for unshifted and shifted menu keys.
* Windows version: Changed sounds from using the Beep() function to playing
wav sounds using the PlaySound() function, matching the way sounds are played
in the Android, iOS, and Mac versions.
in the Android, iPhone, and Mac versions.
* MacDashboard version: Didn't recognize comma as decimal key. Fixed.

2019-04-07: release 2.2
Expand Down Expand Up @@ -371,8 +389,8 @@
* Fixed pasting of SIZE lines.
* When pasting numbers, spaces are now allowed as thousands separators.
* Mac and MacDashboard versions: Are now 64-bit.
* Mac and GTK versions: Fixed Caps Lock handling, so Caps Lock + Esc no longer
exits.
* Mac and Linux versions: Fixed Caps Lock handling, so Caps Lock + Esc no
longer exits.
* Android and iPhone versions: Implemented "continuous on" mode (ON function,
flag 44).

Expand Down Expand Up @@ -417,7 +435,7 @@
second after printing stops. This makes it more noticeable, so printing is
less likely to go unnoticed on fast devices.
* Mac version: Implemented battery checker.
* GTK version: Added /sys/class/power_supply support in battery checker.
* Linux version: Added /sys/class/power_supply support in battery checker.

2017-12-26: release 2.0.8

Expand Down Expand Up @@ -531,7 +549,7 @@
* Android version: Made state file writing more robust. If writing the state
file fails, it now keeps the previous one, instead of leaving behind a
partial or corrupt one.
* GTK version, Free42 Binary only: Some (recent?) versions of GTK set the
* Linux version, Free42 Binary only: Some (recent?) versions of GTK set the
LC_NUMERIC locale, which Free42 expects to always be "C". This causes number
entry and display to be messed up in locales where the decimal is not ".",
including most of Europe. I added code to force LC_NUMERIC back to "C" after
Expand Down Expand Up @@ -743,7 +761,7 @@
* All versions except Android: while parsing macros in skin layout files, tab
characters were not recognized as whitespace and caused parsing to fail.
Fixed.
* GTK version did not repaint the skin when it was switched from one skin to
* Linux version did not repaint the skin when it was switched from one skin to
another with the same width and height. Fixed.
* Windows version: Downgraded my build environment from Visual C++ 2012 to 6.0.
This means the Free42 build for Windows will run on older versions of Windows
Expand Down Expand Up @@ -814,8 +832,8 @@

* iPhone version: In the HTTP Server view, tapping on the server URL switches
between the DNS name and the IP address.
* GTK version: Now uses ALSA to play BEEP and TONE sounds (but not when running
on remote displays).
* Linux version: Now uses ALSA to play BEEP and TONE sounds (but not when
running on remote displays).

2012-07-29: release 1.4.74b (Android only)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.1
2.4.2
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "com.thomasokken.free42"
minSdkVersion 14
targetSdkVersion 28
versionCode 98
versionName "2.3.1"
versionCode 102
versionName "2.4.2"
}
buildTypes {
debug {
Expand Down
Binary file modified android/app/src/main/assets/Landscape.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
115 changes: 58 additions & 57 deletions android/app/src/main/assets/Landscape.layout
Original file line number Diff line number Diff line change
@@ -1,57 +1,58 @@
# HP-42S skin for Free42 (Windows and Unix)

Skin: 0,0,640,402
Display: 61,47 3 3 6b836b 0b2327

Annunciator: 1 72,32,17,11 0,403
Annunciator: 2 93,32,20,11 18,403
Annunciator: 3 116,32,22,12 39,403
Annunciator: 4 141,33,15,12 62,403
Annunciator: 5 159,35,20,8 78,406
Annunciator: 6 182,34,5,9 99,405
Annunciator: 7 187,34,14,9 104,405

Key: 1 516,344,42,34 516,345,42,36 516,346
Key: 2 268,152,42,34 268,153,42,36 268,154
Key: 3 82,152,42,34 82,153,42,36 82,154
Key: 4 144,152,42,34 144,153,42,36 144,154
Key: 5 206,152,42,34 206,153,42,36 206,154
Key: 6 82,216,42,34 82,217,42,36 82,218
Key: 7 206,344,42,34 206,345,42,36 206,346
Key: 8 268,344,42,34 268,345,42,36 268,346
Key: 9 144,280,42,34 144,281,42,36 144,282
Key: 10 144,216,42,34 144,217,42,36 144,218
Key: 11 206,216,42,34 206,217,42,36 206,218
Key: 12 268,216,42,34 268,217,42,36 268,218
Key: 13 330,280,42,98 330,281,42,100 330,282
Key: 14 206,280,42,34 206,281,42,36 206,282
Key: 15 330,152,42,34 330,153,42,36 330,154
Key: 16 330,216,42,34 330,217,42,36 330,218
Key: 17 268,280,42,34 268,281,42,36 268,282
Key: 18 20,152,42,34 20,153,42,36 20,154
Key: 19 392,152,42,34 392,153,42,36 392,154
Key: 20 454,152,42,34 454,153,42,36 454,154
Key: 21 516,152,42,34 516,153,42,36 516,154
Key: 22 578,152,42,34 578,153,42,36 578,154
Key: 23 20,216,42,34 20,217,42,36 20,218
Key: 24 392,216,42,34 392,217,42,36 392,218
Key: 25 454,216,42,34 454,217,42,36 454,218
Key: 26 516,216,42,34 516,217,42,36 516,218
Key: 27 578,216,42,34 578,217,42,36 578,218
Key: 28 144,344,42,34 144,345,42,36 144,346
Key: 29 392,280,42,34 392,281,42,36 392,282
Key: 30 454,280,42,34 454,281,42,36 454,282
Key: 31 516,280,42,34 516,281,42,36 516,282
Key: 32 578,280,42,34 578,281,42,36 578,282
Key: 33 20,344,42,34 20,345,42,36 20,346
Key: 34 392,344,42,34 392,345,42,36 392,346
Key: 35 454,344,42,34 454,345,42,36 454,346
Key: 36 20,280,42,34 20,281,42,36 20,282
Key: 37 578,344,42,34 578,345,42,36 578,346
Key: 38,39 82,280,42,34 82,281,42,36 82,282
Key: 40,41 82,344,42,34 82,345,42,36 82,346

Macro: 38 "R↑"
Macro: 39 "CLST"
Macro: 40 "SST→"
Macro: 41 "SST↑"
# Skin for Free42 Landscape Mode
# By Günter Schink for Samsung Galaxy i9000 GT
# Revised by KD0GLS

Skin: 0,0,800,432
Display: 12,87 3 4 6b836b 000000

Key: 1 6,185,064,70 6,185,064,70 8,187
Key: 2 75,185,064,70 75,185,064,70 77,187
Key: 3 143,185,064,70 143,185,064,70 145,187
Key: 4 210,185,064,70 210,185,064,70 212,187
Key: 5 278,185,064,70 278,185,064,70 280,187
Key: 6 346,185,064,70 346,185,064,70 348,187

Key: 7 6,267,064,70 6,267,064,70 8,269
Key: 8 75,267,064,70 75,267,064,70 77,269
Key: 9 143,267,064,70 143,267,064,70 145,269
Key: 10 210,267,064,70 210,267,064,70 212,269
Key: 11 278,267,064,70 278,267,064,70 280,269
Key: 12 346,267,064,70 346,267,064,70 348,269

Key: 13 278,350,132,70 278,350,132,70 280,352
Key: 14 6,350,064,70 6,350,064,70 8,352
Key: 15 75,350,064,70 75,350,064,70 77,352
Key: 16 143,350,064,70 143,350,064,70 145,352
Key: 17 210,350,064,70 210,350,064,70 212,352

Key: 18 430,350,083,70 430,350,083,70 432,352
Key: 19 430,019,083,70 430,019,083,70 432,021
Key: 20 521,019,083,70 521,019,083,70 523,021
Key: 21 612,019,083,70 612,019,083,70 614,021
Key: 22 703,019,083,70 703,019,083,70 705,021

Key: 23 521,350,083,70 521,350,083,70 523,352
Key: 24 430,101,083,70 430,101,083,70 432,103
Key: 25 521,101,083,70 521,101,083,70 523,103
Key: 26 612,101,083,70 612,101,083,70 614,103
Key: 27 703,101,083,70 703,101,083,70 705,103

Key: 28 612,350,083,70 612,350,083,70 614,352
Key: 29 430,184,083,70 430,184,083,70 432,186
Key: 30 521,184,083,70 521,184,083,70 523,186
Key: 31 612,184,083,70 612,184,083,70 614,186
Key: 32 703,184,083,70 703,184,083,70 705,186

Key: 33 703,350,083,70 703,350,083,70 705,352
Key: 34 430,267,083,70 430,267,083,70 432,269
Key: 35 521,267,083,70 521,267,083,70 523,269
Key: 36 612,267,083,70 612,267,083,70 614,269
Key: 37 703,267,083,70 703,267,083,70 705,269

Annunciator: 1 18,65,30,19 9,450 #up-dn
Annunciator: 2 52,65,24,19 44,450 #shift
Annunciator: 3 79,65,37,19 71,450 #print
Annunciator: 4 119,65,19,19 112,450 #wait
Annunciator: 5 144,65,31,19 140,450 #bat
Annunciator: 6 183,65,10,19 176,450 #grad
Annunciator: 7 193,65,30,19 186,450 #rad
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ private void loadFile(String url, String fileName) throws IOException {
OutputStream os = null;
try {
HttpURLConnection con = (HttpURLConnection) new URL(url).openConnection();
con.setUseCaches(false);
int resCode = con.getResponseCode();
if (resCode != 200)
throw new IOException("Response code " + resCode);
Expand Down
2 changes: 1 addition & 1 deletion android/version.code
Original file line number Diff line number Diff line change
@@ -1 +1 @@
101
102
15 changes: 4 additions & 11 deletions build-android
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,16 @@

mkdir -p packages

mkdir android-tmp
cd android-tmp
svn checkout svn://mactv/free42/trunk free42
cd free42/android/app
cd android/app
cp build.gradle build.gradle.bak
read -p "Keystore Password: " SPWD
sed -i '' "s/storePassword '[^']*'/storePassword '$SPWD'/" build.gradle
read -p "Key Password: " KPWD
sed -i '' "s/keyPassword '[^']*'/keyPassword '$KPWD'/" build.gradle
VERSION_CODE=`cat ../version.code`
sed -i '' "s/versionCode [0-9]*/versionCode $VERSION_CODE/" build.gradle
VERSION_NAME=`cat ../../VERSION`
sed -i '' "s/versionName \"[^\"]*\"/versionName \"$VERSION_NAME\"/" build.gradle
cd src/main/cpp
sh ./link-files-release.sh
sh ./build-intel-lib.sh
cd ../../../..
./gradlew --warning-mode all assembleRelease
mv app/build/outputs/apk/release/app-release.apk ../../../packages/Free42Android.apk
cd ../../..
rm -rf android-tmp
mv app/build.gradle.bak app/build.gradle
mv app/build/outputs/apk/release/app-release.apk ../packages/Free42Android.apk
5 changes: 0 additions & 5 deletions build-mac
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

mkdir -p packages

cd util
cc -o set-version-in-info-plist set-version-in-info-plist.c
cd ..

cd mac
rm -rf "build/Release Binary"
rm -rf "build/Release Decimal"
../util/set-version-in-info-plist
xcodebuild -project Free42.xcodeproj -target Free42 -configuration "Release Binary" build
xcodebuild -project Free42.xcodeproj -target Free42 -configuration "Release Decimal" build
mkdir tmp
Expand Down
20 changes: 16 additions & 4 deletions build-src-doc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

# This script builds the regular and upstream source packages,
# and a minimally HTMLified version of HISTORY.
# If the -u option is specified, skips creation of the upstream packages.

if [ $# -ge 1 -a $1 = "-u" ]
then
SKIP_UPSTREAM=1
shift
else
SKIP_UPSTREAM=0
fi

mkdir -p packages

Expand All @@ -17,10 +26,13 @@ rm -rf tmp

# "Upstream" source package, for Fedora or other Linux distros
# Has all non-Linux versions, and all skins containing the HP logo, removed
cd upstream
sh ./build-nologo
sh ./build-macports
cd ..
if [ $SKIP_UPSTREAM -eq 0 ]
then
cd upstream
sh ./build-nologo
sh ./build-macports
cd ..
fi

# Wrap it all up...
cd util
Expand Down
44 changes: 44 additions & 0 deletions gtk/shell_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ static void delete_cb(GtkWidget *w, gpointer cd);
static void delete_print_cb(GtkWidget *w, gpointer cd);
static gboolean expose_cb(GtkWidget *w, GdkEventExpose *event, gpointer cd);
static gboolean print_expose_cb(GtkWidget *w, GdkEventExpose *event, gpointer cd);
static gboolean print_key_cb(GtkWidget *w, GdkEventKey *event, gpointer cd);
static gboolean button_cb(GtkWidget *w, GdkEventButton *event, gpointer cd);
static gboolean key_cb(GtkWidget *w, GdkEventKey *event, gpointer cd);
static void enable_reminder();
Expand Down Expand Up @@ -567,6 +568,8 @@ int main(int argc, char *argv[]) {
gtk_container_add(GTK_CONTAINER(view), print_widget);
print_adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(scroll));
g_signal_connect(G_OBJECT(print_widget), "expose_event", G_CALLBACK(print_expose_cb), NULL);
GTK_WIDGET_SET_FLAGS(print_widget, GTK_CAN_FOCUS);
g_signal_connect(G_OBJECT(print_widget), "key-press-event", G_CALLBACK(print_key_cb), NULL);

gtk_widget_show(print_widget);
gtk_widget_show(view);
Expand Down Expand Up @@ -1727,6 +1730,47 @@ static gboolean print_expose_cb(GtkWidget *w, GdkEventExpose *event, gpointer cd
return TRUE;
}

static gboolean print_key_cb(GtkWidget *w, GdkEventKey *event, gpointer cd) {

// This is a bit hacky, but I want the Ctrl-<Key>
// shortcuts to work even when the Print-Out window
// is on top.

if (event->type != GDK_KEY_PRESS)
return TRUE;
if (event->hardware_keycode == active_keycode)
// Auto-repeat
return TRUE;

bool ctrl = (event->state & GDK_CONTROL_MASK) != 0;
bool alt = (event->state & GDK_MOD1_MASK) != 0;
bool shift = (event->state & GDK_SHIFT_MASK) != 0;
if (!ctrl || alt || shift)
return TRUE;

switch (event->keyval) {
case GDK_a:
paperAdvanceCB();
break;
case GDK_t:
copyPrintAsTextCB();
break;
case GDK_i:
copyPrintAsImageCB();
break;
case GDK_q:
quit();
break;
case GDK_c:
copyCB();
break;
case GDK_v:
pasteCB();
break;
}
return TRUE;
}

static void shell_keydown() {
int repeat, keep_running;
if (skey == -1)
Expand Down
1 change: 1 addition & 0 deletions iphone/Classes/DeleteSkinView.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
NSMutableArray *skinNames;
UIBarButtonItem *doneButton;
UITableView *skinTable;
int selectedIndex[2];
}

@property (nonatomic, retain) IBOutlet UIBarButtonItem *doneButton;
Expand Down
Loading

0 comments on commit fcf91ac

Please sign in to comment.