Commit 7ba20b06 authored by Alf Gaida's avatar Alf Gaida

Cherry-picking upstream version 0.14.0.

* Bumped Standards to 4.3.0, no changes needed
* Dropped d/compat, use debhelper-compat = 12, no changes needed
* Fixed years in d/copyright
* Added CC0 for qterminal.appdata.xml
* Bumped minimum versions libqtermwidget5-0-dev (>= 0.14.0~)
* Bumped minimum version lxqt-build-tools (>= 0.6.0~)
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
* Added l10n-package, moved from lxqt-l10n
* Added d/upstream/metadata
parent ec258e0b
qterminal-0.14.0 / 2019-01-25
=============================
* Bumped version to 0.14.0
The big bump was needed to prevent conflicts with translations that
were former built out of lxqt-l10n and have version 0.13.0
* New implemented:
- Added terminal margins
- Added history-based tab switching
* Implementation fixes:
- main: Fixed translation loading
- propertiesdialog: Smaller settings dialog
- propertiesdialog: Prevent TAB from changing focus in shortcut editor
- Suppress compilation warnings
- Don't use automatic string conversions
- Remember the maximization state of the window
- Refactored Limit/limit -> Fixed/fixed tabwitdh
- Refactor STR_VERSION -> QTERMINAL_VERSION
* Improved cmake scripting
- Set cmake_minimum_required to 3.1.0
- Removed locale compile definitons
* Moved translations from lxqt-l10n back to qterminal
- Removed obsolete translation fuctionality
- Added translation promo in README.md
qterminal-0.9.0 / 2018-05-21
============================
......@@ -44,7 +69,7 @@ qterminal-0.9.0 / 2018-05-21
* Add RTL support button
* Update Catalan translation
0.8.0 / 2017-10-21
qterminal-0.8.0 / 2017-10-21
==================
* Release 0.8.0: Update changelog
......@@ -90,7 +115,7 @@ qterminal-0.9.0 / 2018-05-21
* Fix a copy/paste error from 4afcc4d0d0922f526f89aadf16ec0517f6b5267e
* Update dependencies and cleanup trailing spaces
0.7.1 / 2016-12-21
qterminal-0.7.1 / 2016-12-21
==================
* Release 0.7.1: Update changelog
......@@ -108,7 +133,7 @@ qterminal-0.9.0 / 2018-05-21
* Show exit confirmation dialog when closing the last window tab (#242)
* remove "building with cpack" from CMakeLists.txt - not used anymore Added very basic .gitattributes
0.7.0 / 2016-09-24
qterminal-0.7.0 / 2016-09-24
==================
* Release 0.7.0: Add changelog
......@@ -209,7 +234,7 @@ qterminal-0.9.0 / 2018-05-21
* Rework settings window
* Fixed translation (added tr() for some combo boxes in properties dialog).
0.6.0 / 2014-10-21
qterminal-0.6.0 / 2014-10-21
==================
* Release 0.6.0
......@@ -238,7 +263,7 @@ qterminal-0.9.0 / 2018-05-21
* Fixed install qterminal incon
* Simple profile support
0.5.0 / 2014-05-27
qterminal-0.5.0 / 2014-05-27
==================
* basic Qt5 port
......
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# CMP0000: Call the cmake_minimum_required() command at the beginning of the top-level
# CMakeLists.txt file even before calling the project() command.
# The cmake_minimum_required(VERSION) command implicitly invokes the cmake_policy(VERSION)
# command to specify that the current project code is written for the given range of CMake
# versions.
project(qterminal)
include(GNUInstallDirs)
# qterminal version
set(STR_VERSION "0.9.0")
set(LXQTBT_MINIMUM_VERSION "0.5.0")
set(QTERMWIDGET_MINIMUM_VERSION "0.9.0")
set(QTERMINAL_VERSION "0.14.0")
option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
# we need qpa/qplatformnativeinterface.h for global shortcut
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
if(APPLE)
elseif(UNIX)
find_package(Qt5X11Extras REQUIRED)
find_package(Qt5DBus)
# Minimum Versions
set(LXQTBT_MINIMUM_VERSION "0.6.0")
set(QTERMWIDGET_MINIMUM_VERSION "0.14.0")
set(QT_MINIMUM_VERSION "5.7.1")
find_package(Qt5Gui ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5LinguistTools ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5Widgets ${QT_MINIMUM_VERSION} REQUIRED)
if(UNIX)
find_package(Qt5DBus ${QT_MINIMUM_VERSION} REQUIRED)
find_package(Qt5X11Extras ${QT_MINIMUM_VERSION} REQUIRED)
endif()
find_package(QTermWidget5 ${QTERMWIDGET_MINIMUM_VERSION} REQUIRED)
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
......@@ -46,8 +49,7 @@ elseif(UNIX)
endif()
add_definitions(
-DSTR_VERSION=\"${STR_VERSION}\"
-DQT_NO_FOREACH
-DQTERMINAL_VERSION=\"${QTERMINAL_VERSION}\"
)
set(EXE_NAME qterminal)
......@@ -65,6 +67,7 @@ set(QTERM_SRC
src/bookmarkswidget.cpp
src/fontdialog.cpp
src/dbusaddressable.cpp
src/tab-switcher.cpp
)
set(QTERM_MOC_SRC
......@@ -77,9 +80,9 @@ set(QTERM_MOC_SRC
src/propertiesdialog.h
src/bookmarkswidget.h
src/fontdialog.h
src/tab-switcher.h
)
if (Qt5DBus_FOUND)
add_definitions(-DHAVE_QDBUS)
QT5_ADD_DBUS_ADAPTOR(QTERM_SRC src/org.lxqt.QTerminal.Window.xml mainwindow.h MainWindow)
......@@ -125,14 +128,6 @@ lxqt_translate_ts(QTERM_QM
${QTERM_UI_SRC}
${QTERM_MOC_SRC}
TRANSLATION_DIR "src/translations"
PULL_TRANSLATIONS
${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS
${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO
${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC
${TRANSLATIONS_REFSPEC}
)
include_directories(
......@@ -155,12 +150,12 @@ if(APPLEBUNDLE)
# create Info.plist file
set(MACOSX_BUNDLE_ICON_FILE qterminal.icns)
set(MACOSX_BUNDLE_INFO_STRING "QTerminal ${STR_VERSION}")
set(MACOSX_BUNDLE_INFO_STRING "QTerminal ${QTERMINAL_VERSION}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.qterminal")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${STR_VERSION}")
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${QTERMINAL_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_NAME "${EXE_NAME}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${STR_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${STR_VERSION}")
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${QTERMINAL_VERSION}")
set(MACOSX_BUNDLE_BUNDLE_VERSION "${QTERMINAL_VERSION}")
set(MACOSX_BUNDLE_COPYRIGHT "(c) Petr Vanek <petr@yarpen.cz>")
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/macosx/qterminal.icns"
......@@ -181,6 +176,16 @@ add_executable(${EXE_NAME} ${GUI_TYPE}
${APPLE_BUNDLE_SOURCES}
${QTERM_QM}
)
target_compile_definitions(${EXE_NAME}
PRIVATE
"QT_USE_QSTRINGBUILDER"
"QT_NO_CAST_FROM_ASCII"
"QT_NO_CAST_TO_ASCII"
"QT_NO_URL_CAST_FROM_STRING"
"QT_NO_CAST_FROM_BYTEARRAY"
)
target_link_libraries(${EXE_NAME}
Qt5::Gui
qtermwidget5
......
......@@ -23,3 +23,10 @@ To build run `make`, to install `make install` which accepts variable `DESTDIR`
QTerminal is provided by all major Linux distributions like [Arch Linux](https://www.archlinux.org/packages/?q=qterminal), Debian (as of Debian stretch), Fedora and openSUSE.
Just use the distributions' package managers to search for string `qterminal`.
### Translation (Weblate)
<a href="https://weblate.lxqt.org/projects/lxqt/qterminal/">
<img src="https://weblate.lxqt.org/widgets/lxqt/-/qterminal/multi-auto.svg" alt="Translation status" />
</a>
qterminal (0.14.0-1) unstable; urgency=medium
* Cherry-picking upstream version 0.14.0.
* Bumped Standards to 4.3.0, no changes needed
* Dropped d/compat, use debhelper-compat = 12, no changes needed
* Fixed years in d/copyright
* Added CC0 for qterminal.appdata.xml
* Bumped minimum versions libqtermwidget5-0-dev (>= 0.14.0~)
* Bumped minimum version lxqt-build-tools (>= 0.6.0~)
* Removed obsolete PULL_TRANSLATIONS= OFF from dh_auto_configure
* Added l10n-package, moved from lxqt-l10n
* Added d/upstream/metadata
-- Alf Gaida <agaida@siduction.org> Sun, 27 Jan 2019 22:06:09 +0100
qterminal (0.9.0-3) unstable; urgency=medium
* Fixed typo in long description
......
......@@ -5,15 +5,15 @@ Uploaders: Alf Gaida <agaida@siduction.org>,
Andrew Lee (李健秋) <ajqlee@debian.org>
Section: x11
Priority: optional
Build-Depends: debhelper (>= 11~),
Build-Depends: debhelper-compat (= 12),
libkf5windowsystem-dev,
libqtermwidget5-0-dev (>= 0.9.0~),
libqtermwidget5-0-dev (>= 0.14.0~),
libqt5svg5-dev,
libqt5x11extras5-dev,
libutf8proc-dev,
libx11-dev,
lxqt-build-tools (>= 0.5.0~),
Standards-Version: 4.1.4
lxqt-build-tools (>= 0.6.0~),
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/lxqt-team/qterminal
Vcs-Git: https://salsa.debian.org/lxqt-team/qterminal.git
Homepage: https://github.com/lxqt/qterminal
......@@ -32,3 +32,14 @@ Description: Lightweight Qt terminal emulator
* Multiple tabs.
* Customizable shortcuts.
* Various color schemes.
Package: qterminal-l10n
Architecture: all
Multi-Arch: foreign
Section: localization
Depends: ${misc:Depends},
qttranslations5-l10n
Breaks: qterminal (<< 0.6.1)
Replaces: qterminal (<< 0.6.1)
Description: Language package for qterminal
This package contains the l10n files needed by the qterminal.
......@@ -3,10 +3,14 @@ Upstream-Name: qterminal
Source: https://github.com/lxqt/qterminal.git
Files: *
Copyright: 2016-2018 LXQt Team
Copyright: 2016-2019 LXQt Team
2010-2016 Petr Vanek <petr@scribus.info>
License: GPL-2+
Files: qterminal.appdata.xml
Copyright: 2015 Tobias Marquardt <tm@tobix.eu>
License: CC0-1.0
Files: src/config.h
src/main.cpp
src/mainwindow.*
......@@ -19,7 +23,7 @@ Copyright: 2006-2011 the LibQxt project.
License: BSD-3-clause
Files: debian/*
Copyright: 2012-2018 Alf Gaida <agaida@siduction.org>
Copyright: 2012-2019 Alf Gaida <agaida@siduction.org>
2016 Peter Mattern <pmattern@arcor.de>
2015 ChangZhuo Chen (陳昌倬) <czchen@debian.org>
2012 Torsten Wohlfarth <towo@siduction.org>
......@@ -69,3 +73,126 @@ License: BSD-3-clause
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: CC0-1.0
Creative Commons Legal Code
.
CC0 1.0 Universal
.
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
.
Statement of Purpose
.
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
.
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
.
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
.
4. Limitations and Disclaimers.
.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.
usr/share/qterminal/translations
usr/share/applications/qterminal_drop.desktop
usr/share/applications/qterminal.desktop
# usr/share/appdata/qterminal.appdata.xml
usr/share/metainfo/qterminal.appdata.xml
usr/share/icons/hicolor/64x64/apps/qterminal.png
usr/bin/qterminal
......@@ -8,8 +8,10 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh ${@} --buildsystem cmake
override_dh_missing:
dh_missing --fail-missing
override_dh_auto_configure:
dh_auto_configure --\
-DPULL_TRANSLATIONS=OFF\
-DUPDATE_TRANSLATIONS=OFF\
dh_auto_configure -- \
-DUPDATE_TRANSLATIONS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
Name: qterminal
Bug-Database: https://github.com/lxqt/qterminal/issues
Bug-Submit: https://github.com/lxqt/qterminal/issues/new
Changelog: https://github.com/lxqt/qterminal/blob/master/CHANGELOG
Repository: https://github.com/lxqt/qterminal
Repository-Browser: https://github.com/lxqt/qterminal
......@@ -2,10 +2,14 @@
Name=QTerminal
Type=Application
GenericName=Terminal emulator
GenericName[ca]=Emulador de terminal
GenericName[cs]=Emulátor terminálu
GenericName[es]=Emulador de terminal
Comment=Terminal emulator
Comment[ca]=Emulador de terminal
Comment[cs]=Emulátor terminálu
Comment[de]=Befehlszeile verwenden
Comment[el]=Προσομοιωτής τερματικού
Comment[es]=Emulador de terminal
......
......@@ -8,7 +8,7 @@ CONFIG += link_pkgconfig \
PKGCONFIG += qtermwidget5
DEFINES += STR_VERSION=\\\"0.9.0\\\"
DEFINES += QTERMINAL_VERSION=\\\"0.9.0\\\"
SOURCES += $$files(src/*.cpp)
HEADERS += $$files(src/*.h)
......
......@@ -7,6 +7,7 @@ Icon=utilities-terminal
Name=QTerminal drop down
Name[ca]=QTerminal desplegable
Name[cs]=Rozbalovací QTerminál
Name[de]=QTerminal herabhängend
Name[el]=QTerminal αναπτυσσόμενο
Name[es]=QTerminal desplegable
......@@ -55,6 +56,7 @@ GenericName[zh_TW]=下拉式終端機
Comment=A drop-down terminal emulator.
Comment[ca]=Un emulador de terminal desplegable.
Comment[cs]=Vysouvací emulátor terminálu.
Comment[de]=Ein Ausklapp-Terminalemulator.
Comment[el]=Ένας αναπτυσσόμενος προσομοιωτής τερματικού.
Comment[es]=Un emulador de terminal desplegable.
......
......@@ -75,7 +75,7 @@ public:
: AbstractBookmarkItem()
{
m_type = AbstractBookmarkItem::Root;
m_value = m_display = "root";
m_value = m_display = QStringLiteral("root");
}
};
......@@ -132,8 +132,8 @@ public:
}
name = QStandardPaths::displayName(i);
path.replace(" ", "\\ ");
cmd = "cd " + path;
path.replace(QLatin1String(" "), QLatin1String("\\ "));
cmd = QLatin1String("cd ") + path;
addChild(new BookmarkCommandItem(name, cmd, this));
}
......@@ -148,8 +148,8 @@ public:
{
continue;
}
path.replace(" ", "\\ ");
cmd = "cd " + path;
path.replace(QLatin1String(" "), QLatin1String("\\ "));
cmd = QLatin1String("cd ") + path;
addChild(new BookmarkCommandItem(i, cmd, this));
}
}
......@@ -188,9 +188,9 @@ public:
{
AbstractBookmarkItem *parent = m_map.contains(xmlPos()) ? m_map[xmlPos()] : this;
QString tag = xml.name().toString();
if (tag == "group")
if (tag == QLatin1String("group"))
{
QString name = xml.attributes().value("name").toString();
QString name = xml.attributes().value(QLatin1String("name")).toString();
m_pos.append(name);
BookmarkGroupItem *i = new BookmarkGroupItem(name, parent);
......@@ -198,10 +198,10 @@ public:
m_map[xmlPos()] = i;
}
else if (tag == "command")
else if (tag == QLatin1String("command"))
{
QString name = xml.attributes().value("name").toString();
QString cmd = xml.attributes().value("value").toString();
QString name = xml.attributes().value(QLatin1String("name")).toString();
QString cmd = xml.attributes().value(QLatin1String("value")).toString();
BookmarkCommandItem *i = new BookmarkCommandItem(name, cmd, parent);
parent->addChild(i);
......@@ -211,7 +211,7 @@ public:
case QXmlStreamReader::EndElement:
{
QString tag = xml.name().toString();
if (tag == "group")
if (tag == QLatin1String("group"))
{
m_pos.removeLast();
}
......@@ -233,7 +233,7 @@ public:
QString xmlPos()
{
return m_pos.join(".");
return m_pos.join(QLatin1Char('.'));
}
};
......@@ -302,8 +302,8 @@ AbstractBookmarkItem *BookmarksModel::getItem(const QModelIndex &index) const
return m_root;
}
QVariant BookmarksModel::headerData(int section, Qt::Orientation orientation,
int role) const
QVariant BookmarksModel::headerData(int /*section*/, Qt::Orientation /*orientation*/,
int /*role*/) const
{
return QVariant();
}
......@@ -393,5 +393,5 @@ void BookmarksWidget::handleCommand(const QModelIndex& index)
if (!item || item->type() != AbstractBookmarkItem::Command)
return;
emit callCommand(item->value() + "\n"); // TODO/FIXME: decide how to handle EOL
emit callCommand(item->value() + QLatin1Char('\n')); // TODO/FIXME: decide how to handle EOL
}
......@@ -28,6 +28,8 @@
#define QUIT "Quit"
#define PREFERENCES "Preferences..."
#define TAB_PREV_HISTORY "Previous Tab in History"
#define TAB_NEXT_HISTORY "Next Tab in History"
#define TAB_NEXT "Next Tab"
#define TAB_PREV "Previous Tab"
......@@ -72,8 +74,10 @@
// ACTIONS
#define CLEAR_TERMINAL_SHORTCUT "Ctrl+Shift+X"
#define TAB_PREV_SHORTCUT "Ctrl+PgUp|Ctrl+Shift+Tab"
#define TAB_NEXT_SHORTCUT "Ctrl+PgDown|Ctrl+Tab"
#define TAB_PREV_HISTORY_SHORTCUT "Ctrl+Tab"
#define TAB_NEXT_HISTORY_SHORTCUT "Ctrl+Shift+Tab"
#define TAB_PREV_SHORTCUT "Ctrl+PgUp"
#define TAB_NEXT_SHORTCUT "Ctrl+PgDown"
#define SUB_BOTTOM_SHORTCUT "Alt+Down"
#define SUB_TOP_SHORTCUT "Alt+Up"
#define SUB_LEFT_SHORTCUT "Alt+Left"
......
......@@ -20,6 +20,6 @@ DBusAddressable::DBusAddressable(QString prefix)
{
#ifdef HAVE_QDBUS
QString uuidString = QUuid::createUuid().toString();
m_path = prefix + "/" + uuidString.replace(QRegExp("[\\{\\}\\-]"), "");
m_path = prefix + QLatin1Char('/') + uuidString.replace(QRegExp(QStringLiteral("[\\{\\}\\-]")), QString());
#endif
}
......@@ -50,7 +50,7 @@ QFont FontDialog::getFont()
void FontDialog::setFontSample(const QFont &f)
{
previewLabel->setFont(f);
QString sample("%1 %2 pt");
QString sample(QLatin1String("%1 %2 pt"));
previewLabel->setText(sample.arg(f.family()).arg(f.pointSize()));
}
......@@ -58,6 +58,6 @@ void FontDialog::setFontSize()
{
const QFont &f = getFont();
previewLabel->setFont(f);
QString sample("%1 %2 pt");
QString sample(QLatin1String("%1 %2 pt"));
previewLabel->setText(sample.arg(f.family()).arg(f.pointSize()));
}
......@@ -300,7 +300,7 @@
</property>
</widget>
</item>
<item row="20" column="0" colspan="2">
<item row="21" column="0" colspan="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -323,7 +323,7 @@
<item row="6" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Keyboard cursor shape</string>
<string>Cursor shape</string>
</property>
<property name="buddy">
<cstring>keybCursorShape_comboBox</cstring>
......@@ -380,14 +380,14 @@
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="limitTabWidthCheckBox">
<widget class="QCheckBox" name="fixedTabWidthCheckBox">
<property name="text">
<string>Limit tab width:</string>
<string>Fixed tab width:</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QSpinBox" name="limitTabWidthSpinBox">
<widget class="QSpinBox" name="fixedTabWidthSpinBox">
<property name="enabled">
<bool>false</bool>
</property>
......@@ -409,6 +409,23 @@
</property>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Terminal margin</string>
</property>
<property name="buddy">
<cstring>terminalMarginSpinBox</cstring>
</property>
</widget>
</item>
<item row="20" column="1">
<widget class="QSpinBox" name="terminalMarginSpinBox">
<property name="suffix">
<string>px</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="behaviorPage">
......@@ -569,12 +586,12 @@
</property>
<item>
<property name="text">
<string>xterm</string>
<string notr="true">xterm</string>
</property>
</item>
<item>
<property name="text">
<string>xterm-256color</string>
<string notr="true">xterm-256color</string>
</property>
</item>
</widget>
......@@ -874,9 +891,9 @@
</hints>
</connection>
<connection>
<sender>limitTabWidthCheckBox</sender>
<sender>fixedTabWidthCheckBox</sender>
<signal>toggled(bool)</signal>
<receiver>limitTabWidthSpinBox</receiver>
<receiver>fixedTabWidthSpinBox</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
......
......@@ -52,7 +52,7 @@ QTerminalApp * QTerminalApp::m_instance = NULL;
void print_usage_and_exit(int code)
{
printf("QTerminal %s\n", STR_VERSION);
printf("QTerminal %s\n", QTERMINAL_VERSION);
puts("Usage: qterminal [OPTION]...\n");
puts(" -d, --drop Start in \"dropdown mode\" (like Yakuake or Tilda)");
puts(" -e, --execute <command> Execute command instead of shell");
......@@ -67,7 +67,7 @@ void print_usage_and_exit(int code)
void print_version_and_exit(int code=0)
{
printf("%s\n", STR_VERSION);
printf("%s\n", QTERMINAL_VERSION);
exit(code);
}
......@@ -81,29 +81,32 @@ void parse_args(int argc, char* argv[], QString& workdir, QString & shell_comman
{
case 'h':
print_usage_and_exit(0);
break;
case 'w':
workdir = QString(optarg);
workdir = QString::fromLocal8Bit(optarg);
break;
case 'e':
shell_command = QString(optarg);
shell_command = QString::fromLocal8Bit(optarg);
// #15 "Raw" -e params
// Passing "raw" params (like konsole -e mcedit /tmp/tmp.txt") is more preferable - then I can call QString("qterminal -e ") + cmd_line in other programs
while (optind < argc)
{
//printf("arg: %d - %s\n", optind, argv[optind]);