Commit d0b0453b authored by Herrie's avatar Herrie Committed by Pekka Vuorela

Make things more platform independent and allow custom fonts

Signed-off-by: default avatarHerman van Hazendonk <github.com@herrie.org>
parent 4f76e2ed
/*
Copyright 2011-2012 Heikki Holstila <heikki.holstila@gmail.com>
This file is part of FingerTerm.
FingerTerm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
FingerTerm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FingerTerm. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QGuiApplication>
#include "dbusadaptor.h"
#include "mainwindow.h"
#ifdef MEEGO_EDITION_HARMATTAN
DbusAdaptor::DbusAdaptor(QObject *parent):
MApplicationService("org.hqh.fingerterm", parent),
mainWin(0)
{
}
DbusAdaptor::~DbusAdaptor()
{
}
void DbusAdaptor::launch()
{
MApplicationService::launch();
if (mainWin) {
mainWin->raise();
}
}
void DbusAdaptor::launch(const QStringList &parameters)
{
if (parameters.contains("new"))
launchAnotherWithQProcess();
else
launch();
}
void DbusAdaptor::handleServiceRegistrationFailure()
{
// for some reason the subsequent instances get the default "com.nokia..." prefix
incrementAndRegister();
}
#endif // MEEGO_EDITION_HARMATTAN
/*
Copyright 2011-2012 Heikki Holstila <heikki.holstila@gmail.com>
This file is part of FingerTerm.
FingerTerm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
FingerTerm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FingerTerm. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DBUSADAPTOR_H
#define DBUSADAPTOR_H
#include "qplatformdefs.h"
class MainWindow;
#ifdef MEEGO_EDITION_HARMATTAN
// handles dbus registration & multiple instances on harmattan
#include <MApplicationService>
class DbusAdaptor : public MApplicationService
{
Q_OBJECT
public:
explicit DbusAdaptor(QObject *parent = 0);
virtual ~DbusAdaptor();
public slots:
virtual void launch();
virtual void launch(const QStringList &parameters);
virtual void handleServiceRegistrationFailure();
void setAppWindow(MainWindow* win) { mainWin = win; }
private:
Q_DISABLE_COPY(DbusAdaptor)
MainWindow* mainWin;
};
#endif // MEEGO_EDITION_HARMATTAN
#endif // DBUSADAPTOR_H
......@@ -2,6 +2,24 @@ QT = core gui qml quick dbus
CONFIG += link_pkgconfig
enable-feedback {
QT += feedback
DEFINES += HAVE_FEEDBACK
}
enable-nemonotifications {
PKGCONFIG += nemonotifications-qt5
}
isEmpty(DEFAULT_FONT) {
DEFINES += DEFAULT_FONTFAMILY=\\\"monospace\\\"
}
defined(DEFAULT_FONT)
{
DEFINES += DEFAULT_FONTFAMILY=\\\"$$DEFAULT_FONT\\\"
}
TEMPLATE = app
TARGET = fingerterm
DEPENDPATH += .
......@@ -40,10 +58,8 @@ OTHER_FILES += \
RESOURCES += \
resources.qrc
unix {
target.path = /usr/bin
INSTALLS += target
}
target.path = /usr/bin
INSTALLS += target
contains(MEEGO_EDITION,nemo) {
desktopfile.extra = cp $${TARGET}.desktop.nemo $${TARGET}.desktop
......
......@@ -166,9 +166,9 @@ int main(int argc, char *argv[])
} else
view.show();
#ifdef RESIZE_ROOT_QML_TO_VIEW
view.setResizeMode(QQuickView::SizeRootObjectToView);
#endif
#ifdef RESIZE_ROOT_QML_TO_VIEW
view.setResizeMode(QQuickView::SizeRootObjectToView);
#endif
PtyIFace ptyiface(pid, socketM, &term,
settings->value("terminal/charset").toString());
......@@ -200,7 +200,7 @@ void defaultSettings(QSettings* settings)
if(!settings->contains("ui/keyboardLayout"))
settings->setValue("ui/keyboardLayout", "english");
if(!settings->contains("ui/fontFamily"))
settings->setValue("ui/fontFamily", DEFAULT_FINGERTERM_FONTFAMILY);
settings->setValue("ui/fontFamily", DEFAULT_FONTFAMILY);
if(!settings->contains("ui/fontSize"))
settings->setValue("ui/fontSize", 11);
if(!settings->contains("ui/keyboardMargins"))
......
fingerterm (1.0.3) unstable; urgency=low
* Fix hexadecimal escape sequence parsing
-- Heikki Holstila <heikki.holstila@gmail.com> Fri, 22 Feb 2013 18:10:19 +0300
fingerterm (1.0.2) unstable; urgency=low
* Fixed bug in handling of certain escape sequences (fixes mosh)
-- Heikki Holstila <heikki.holstila@gmail.com> Tue, 05 Jun 2012 20:10:19 +0300
fingerterm (1.0.1) unstable; urgency=low
* Workaround for URL grabber functionality with scrolled buffer
* Depend on openssh-client
-- Heikki Holstila <heikki.holstila@gmail.com> Tue, 14 Feb 2012 18:06:29 +0200
fingerterm (1.0.0) unstable; urgency=low
* UI for choosing a keyboard layout
* slider for adjusting keyboard fade-out delay
* rendering performance improvements & other UI tweaks
* selection bugfixes
-- Heikki Holstila <heikki.holstila@gmail.com> Thu, 02 Feb 2012 21:13:10 +0200
fingerterm (0.9.3~beta) unstable; urgency=low
* selectable finger drag mode (gestures/scroll/selection)
* support for buffer scrolling and text selection
* support for multiple instances ("new window" menu item)
* improved bell notification when in background
* charset option in config file (default: UTF-8)
* default keyboard layout is now "english" ("finnish" also included)
* performance improvements
-- Heikki Holstila <heikki.holstila@gmail.com> Sun, 08 Jan 2012 19:04:31 +0200
fingerterm (0.9.2~beta) unstable; urgency=low
* configurable keyboard layout
* virtual keyboard behavior setting: off/fade/move
* keypress feedback
* improved pan gestures
* other smaller tweaks and improvements
-- Heikki Holstila <heikki.holstila@gmail.com> Thu, 24 Nov 2011 20:26:47 +0200
fingerterm (0.9.1~beta) unstable; urgency=low
* various terminal control sequence related bugfixes
* basic pan gesture support (pan left/right to change channels in irssi)
* some ui tweaks
-- Heikki Holstila <heikki.holstila@gmail.com> Thu, 20 Oct 2011 23:08:51 +0300
fingerterm (0.9.0~beta) unstable; urgency=low
* Initial Release (beta, work in progress)
-- Heikki Holstila <heikki.holstila@gmail.com> Thu, 20 Oct 2011 21:39:16 +0300
Source: fingerterm
Section: user/other
Priority: optional
Maintainer: Heikki Holstila <heikki.holstila@gmail.com>
Build-Depends: debhelper (>= 5), libc6-dev, libqt4-dev, libmeegotouch-dev
Standards-Version: 3.7.3
Homepage: http://hqh.unlink.org/harmattan
Package: fingerterm
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, openssh-client
Description: A terminal emulator with a custom virtual keyboard
A terminal emulator with a custom virtual keyboard and usability-enhancing
features such as URL grabber, pan gestures and customizable shortcut menu.
Designed especially to be used with screen and irssi.
XSBC-Maemo-Display-Name: FingerTerm
XB-MeeGo-Desktop-Entry-Filename: fingerterm
XB-Maemo-Flags: visible
XB-MeeGo-Desktop-Entry:
[Desktop Entry]
Type=Application
Name=FingerTerm
Icon=/usr/share/icons/hicolor/80x80/apps/fingerterm.png
XB-Maemo-Icon-26:
iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAALEwAACxMBAJqcGAAAC+lJREFUeJztXG1sHMUZfmZmd8++fDkmoQ6xnZOgBpKSXKgomFjKORH8
QtRJVVX8SXICItxesPMrFEWYqBT4UYiTGJKqpUlU8QMigUutRiUSdwET0waaU1UlqFbiSwKBqJg4
kbiP3dmZ/riP7J7vY+989p0tHmmkm5l33pl97n3nexf4HlMCmamK/jE87JWK4mGEeEHpIkqpFwAY
IR7KmKccncI0I6aUEQAQQoQhxHVTyjDhPHJ/R0e4cq3Pj2kh8Eww2JCor/cxQtZTRfGqiuJL53HO
IaWEME0AgBACQghbeSnlpDRKKQghk9IopcnfjIEQAkVRMvkG5yHBediU8qQrFgut7eycqOiDooIE
joyMeBghXYqibFUUxSulBDdNCNME5xxmirCZAmMMiqKAMgYlRS7nPMw5P2pKOdje3h6pRD1TJnBk
ZMSnqWqPqihdQggYnIMbxowTVgyMMSiqClVRQCmFwf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QeU+AHGgYEBr9D1dyXg6Ax5NiG1URChmrYpUMRtbeVKqSQQCIRNQtYy
RemfK/1i2mWZovSbhKwthTxgCh+hPXDggE8K0SdN0+f4Xk0NIbM5wFiIULpnx44dobL0TLUhBw4c
8AnT7JGm2QXU/hlJ2msIY4OUsX3lEpfRV4lGAcDBgwc9XNe7hGlulVJmvilQbUKzPhQUpowdVTRt
sLu7O1IR/ZVQko29e/c2aIz5TCHWS8ArTdNnzZ8uUrP7ZMJYiABhRulJ3TRDO3furN1PwRfDwMCA
lwjhEVJ6pZSLJJC0UtP0yNSLe6WCABEwFkn9DhNCrlNCwpLSSKmDwfeoEv4PzkKXcKOscjIAAAAA
SUVORK5CYII=
Copyright 2011-2012 Heikki Holstila <heikki.holstila@gmail.com>
FingerTerm is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
FingerTerm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with FingerTerm. If not, see <http://www.gnu.org/licenses/>.
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
configure: configure-stamp
configure-stamp:
dh_testdir
# qmake PREFIX=/usr# Uncomment this line for use without Qt Creator
touch configure-stamp
build: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
# $(MAKE) # Uncomment this line for use without Qt Creator
#docbook-to-man debian/fingerterm.sgml > fingerterm.1
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
$(MAKE) clean
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/fingerterm.
$(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/fingerterm install
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_python
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_makeshlibs
dh_installdeb
# dh_shlibdeps # Uncomment this line for use without Qt Creator
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
......@@ -33,7 +33,7 @@ Provides: meego-terminal > 0.2.2
%build
sed -i 's,/opt/fingerterm/,/usr/,' fingerterm.pro
qmake -qt=5 MEEGO_EDITION=nemo PKGCONFIG+=nemonotifications-qt5 QT+=feedback DEFINES+=HAVE_FEEDBACK DEFINES+=DEFAULT_FINGERTERM_FONTFAMILY=\\\"monospace\\\"
qmake -qt=5 MEEGO_EDITION=nemo CONFIG+=enable-feedback CONFIG+=enable-nemonotifications
# Inject version number from RPM into source
sed -i -e 's/PROGRAM_VERSION="[^"]*"/PROGRAM_VERSION="%{version}"/g' version.h
make %{?_smp_mflags}
......
#!/bin/bash
changelog="qtc_packaging/debian_harmattan/changelog"
ver=`cat $changelog | sed -n -e '1p'| cut -d ' ' -f 2 | tr -d "()" | cut -d '-' -f 1`
echo -e \
"#ifndef VERSION_H\n"\
"#define VERSION_H\n"\
"const QString PROGRAM_VERSION=\"$ver\";\n"\
"#endif\n"\
> version.h
......@@ -140,9 +140,9 @@ void Util::keyPressFeedback()
if( !settingsValue("ui/keyPressFeedback").toBool() )
return;
#ifdef HAVE_FEEDBACK
#ifdef HAVE_FEEDBACK
QFeedbackEffect::playThemeEffect(QFeedbackEffect::PressWeak);
#endif
#endif
}
void Util::keyReleaseFeedback()
......@@ -151,9 +151,9 @@ void Util::keyReleaseFeedback()
return;
// TODO: check what's more comfortable, only press, or press and release
#ifdef HAVE_FEEDBACK
#ifdef HAVE_FEEDBACK
QFeedbackEffect::playThemeEffect(QFeedbackEffect::ReleaseWeak);
#endif
#endif
}
void Util::bellAlert()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment