summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordanitool2016-12-10 19:52:14 +0100
committerdanitool2016-12-10 19:52:14 +0100
commitf75c92a6a93ecac9c95924d0993e32e5ecb3f042 (patch)
treef1b82e315d4461edf6587df3cfd84e8f68f4f7e3
downloadaur-f75c92a6a93ecac9c95924d0993e32e5ecb3f042.tar.gz
Initial import from cutecom-patched
-rw-r--r--.SRCINFO28
-rw-r--r--.directory6
-rw-r--r--00-improvements.diff1128
-rw-r--r--01-add-ctrl_c-button.diff68
-rw-r--r--02-print_tab_characters_as_spaces.diff72
-rw-r--r--03-ui-align_text.diff73
-rw-r--r--PKGBUILD45
7 files changed, 1420 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d074cc3e08c1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+# Generated by mksrcinfo v8
+# Sat Dec 10 18:51:07 UTC 2016
+pkgbase = cutecom-legacy
+ pkgdesc = Old Cutecom, QT4 based, graphical serial terminal, with some improvements taken from patches not officially commited
+ pkgver = 0.22.0
+ pkgrel = 4
+ url = http://cutecom.sourceforge.net
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = cmake
+ depends = qt4
+ depends = lrzsz
+ conflicts = cutecom
+ conflicts = cutecom-patched
+ source = http://cutecom.sourceforge.net/cutecom-0.22.0.tar.gz
+ source = 00-improvements.diff
+ source = 01-add-ctrl_c-button.diff
+ source = 02-print_tab_characters_as_spaces.diff
+ source = 03-ui-align_text.diff
+ md5sums = dd85ceecf5a60b4d9e4b21a338920561
+ md5sums = f40edfbb1e1d1b4d9d47aa3dbfb08852
+ md5sums = 4484eccc19ebda8e8a2b2b04880f60e1
+ md5sums = dc3f9831f1e5f2bed8abb761c21ffcca
+ md5sums = 20aa958cdda3b900aa1c5673774d3c14
+
+pkgname = cutecom-legacy
+
diff --git a/.directory b/.directory
new file mode 100644
index 000000000000..c2e8087cb0cb
--- /dev/null
+++ b/.directory
@@ -0,0 +1,6 @@
+[Dolphin]
+HeaderColumnWidths=772,108,110,192
+Timestamp=2016,12,10,19,50,57
+Version=3
+ViewMode=1
+VisibleRoles=Details_text,Details_size,Details_date,Details_type,CustomizedDetails
diff --git a/00-improvements.diff b/00-improvements.diff
new file mode 100644
index 000000000000..95d76f5fb15a
--- /dev/null
+++ b/00-improvements.diff
@@ -0,0 +1,1128 @@
+--- cutecom-0.22.0/cutecom.desktop
++++ cutecom-0.22.0/cutecom.desktop
+@@ -1,13 +1,9 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+-BinaryPattern=
+ Name=CuteCom
+-MimeType=
+ GenericName=Serial Terminal
+ Exec=cutecom
+-Icon=openterm
+-TerminalOptions=
+-Path=
++Icon=emblem-mounted
+ Type=Application
+-Terminal=0
+-X-KDE-StartupNotify=false
++Terminal=false
++Categories=System;TerminalEmulator;
++StartupNotify=true
+--- cutecom-0.22.0/cutecommdlg.ui
++++ cutecom-0.22.0/cutecommdlg.ui
+@@ -1,7 +1,8 @@
+-<ui version="4.0" >
++<?xml version="1.0" encoding="UTF-8"?>
++<ui version="4.0">
+ <class>CuteCommDlg</class>
+- <widget class="QWidget" name="CuteCommDlg" >
+- <property name="geometry" >
++ <widget class="QWidget" name="CuteCommDlg">
++ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+@@ -9,203 +10,218 @@
+ <height>648</height>
+ </rect>
+ </property>
+- <property name="windowTitle" >
++ <property name="windowTitle">
+ <string>CuteCom</string>
+ </property>
+- <layout class="QVBoxLayout" >
++ <layout class="QVBoxLayout">
++ <property name="topMargin">
++ <number>0</number>
++ </property>
++ <property name="bottomMargin">
++ <number>0</number>
++ </property>
+ <item>
+- <layout class="QGridLayout" >
+- <item row="3" column="1" >
+- <widget class="QLabel" name="textLabel5" >
+- <property name="text" >
++ <layout class="QGridLayout">
++ <property name="sizeConstraint">
++ <enum>QLayout::SetDefaultConstraint</enum>
++ </property>
++ <property name="verticalSpacing">
++ <number>0</number>
++ </property>
++ <item row="3" column="1">
++ <widget class="QLabel" name="textLabel5">
++ <property name="text">
+ <string>Stop bits:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_stopCb</cstring>
+ </property>
+ </widget>
+ </item>
+- <item row="3" column="0" >
+- <widget class="QPushButton" name="m_quitPb" >
+- <property name="text" >
++ <item row="3" column="0">
++ <widget class="QPushButton" name="m_quitPb">
++ <property name="text">
+ <string>&amp;Quit</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+Q</string>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="1" >
+- <widget class="QLabel" name="textLabel3" >
+- <property name="text" >
++ <item row="2" column="1">
++ <widget class="QLabel" name="textLabel3">
++ <property name="text">
+ <string>Data bits:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_dataBitsCb</cstring>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="0" >
+- <widget class="QPushButton" name="m_aboutPb" >
+- <property name="text" >
++ <item row="2" column="0">
++ <widget class="QPushButton" name="m_aboutPb">
++ <property name="text">
+ <string>&amp;About</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+A</string>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="2" >
+- <widget class="QComboBox" name="m_dataBitsCb" >
+- <property name="currentIndex" >
++ <item row="2" column="2">
++ <widget class="QComboBox" name="m_dataBitsCb">
++ <property name="currentIndex">
+ <number>3</number>
+ </property>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>5</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>6</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>7</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>8</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+- <item row="0" column="1" >
+- <widget class="QLabel" name="textLabel1" >
+- <property name="text" >
++ <item row="0" column="1">
++ <widget class="QLabel" name="textLabel1">
++ <property name="text">
+ <string>Device:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_deviceCb</cstring>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="0" >
+- <widget class="QPushButton" name="m_connectPb" >
+- <property name="toolTip" >
++ <item row="0" column="0">
++ <widget class="QPushButton" name="m_connectPb">
++ <property name="toolTip">
+ <string/>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>&amp;Open device</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+O</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="0" >
+- <widget class="QPushButton" name="m_closePb" >
+- <property name="text" >
++ <item row="1" column="0">
++ <widget class="QPushButton" name="m_closePb">
++ <property name="text">
+ <string>Cl&amp;ose device</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+O</string>
+ </property>
+ </widget>
+ </item>
+- <item row="3" column="2" >
+- <widget class="QComboBox" name="m_stopCb" >
++ <item row="3" column="2">
++ <widget class="QComboBox" name="m_stopCb">
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>1</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>2</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+- <item row="1" column="1" >
+- <widget class="QLabel" name="textLabel2" >
+- <property name="text" >
++ <item row="1" column="1">
++ <widget class="QLabel" name="textLabel2">
++ <property name="text">
+ <string>Baud rate:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_baudCb</cstring>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="2" >
+- <widget class="QComboBox" name="m_deviceCb" >
+- <property name="editable" >
++ <item row="0" column="2">
++ <widget class="QComboBox" name="m_deviceCb">
++ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="2" >
+- <widget class="QComboBox" name="m_baudCb" >
+- <property name="currentIndex" >
+- <number>7</number>
++ <item row="1" column="2">
++ <widget class="QComboBox" name="m_baudCb">
++ <property name="currentIndex">
++ <number>-1</number>
+ </property>
+ </widget>
+ </item>
+- <item rowspan="4" row="0" column="3" >
+- <layout class="QVBoxLayout" >
++ <item row="0" column="3" rowspan="4">
++ <layout class="QVBoxLayout">
++ <property name="bottomMargin">
++ <number>0</number>
++ </property>
+ <item>
+- <layout class="QHBoxLayout" >
++ <layout class="QHBoxLayout">
+ <item>
+- <widget class="QLabel" name="textLabel4" >
+- <property name="text" >
++ <widget class="QLabel" name="textLabel4">
++ <property name="text">
+ <string>Parity:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_parityCb</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QComboBox" name="m_parityCb" >
++ <widget class="QComboBox" name="m_parityCb">
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Odd</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Even</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Mark</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Space</string>
+ </property>
+ </item>
+@@ -214,63 +230,63 @@
+ </layout>
+ </item>
+ <item>
+- <layout class="QGridLayout" >
+- <item row="0" column="2" >
+- <widget class="QCheckBox" name="m_hardwareCb" >
+- <property name="toolTip" >
++ <layout class="QGridLayout">
++ <item row="0" column="2">
++ <widget class="QCheckBox" name="m_hardwareCb">
++ <property name="toolTip">
+ <string>Enable Hardware Handshake</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Hardware</string>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="1" >
+- <widget class="QCheckBox" name="m_softwareCb" >
+- <property name="toolTip" >
++ <item row="0" column="1">
++ <widget class="QCheckBox" name="m_softwareCb">
++ <property name="toolTip">
+ <string>Enable Software Handshake (XON/XOFF)</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Software</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="2" >
+- <widget class="QCheckBox" name="m_writeCb" >
+- <property name="toolTip" >
++ <item row="1" column="2">
++ <widget class="QCheckBox" name="m_writeCb">
++ <property name="toolTip">
+ <string>Usually you want to use read and write</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Writing</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="1" >
+- <widget class="QCheckBox" name="m_readCb" >
+- <property name="toolTip" >
++ <item row="1" column="1">
++ <widget class="QCheckBox" name="m_readCb">
++ <property name="toolTip">
+ <string>Usually you want to use read and write</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Reading</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="0" >
+- <widget class="QLabel" name="textLabel1_3" >
+- <property name="text" >
++ <item row="1" column="0">
++ <widget class="QLabel" name="textLabel1_3">
++ <property name="text">
+ <string>Open for:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="0" >
+- <widget class="QLabel" name="textLabel2_2" >
+- <property name="text" >
++ <item row="0" column="0">
++ <widget class="QLabel" name="textLabel2_2">
++ <property name="text">
+ <string>Handshake:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+@@ -278,8 +294,8 @@
+ </layout>
+ </item>
+ <item>
+- <widget class="QCheckBox" name="m_applyCb" >
+- <property name="text" >
++ <widget class="QCheckBox" name="m_applyCb">
++ <property name="text">
+ <string>Apply settings when opening</string>
+ </property>
+ </widget>
+@@ -289,113 +305,131 @@
+ </layout>
+ </item>
+ <item>
+- <widget class="QSplitter" name="splitter2" >
+- <property name="orientation" >
++ <widget class="QSplitter" name="splitter2">
++ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+- <widget class="QFrame" name="frame3" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
++ <property name="handleWidth">
++ <number>5</number>
++ </property>
++ <widget class="QFrame" name="frame3">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>2</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="frameShape" >
++ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+- <property name="frameShadow" >
++ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+- <layout class="QVBoxLayout" >
++ <layout class="QVBoxLayout">
++ <property name="spacing">
++ <number>0</number>
++ </property>
++ <property name="topMargin">
++ <number>0</number>
++ </property>
++ <property name="bottomMargin">
++ <number>0</number>
++ </property>
+ <item>
+- <widget class="QTextBrowser" name="m_outputView" >
+- <property name="font" >
++ <widget class="QTextBrowser" name="m_outputView">
++ <property name="font">
+ <font>
+- <family>Courier</family>
++ <family>Monospace</family>
+ </font>
+ </property>
++ <property name="frameShape">
++ <enum>QFrame::StyledPanel</enum>
++ </property>
++ <property name="frameShadow">
++ <enum>QFrame::Sunken</enum>
++ </property>
+ </widget>
+ </item>
+ <item>
+- <layout class="QHBoxLayout" >
++ <layout class="QHBoxLayout">
+ <item>
+- <widget class="QPushButton" name="m_clearOutputPb" >
+- <property name="toolTip" >
++ <widget class="QPushButton" name="m_clearOutputPb">
++ <property name="toolTip">
+ <string>Clear the output window</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>&amp;Clear</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+C</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QCheckBox" name="m_hexOutputCb" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
++ <widget class="QCheckBox" name="m_hexOutputCb">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="toolTip" >
++ <property name="toolTip">
+ <string>Show the output in hexadecimal format</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>&amp;Hex output</string>
+ </property>
+- <property name="shortcut" >
++ <property name="shortcut">
+ <string>Alt+H</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QCheckBox" name="m_enableLoggingCb" >
+- <property name="toolTip" >
+- <string>Enable logging the data to a file. Chose "Append to" to append instead overwrite to an existing file.</string>
++ <widget class="QCheckBox" name="m_enableLoggingCb">
++ <property name="toolTip">
++ <string>Enable logging the data to a file. Chose &quot;Append to&quot; to append instead overwrite to an existing file.</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QComboBox" name="m_logAppendCb" >
+- <property name="toolTip" >
+- <string>Enable logging the data to a file. Chose "Append to" to append instead overwrite to an existing file.</string>
++ <widget class="QComboBox" name="m_logAppendCb">
++ <property name="toolTip">
++ <string>Enable logging the data to a file. Chose &quot;Append to&quot; to append instead overwrite to an existing file.</string>
+ </property>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Log to:</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Append to:</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+- <widget class="QLineEdit" name="m_logFileLe" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
++ <widget class="QLineEdit" name="m_logFileLe">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>2</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="toolTip" >
++ <property name="toolTip">
+ <string>The logfile</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QPushButton" name="m_logFileFileDialog" >
+- <property name="toolTip" >
++ <widget class="QPushButton" name="m_logFileFileDialog">
++ <property name="toolTip">
+ <string>Open file dialog</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+@@ -404,41 +438,60 @@
+ </item>
+ </layout>
+ </widget>
+- <widget class="QFrame" name="frame4" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
++ <widget class="QFrame" name="frame4">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="frameShape" >
++ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+- <property name="frameShadow" >
++ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
+ </property>
+- <layout class="QVBoxLayout" >
++ <layout class="QVBoxLayout">
++ <property name="spacing">
++ <number>0</number>
++ </property>
++ <property name="topMargin">
++ <number>0</number>
++ </property>
++ <property name="bottomMargin">
++ <number>0</number>
++ </property>
+ <item>
+- <widget class="QListWidget" name="m_oldCmdsLb" />
++ <widget class="QListWidget" name="m_oldCmdsLb">
++ <property name="frameShape">
++ <enum>QFrame::StyledPanel</enum>
++ </property>
++ <property name="frameShadow">
++ <enum>QFrame::Sunken</enum>
++ </property>
++ <property name="lineWidth">
++ <number>1</number>
++ </property>
++ </widget>
+ </item>
+ <item>
+- <layout class="QHBoxLayout" >
++ <layout class="QHBoxLayout">
+ <item>
+- <widget class="QLabel" name="textLabel1_2" >
+- <property name="text" >
++ <widget class="QLabel" name="textLabel1_2">
++ <property name="text">
+ <string>&amp;Input:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+- <property name="buddy" >
++ <property name="buddy">
+ <cstring>m_cmdLe</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QLineEdit" name="m_cmdLe" >
+- <property name="toolTip" >
++ <widget class="QLineEdit" name="m_cmdLe">
++ <property name="toolTip">
+ <string>Enter commands here, Ctrl+C, Ctrl+S, Ctrl+Q also work</string>
+ </property>
+ </widget>
+@@ -446,66 +499,76 @@
+ </layout>
+ </item>
+ <item>
+- <layout class="QHBoxLayout" >
++ <layout class="QHBoxLayout">
++ <property name="spacing">
++ <number>-1</number>
++ </property>
+ <item>
+- <widget class="QPushButton" name="m_sendPb" >
+- <property name="toolTip" >
++ <widget class="QPushButton" name="m_sendPb">
++ <property name="toolTip">
+ <string>Select a file to be sent using the specified protocol</string>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Send file...</string>
+ </property>
+- <property name="autoDefault" >
++ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QComboBox" name="m_protoPb" >
+- <property name="toolTip" >
++ <widget class="QComboBox" name="m_protoPb">
++ <property name="toolTip">
+ <string>Select the transfer protocol</string>
+ </property>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Plain</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>XModem</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>ZModem</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>YModem</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>1kXModem</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Script</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
++ <widget class="QPushButton" name="m_sendBreakPb">
++ <property name="text">
++ <string>Set BREAK</string>
++ </property>
++ </widget>
++ </item>
++ <item>
+ <spacer>
+- <property name="orientation" >
++ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+- <property name="sizeType" >
++ <property name="sizeType">
+ <enum>QSizePolicy::Expanding</enum>
+ </property>
+- <property name="sizeHint" >
++ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+@@ -514,59 +577,59 @@
+ </spacer>
+ </item>
+ <item>
+- <widget class="QComboBox" name="m_inputModeCb" >
+- <property name="toolTip" >
++ <widget class="QComboBox" name="m_inputModeCb">
++ <property name="toolTip">
+ <string>Select the line end termination</string>
+ </property>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>LF line end</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>CR line end</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>CR,LF line end</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>No line end</string>
+ </property>
+ </item>
+ <item>
+- <property name="text" >
++ <property name="text">
+ <string>Hex input</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+- <widget class="QLabel" name="textLabel1_4" >
+- <property name="text" >
++ <widget class="QLabel" name="textLabel1_4">
++ <property name="text">
+ <string>Char delay:</string>
+ </property>
+- <property name="wordWrap" >
++ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+- <widget class="QSpinBox" name="m_charDelaySb" >
+- <property name="toolTip" >
++ <widget class="QSpinBox" name="m_charDelaySb">
++ <property name="toolTip">
+ <string>Delay between single characters</string>
+ </property>
+- <property name="suffix" >
++ <property name="suffix">
+ <string> ms</string>
+ </property>
+- <property name="maximum" >
++ <property name="maximum">
+ <number>250</number>
+ </property>
+- <property name="value" >
++ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+@@ -579,7 +642,7 @@
+ </item>
+ </layout>
+ </widget>
+- <layoutdefault spacing="6" margin="11" />
++ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <tabstops>
+ <tabstop>m_connectPb</tabstop>
+--- cutecom-0.22.0/qcppdialogimpl.cpp
++++ cutecom-0.22.0/qcppdialogimpl.cpp
+@@ -18,6 +18,7 @@
+
+ #include "qcppdialogimpl.h"
+
++#include <qscrollbar.h>
+ #include <qcombobox.h>
+ #include <qpushbutton.h>
+ #include <qcheckbox.h>
+@@ -99,6 +100,7 @@
+ connect(m_cmdLe, SIGNAL(returnPressed()), this, SLOT(execCmd()));
+
+ connect(m_sendPb, SIGNAL(clicked()), this, SLOT(sendFile()));
++ connect(m_sendBreakPb, SIGNAL(clicked()), this, SLOT(sendBreak()));
+ connect(m_aboutPb, SIGNAL(clicked()), this, SLOT(showAboutMsg()));
+ connect(m_quitPb, SIGNAL(clicked()), this, SLOT(close()));
+
+@@ -121,7 +123,7 @@
+ connect(m_applyCb, SIGNAL(clicked()), this, SLOT(saveSettings()));
+ connect(m_hexOutputCb, SIGNAL(clicked()), this, SLOT(saveSettings()));
+ connect(m_inputModeCb, SIGNAL(activated(int)), this, SLOT(saveSettings()));
+- connect(m_charDelaySb, SIGNAL(valueChanged(int)), this, SLOT(saveSettings()));
++ connect(m_charDelaySb, SIGNAL(editingFinished(int)), this, SLOT(saveSettings()));
+ connect(m_logAppendCb, SIGNAL(activated(int)), this, SLOT(saveSettings()));
+
+ connect(m_applyCb, SIGNAL(toggled(bool)), this, SLOT(enableSettingWidgets(bool)));
+@@ -134,7 +136,7 @@
+ // connect(m_enableLoggingCb, SIGNAL(toggled(bool)), this, SLOT(enableLogging(bool)));
+
+ m_outputView->setWordWrapMode(QTextOption::WrapAnywhere);
+- m_outputView->document()->setMaximumBlockCount(500);
++ m_outputView->document()->setMaximumBlockCount(10500);
+ // TODO ? m_outputView->setWordWrap(Q3TextEdit::WidgetWidth);
+
+ /* QAccel* accel=new QAccel(this);
+@@ -277,24 +279,6 @@
+
+ QString currentDevice=m_deviceCb->currentText();
+ settings.setValue("/cutecom/CurrentDevice", currentDevice);
+- bool currentDeviceIsInList=false;
+- QStringList devices;
+- for (int i=0; i<m_deviceCb->count(); i++)
+- {
+- QString s=m_deviceCb->itemText(i);
+- devices<<s;
+- if (s==currentDevice)
+- {
+- currentDeviceIsInList=true;
+- }
+- }
+-
+- if (!currentDeviceIsInList)
+- {
+- devices<<currentDevice;
+- }
+-
+- settings.setValue("/cutecom/AllDevices", devices);
+
+ int historyCount=m_oldCmdsLb->count();
+ if (historyCount>50)
+@@ -346,13 +330,41 @@
+ {
+ resize(x,y);
+ }
++ /* scan for modem devices */
++
++ int n;
++
++ QDir dir("/dev");
++
++ QStringList filters;
++
++ /*
++ * Device filters for:
++ *
++ * FreeBSD: cuaU0, cuad0 [0..99]
++ * Linux: ttyS0 [0..99]
++ * Apple: cu.*
++ */
++
++ filters
++ << "ttyS[0123456789]"
++ << "ttyUSB[0123456789]";
++
++ dir.setFilter(QDir::Files | QDir::System);
++ dir.setNameFilters(filters);
++ dir.setSorting(QDir::Name);
++
++ QFileInfoList list = dir.entryInfoList();
++ QStringList devices;
+
+ bool entryFound = settings.contains("/cutecom/AllDevices");
+- QStringList devices=settings.value("/cutecom/AllDevices").toStringList();
+- if (!entryFound)
+- {
+- devices<<"/dev/ttyS0"<<"/dev/ttyS1"<<"/dev/ttyS2"<<"/dev/ttyS3";
++ devices=settings.value("/cutecom/AllDevices").toStringList();
++ for (n = 0; n != list.size(); n++) {
++ QFileInfo fileInfo = list.at(n);
++ devices << (QString("/dev/") + fileInfo.fileName());
+ }
++ devices.removeDuplicates();
++ devices.sort();
+
+ m_deviceCb->insertItems(0, devices);
+
+@@ -381,6 +393,13 @@
+
+ void QCPPDialogImpl::sendFile()
+ {
++ unsigned int charDelay = 0;
++
++ if (m_sendFileActive != 0)
++ return;
++
++ m_sendFileActive++;
++
+ if (m_fileDlg==0)
+ {
+ m_fileDlg=new QFileDialog();
+@@ -401,17 +420,17 @@
+ }
+ else
+ {
+- return;
++ goto done;
+ }
+
+- unsigned int charDelay=m_charDelaySb->value();
++ charDelay=m_charDelaySb->value();
+ if (m_protoPb->currentText()=="Script")
+ {
+ QFile file(filename);
+ if (!file.open(QIODevice::ReadOnly))
+ {
+ QMessageBox::information(this, tr("Opening file failed"), tr("Could not open file %1").arg(filename));
+- return;
++ goto done;
+ }
+
+ QTextStream stream(&file);
+@@ -427,7 +446,7 @@
+ if (!sendString(nextLine))
+ {
+ QMessageBox::information(this, tr("Comm error"), tr("Sending failed"));
+- return;
++ goto done;
+ }
+ millisleep(charDelay*3);
+ }
+@@ -438,7 +457,7 @@
+ if (!file.open(QIODevice::ReadOnly))
+ {
+ QMessageBox::information(this, tr("Opening file failed"), tr("Could not open file %1").arg(filename));
+- return;
++ goto done;
+ }
+ QByteArray data=file.readAll();
+ delete m_progress;
+@@ -523,7 +542,7 @@
+ delete m_sz;
+ m_sz=0;
+ connectTTY();
+- return;
++ goto done;
+ }
+ m_progress=new QProgressDialog(tr("Sending file via xmodem..."), tr("Cancel"), 0, 100, this);
+ connect(m_progress, SIGNAL(cancelled()), this, SLOT(killSz()));
+@@ -553,6 +572,29 @@
+ {
+ QMessageBox::information(this, tr("Opening file failed"), tr("Protocol %1 not supported yet").arg(m_protoPb->currentText()));
+ }
++ done:
++ m_sendFileActive--;
++}
++
++void QCPPDialogImpl::sendBreak()
++{
++ if (m_break == 0) {
++ if (m_fd < 0)
++ return;
++
++ ioctl(m_fd, TIOCSBRK, 0);
++
++ m_sendBreakPb->setText(QString("Clr BREAK"));
++
++ m_break = 1;
++ } else {
++ if (m_fd > -1)
++ ioctl(m_fd, TIOCCBRK, 0);
++
++ m_sendBreakPb->setText(QString("Set BREAK"));
++
++ m_break = 0;
++ }
+ }
+
+ void QCPPDialogImpl::killSz()
+@@ -965,6 +1007,7 @@
+ m_sendPb->setEnabled(true);
+ m_protoPb->setEnabled(true);
+ m_closePb->setEnabled(true);
++ m_sendBreakPb->setEnabled(true);
+
+ m_cmdLe->setFocus();
+
+@@ -1019,12 +1062,15 @@
+ m_sendPb->setEnabled(false);
+ m_protoPb->setEnabled(false);
+ m_closePb->setEnabled(false);
++ m_sendBreakPb->setEnabled(false);
+
+ m_connectPb->setFocus();
+
+ m_isConnected=false;
+ delete m_notifier;
+ m_notifier=0;
++ if (m_break != 0)
++ sendBreak();
+ }
+
+
+@@ -1250,6 +1296,9 @@
+
+ if (bytesRead<0)
+ {
++ // check for device gone, for example USB
++ if (errno != EINTR && errno != EWOULDBLOCK)
++ disconnectTTY();
+ std::cerr<<"read result: "<<bytesRead<<std::endl;
+ perror("read: \n");
+ return;
+@@ -1362,13 +1411,23 @@
+
+ void QCPPDialogImpl::doOutput()
+ {
+- if (m_outputBuffer.isEmpty())
+- {
+- return;
+- }
++ QScrollBar* vScrollBar;
++ bool scrollWithText;
+
+- m_outputView->append(m_outputBuffer);
+- m_outputBuffer.clear();
++ if (m_outputBuffer.isEmpty())
++ return;
++
++ vScrollBar = m_outputView->verticalScrollBar();
++ scrollWithText = (vScrollBar->value() == vScrollBar->maximum());
++
++ QTextCursor cursor(m_outputView->document());
++ cursor.movePosition(QTextCursor::End);
++ cursor.insertText(m_outputBuffer);
++
++ if ((scrollWithText))
++ vScrollBar->setValue(vScrollBar->maximum());
++
++ m_outputBuffer.clear();
+ }
+
+ void QCPPDialogImpl::hexOutputClicked(bool /* on */)
+--- cutecom-0.22.0/qcppdialogimpl.h
++++ cutecom-0.22.0/qcppdialogimpl.h
+@@ -50,6 +50,7 @@
+ void execCmd();
+ void readData(int fd);
+ void sendFile();
++ void sendBreak();
+ void showAboutMsg();
+
+ void oldCmdClicked(QListWidgetItem* item);
+@@ -81,6 +82,8 @@
+
+ bool m_isConnected;
+ int m_fd;
++ int m_break;
++ int m_sendFileActive;
+ struct termios m_oldtio;
+ unsigned int m_cmdBufIndex;
+ QSocketNotifier *m_notifier;
diff --git a/01-add-ctrl_c-button.diff b/01-add-ctrl_c-button.diff
new file mode 100644
index 000000000000..eddebb329ed3
--- /dev/null
+++ b/01-add-ctrl_c-button.diff
@@ -0,0 +1,68 @@
+--- cutecom-0.22.0/qcppdialogimpl.cpp
++++ cutecom-0.22.0/qcppdialogimpl.cpp
+@@ -101,6 +101,7 @@
+
+ connect(m_sendPb, SIGNAL(clicked()), this, SLOT(sendFile()));
+ connect(m_sendBreakPb, SIGNAL(clicked()), this, SLOT(sendBreak()));
++ connect(m_ctrlc, SIGNAL(clicked()), this, SLOT(sendCtrlc()));
+ connect(m_aboutPb, SIGNAL(clicked()), this, SLOT(showAboutMsg()));
+ connect(m_quitPb, SIGNAL(clicked()), this, SLOT(close()));
+
+@@ -597,6 +598,15 @@
+ }
+ }
+
++void QCPPDialogImpl::sendCtrlc()
++{
++ QKeyEvent keyEvent(QEvent::KeyPress,Qt::Key_C, Qt::ControlModifier);
++ QApplication::sendEvent(m_cmdLe, &keyEvent);
++
++ QKeyEvent key_release(QKeyEvent::KeyRelease, Qt::Key_C, Qt::ControlModifier);
++ QApplication::sendEvent(m_cmdLe, &key_release);
++}
++
+ void QCPPDialogImpl::killSz()
+ {
+ if (m_sz==0)
+@@ -1008,6 +1018,7 @@
+ m_protoPb->setEnabled(true);
+ m_closePb->setEnabled(true);
+ m_sendBreakPb->setEnabled(true);
++ m_ctrlc->setEnabled(true);
+
+ m_cmdLe->setFocus();
+
+@@ -1063,6 +1074,7 @@
+ m_protoPb->setEnabled(false);
+ m_closePb->setEnabled(false);
+ m_sendBreakPb->setEnabled(false);
++ m_ctrlc->setEnabled(false);
+
+ m_connectPb->setFocus();
+
+--- cutecom-0.22.0/cutecommdlg.ui
++++ cutecom-0.22.0/cutecommdlg.ui
+@@ -561,6 +561,13 @@
+ </widget>
+ </item>
+ <item>
++ <widget class="QPushButton" name="m_ctrlc">
++ <property name="text">
++ <string>Ctrl+C</string>
++ </property>
++ </widget>
++ </item>
++ <item>
+ <spacer>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+--- cutecom-0.22.0/qcppdialogimpl.h
++++ cutecom-0.22.0/qcppdialogimpl.h
+@@ -51,6 +51,7 @@
+ void readData(int fd);
+ void sendFile();
+ void sendBreak();
++ void sendCtrlc();
+ void showAboutMsg();
+
+ void oldCmdClicked(QListWidgetItem* item);
diff --git a/02-print_tab_characters_as_spaces.diff b/02-print_tab_characters_as_spaces.diff
new file mode 100644
index 000000000000..4132cf5c8602
--- /dev/null
+++ b/02-print_tab_characters_as_spaces.diff
@@ -0,0 +1,72 @@
+--- cutecom-0.22.0/qcppdialogimpl.cpp
++++ cutecom-0.22.0/qcppdialogimpl.cpp
+@@ -1322,7 +1322,7 @@
+ return;
+ }
+
+- const char* c=m_buf;
++ const char *c = m_buf;
+ if (m_sz!=0)
+ {
+ // std::cerr<<"readData() "<<bytesRead<<std::endl;
+@@ -1347,8 +1347,7 @@
+ snprintf(buf, 16, "%08x: ", m_hexBytes);
+ text+=buf;
+ }
+- unsigned int b=*c;
+- snprintf(buf, 16, "%02x ", b & 0xff);
++ snprintf(buf, 16, "%02hhx ", *c);
+ text+=buf;
+
+ m_hexBytes++;
+@@ -1363,33 +1362,29 @@
+ }
+ else
+ {
+- // also print a newline for \r, and print only one newline for \r\n
+- if ((isprint(*c)) || (*c=='\n') || (*c=='\r'))
+- {
+- if (*c=='\r')
+- {
+- text+='\n';
+- }
+- else if (*c=='\n')
++ switch (*c) {
++ case '\n':
++ if (m_previousChar == '\r') break;
++ // fall through
++ case '\r':
++ text += '\n';
++ break;
++ case '\t':
++ text += " ";
++ break;
++ default:
++ if (isprint(*c))
+ {
+- if (m_previousChar != '\r')
+- {
+- text+='\n';
+- }
++ text += *c;
+ }
+ else
+ {
+- text+=(*c);
++ unsigned int b = *c;
++ snprintf(buf, 16, "\\0x%02x", b & 0xff);
++ text += buf;
+ }
+-
+- m_previousChar = *c;
+- }
+- else
+- {
+- unsigned int b=*c;
+- snprintf(buf, 16, "\\0x%02x", b & 0xff);
+- text+=buf;
+ }
++ m_previousChar = *c;
+ }
+ c++;
+ }
diff --git a/03-ui-align_text.diff b/03-ui-align_text.diff
new file mode 100644
index 000000000000..098284615b23
--- /dev/null
+++ b/03-ui-align_text.diff
@@ -0,0 +1,73 @@
+--- cutecom-0.22.0/cutecommdlg.ui
++++ cutecom-0.22.0/cutecommdlg.ui
+@@ -33,6 +33,9 @@
+ <property name="text">
+ <string>Stop bits:</string>
+ </property>
++ <property name="alignment">
++ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+@@ -56,6 +59,9 @@
+ <property name="text">
+ <string>Data bits:</string>
+ </property>
++ <property name="alignment">
++ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+@@ -106,6 +112,9 @@
+ <property name="text">
+ <string>Device:</string>
+ </property>
++ <property name="alignment">
++ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+@@ -156,6 +165,9 @@
+ <property name="text">
+ <string>Baud rate:</string>
+ </property>
++ <property name="alignment">
++ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
++ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+@@ -180,11 +192,17 @@
+ </item>
+ <item row="0" column="3" rowspan="4">
+ <layout class="QVBoxLayout">
++ <property name="spacing">
++ <number>0</number>
++ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QHBoxLayout">
++ <property name="spacing">
++ <number>-1</number>
++ </property>
+ <item>
+ <widget class="QLabel" name="textLabel4">
+ <property name="text">
+@@ -231,6 +249,12 @@
+ </item>
+ <item>
+ <layout class="QGridLayout">
++ <property name="horizontalSpacing">
++ <number>-1</number>
++ </property>
++ <property name="verticalSpacing">
++ <number>0</number>
++ </property>
+ <item row="0" column="2">
+ <widget class="QCheckBox" name="m_hardwareCb">
+ <property name="toolTip">
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..73a44155a580
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: danitool dgcbueu at gmail.com
+# Contributor: SiƓn Le Roux <sinisterstuf@gmail.com>, Alessandro Biavati <abiavati@gmail.com>
+
+pkgname=cutecom-legacy
+pkgver=0.22.0
+pkgrel=4
+pkgdesc="Old Cutecom, QT4 based, graphical serial terminal, with some improvements taken from patches not officially commited"
+arch=('i686' 'x86_64')
+url="http://cutecom.sourceforge.net"
+license=('GPL2')
+depends=('qt4' 'lrzsz')
+makedepends=('cmake')
+conflicts=('cutecom' 'cutecom-patched')
+source=("${url}/cutecom-${pkgver}.tar.gz"
+ '00-improvements.diff'
+ '01-add-ctrl_c-button.diff'
+ '02-print_tab_characters_as_spaces.diff'
+ '03-ui-align_text.diff')
+
+md5sums=('dd85ceecf5a60b4d9e4b21a338920561'
+ 'f40edfbb1e1d1b4d9d47aa3dbfb08852'
+ '4484eccc19ebda8e8a2b2b04880f60e1'
+ 'dc3f9831f1e5f2bed8abb761c21ffcca'
+ '20aa958cdda3b900aa1c5673774d3c14')
+
+prepare(){
+ cd ${srcdir}/cutecom-${pkgver}
+ patch -p1 -i ../00-improvements.diff
+ patch -p1 -i ../01-add-ctrl_c-button.diff
+ patch -p1 -i ../02-print_tab_characters_as_spaces.diff
+ patch -p1 -i ../03-ui-align_text.diff
+}
+
+build() {
+ cd ${srcdir}/cutecom-${pkgver}
+ cmake -DQT_QMAKE_EXECUTABLE=qmake4 .
+ make || return 1
+}
+
+package() {
+ cd ${srcdir}/cutecom-${pkgver}
+ install -D -m 644 cutecom.desktop ${pkgdir}/usr/share/applications/cutecom.desktop
+ install -D -m 755 cutecom ${pkgdir}/usr/bin/cutecom
+ install -D -m 644 cutecom.1 ${pkgdir}/usr/share/man/man1/cutecom.1
+}