Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All available bugfixes #19

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ccc0dca
Fix black squares on gnome3
RaphaelRochet Jan 17, 2014
710d246
Don't wipe XShape setting on load
thjaeger Sep 7, 2014
cf8d05d
Merge branch 'master' of github.com:thjaeger/easystroke
RaphaelRochet Jul 7, 2015
ffe356c
French translation update
RaphaelRochet Jul 7, 2015
0e60f16
switch from fork to g_spawn_async
trengrj May 21, 2015
22b28d2
fix build failed in libsignc++ version 2.5.1 or newer
nagae-memooff Oct 1, 2016
9e2c323
Remove abs(float) function that clashes with std::abs(float)
jwakely Jan 28, 2017
5f6885c
Remove requirement for current device to be in absolute mode, this wi…
p2rkw Feb 1, 2017
1c0a060
Add a duplicate action button, you can duplicate a action and move it…
tzraeq Jul 14, 2017
7b69293
added experimental support for grabbing the extra buttons on disabled…
Feb 16, 2019
453796c
fixed button press not passing through if gesture was not detected
Feb 16, 2019
ece68e0
deleted the unnecessary patch
Feb 16, 2019
fc3c901
Merge ece68e05aa31335f0b8bb7fde14a594e93bc5684 into f7c1614004e9c518b…
joukhaha Feb 16, 2019
686b777
Move Stroke::save() and load() into header
mhillenbrand Apr 14, 2020
d9b8363
Update it.po
albanobattistella Nov 7, 2020
5ac0869
Copied wiki into readme files
bjbr-dev Dec 26, 2020
118380d
Add option to toggle easystroke on/off.
nezumisama Nov 4, 2015
42ac1ff
Merge pull requests, forks and patches
MRWITEK Jun 18, 2022
3205352
Merge branch 'experimental-grab-buttons'
MRWITEK Jun 18, 2022
563650e
fixed recurring crash when trying to render 0x0 tray icon
dkondor Sep 22, 2018
7a3e684
Fix not being able to select Misc actions
dkondor Aug 28, 2020
299c7c0
Change the translation
mikazo777 Jul 24, 2020
d1aa19e
Change the translation to right the cursor
mikazo777 Jul 24, 2020
4f025b6
Init trace type with TraceShape when got TraceDefault , this just a s…
debuggerx01 Jul 12, 2017
a255b2a
FIXED: easystroke.desktop.in
siloportem Jul 16, 2016
08f9ff6
Made Makefile use the environment vars explicitly
MRWITEK Jun 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,22 @@
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

DESTDIR =
PREFIX = /usr/local
#DESTDIR =
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
ICONDIR = $(PREFIX)/share/icons/hicolor/scalable/apps
MENUDIR = $(PREFIX)/share/applications
LOCALEDIR= $(PREFIX)/share/locale
DFLAGS =
#DFLAGS =
OFLAGS = -O2
AOFLAGS = -O3
STROKEFLAGS = -Wall -std=c11 $(DFLAGS)
CXXSTD = -std=c++11
INCLUDES = $(shell pkg-config gtkmm-3.0 dbus-glib-1 --cflags)
CXXFLAGS = $(CXXSTD) -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES)
CFLAGS = -std=c11 -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) -DGETTEXT_PACKAGE='"easystroke"'
LDFLAGS = $(DFLAGS)
CXXFLAGS += $(CXXSTD) -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES)
CFLAGS += -std=c11 -Wall $(DFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" $(INCLUDES) -DGETTEXT_PACKAGE='"easystroke"'
LDFLAGS += $(DFLAGS)

LIBS = $(DFLAGS) -lboost_serialization -lX11 -lXext -lXi -lXfixes -lXtst `pkg-config gtkmm-3.0 dbus-glib-1 --libs`
LIBS = $(DFLAGS) -lboost_serialization -lX11 -lXext -lXi -lXfixes -lXtst $(shell pkg-config gtkmm-3.0 dbus-glib-1 --libs)

BINARY = easystroke
ICON = easystroke.svg
Expand Down Expand Up @@ -65,7 +64,7 @@ $(BINARY): $(OFILES)
$(CXX) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)

stroke.o: stroke.c
$(CC) $(STROKEFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
$(CC) $(CFLAGS) $(AOFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<

%.o: %.c
$(CC) $(CFLAGS) $(OFLAGS) -MT $@ -MMD -MP -MF $*.Po -o $@ -c $<
Expand Down
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Easystroke is a gesture-recognition application for X11. Gestures or strokes are movements that you make with you mouse (or your pen, finger etc.) while holding down a specific mouse button. Easystroke will execute certain actions if it recognizes the stroke; currently easystroke can emulate key presses, execute shell commands, hold down modifiers and emulate a scroll wheel. The program was designed with Tablet PCs in mind and can be used effectively even without access to a keyboard. Easystroke tries to provide an intuitive and efficient user interface, while at the same time being highly configurable and offering many advanced features.

# News
* [2018-12-05] Maintenance Update. As development has stalled, and the original Author is not available, but the program is still widely used, an update in terms of bugfixing and maintenance of the code has been attempted. See [BuildInstructions](https://github.com/thjaeger/easystroke/wiki/BuildInstructions) for more information.
* [2013-03-27] Released 0.6.0 This release contains few user-visible changes beside a few bugfixes. Easystroke has been ported to gtk3 and event handling code has been refactored in anticipation of touch support. Unfortunately, touch grab support in the X server is still too fragile for easystroke to be able to take advantage of it (you can preview touch support on the 'touch' branch).
* [2012-10-06] Released 0.5.6 This release incorporates fixes for most of the issues that have come up over the last year or so. It also adds Hungarian translations. Stay tuned, 0.6.0 with gtk3 and improved touch support will be released soon. The 0.5 branch will not see any new features, only bugfixes if necessary.
* [2011-08-16] Released 0.5.5.1 This fixes a build failure in 0.5.5.
* [2011-08-16] Released 0.5.5 This release adds per-device timeout settings. An extra click is now required for button actions to improve precision and scroll actions use XI2 Raw events so that the cursor is not confined to the screen. The release also includes various bugfixes and adds Catalan, Finnish, Korean and Traditional Chinese translations.
* [2010-07-27] Released 0.5.4 Just a few minor bug fixes.
* [2010-02-13] Released 0.5.3 This release adds an option to move the cursor back to the original position after each gesture and fixes a crash when a gesture times out during recording, along with a few minor bugs.
* [2010-01-09] Released 0.4.11 This release only fixes one bug that would cause a wrong key to be emitted under certain circumstances.
* [2010-01-02] Released 0.5.2 This release adds Hebrew translations and should improve keystroke handling.
* [2009-11-19] Released 0.4.10 This is a bugfix release for the non-xi2 branch of easystroke. It also adds Hebrew translations.
* [2009-10-27] Released 0.5.0 This release is a port of easystroke to XI 2 (it doesn't add any new features). You need a recent X server (at least 1.7) to run this version. Most people will probably want to stick with 0.4.9 for now.
* [2009-08-19] Released 0.4.9 This release fixes a bug regarding application groups and adds Polish translations.
* [2009-08-15] Released 0.4.8 This release fixes a long-standing bug that would prevent easystroke from working when only application-dependent gestures were defined.
* [2009-07-05] Released 0.4.7 This release adds a workaround an (1.6) X server bug causing problems with vertical gestures on some devices.
* [2009-06-16] Released 0.4.6 This release adds Russian translations and works around two issues on karmic and amd64 arch.
* [2009-06-01] Released 0.4.5 This release fixes one crash-bug and adds Chinese translations.
* [2009-05-12] Released 0.4.4 This fixes two annoying bugs in 0.4.3
* [2009-05-09] Released 0.4.3 This is mostly a bugfix release, but it also improves drag-and-drop behavior
* [2009-05-09] Released 0.4.2 This is a bugfix-only version of 0.4.3 that I accidentally uploaded, please ignore.
* [2009-03-16] Released 0.4.1.1 This is a bugfix release.
* [2009-02-20] Released 0.4.1 This release introduces a new stroke-matching algorithm, adds click-and-hold gestures and contains various bug fixes.
* [2009-02-06] Released 0.4.0 This version adds support for the upcoming X Server 1.6, comes with Czech, German, Italian and Spanish translations and makes it possible to use multiple gesture buttons.
* [2008-12-22] Released 0.3.1 We now have a much better method for drawing strokes on composited desktops, but this release also contains a few bugfixes and an option to autostart the program.
* [2008-11-07] Released 0.3.0 This release introduces many new features, most notably application-dependent gestures. See the [changelog](http://github.com/thjaeger/easystroke/tree/master%2Fchangelog?raw=true) for details
* [2008-09-18] Released 0.2.2.1 This is a bug fix release, resolving a few minor issues.
* [2008-08-17] Released 0.2.2 This version features improved visual feedback, configurable gesture timeout, better pointer tracking and many minor improvements.
* [2008-08-06] Released 0.2.1.1. This just adds license information to the source files in order to facilitate Ubuntu packaging. An update is not necessary.
* [2008-08-03] Released 0.2.1, correcting some silly Makefile mistakes.
* [2008-08-03] Released 0.2.0. This version contains many tablet-related improvements and introduces [FeatureAdvancedGestures]. Please allow a few days for the documentation to be updated to the current version.
* [2008-06-22] Released 0.1.2. Fixes a few minor UI glitches.
* [2008-06-19] Released 0.1.1. This version introduces [FeatureClickDuringStroke], which allows you to emulate a mouse click by clicking a second button during a stroke (which can essentially turn a one-button tablet pen into three-button mouse).
* [2008-06-14] Released 0.1. This is first public release.

# Download

Releases can be found on the [sourceforge download page](http://sourceforge.net/project/showfiles.php?group_id=229797). See the [BuildInstructions Build Instructions] to learn how to build easystroke from source or see below if there are pre-built packages available for your distribution.

## Ubuntu
You can find i386 and amd64 .debs for Ubuntu Karmic and Hardy on the [sourceforge download page](http://sourceforge.net/project/showfiles.php?group_id=229797). These packages, along with packages for Jaunty and Lucid, are also available through the [easystroke Lauchpad PPA](https://launchpad.net/~easystroke/+archive/ppa). Just add the following two lines to your /etc/apt/sources.list file (replace karmic with the verion of ubuntu that you're running).

deb http://ppa.launchpad.net/easystroke/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/easystroke/ppa/ubuntu karmic main


## OpenSUSE

Easystroke is part of the openSUSE Contrib repository and the X11:Utilities devel
repository, see the [openSUSE Build Service](http://software.opensuse.org/search?baseproject=ALL&p=1&q=easystroke) for a list available builds.

# Development

You can fetch the [latest development tree](http://github.com/thjaeger/easystroke/tree/master) using git:

git clone git://github.com/thjaeger/easystroke.git


# Documentation

[Documentation](Documentation)

[Tips & Tricks](TipsAndTricks)

[Build Instructions](BuildInstructions)

Easystroke is distributed under the [ISC License](http://github.com/thjaeger/easystroke/tree/master%2FLICENSE?raw=true).

# How can I help out?

If you encounter any bugs or problems with easystroke, please report them, preferably using [trac](https://sourceforge.net/apps/trac/easystroke/report) (be sure to assign the ticket to me (thjaeger), so that I get notified by e-mail). Feature suggestions are also welcome, but note that I only have limited time to implement new features (usually, changes in the X server are enough to keep me busy).

The easystroke website is a wiki that anyone can edit (with the exception of the front page). Please feel free to add any information (tutorials, documentation, etc.) that might be interesting to other users. Work on the [Documentation](Documentation) page is especially appreciated, I don't have the time and patience to keep it up to date.

To find out how to translate easystroke into your native language, see [Translations](Translations).

# Author

Easystroke is being developed by [Thomas Jaeger](mailto:ThJaeger@gmail.com). Comments, suggestions, bug reports, patches and criticism are very welcome!
11 changes: 3 additions & 8 deletions actiondb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,9 @@ template<class Archive> void StrokeInfo::serialize(Archive & ar, const unsigned
using namespace std;

void Command::run() {
pid_t pid = fork();
switch (pid) {
case 0:
execlp("/bin/sh", "sh", "-c", cmd.c_str(), nullptr);
exit(1);
case -1:
printf(_("Error: can't execute command \"%s\": fork() failed\n"), cmd.c_str());
}
gchar* argv[] = {(gchar*) "/bin/sh", (gchar*) "-c", NULL, NULL};
argv[2] = (gchar *) cmd.c_str();
g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
}

ButtonInfo Button::get_button_info() const {
Expand Down
46 changes: 42 additions & 4 deletions actions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ void TreeViewMulti::on_drag_begin(const Glib::RefPtr<Gdk::DragContext> &context)
context->set_icon(pb, pb->get_width(), pb->get_height());
}

bool negate(bool b) { return !b; }

TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) {
get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending)));
get_selection()->set_select_function(
[this](Glib::RefPtr<Gtk::TreeModel> const&, Gtk::TreeModel::Path const&, bool) {
return !pending;
});
}

enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC };
Expand Down Expand Up @@ -131,6 +132,7 @@ Actions::Actions() :
Gtk::Button *button_add, *button_add_app, *button_add_group;
widgets->get_widget("button_add_action", button_add);
widgets->get_widget("button_delete_action", button_delete);
widgets->get_widget("button_dup_action", button_dup);
widgets->get_widget("button_record", button_record);
widgets->get_widget("button_add_app", button_add_app);
widgets->get_widget("button_add_group", button_add_group);
Expand All @@ -141,6 +143,7 @@ Actions::Actions() :
widgets->get_widget("vpaned_apps", vpaned_apps);
button_record->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_button_record));
button_delete->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_button_delete));
button_dup->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_button_dup));
button_add->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_button_new));
button_add_app->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_add_app));
button_add_group->signal_clicked().connect(sigc::mem_fun(*this, &Actions::on_add_group));
Expand Down Expand Up @@ -474,7 +477,7 @@ void Actions::on_type_edited(const Glib::ustring &path, const Glib::ustring &new
update_actions();
}
editing_new = false;
focus(row[cols.id], 3, edit);
if (new_type != MISC) focus(row[cols.id], 3, edit);
}

void Actions::on_button_delete() {
Expand Down Expand Up @@ -511,6 +514,40 @@ void Actions::on_button_delete() {
update_counts();
}

void Actions::on_button_dup() {
editing_new = true;
Unique *before = 0;
Glib::ustring name;
if (tv.get_selection()->count_selected_rows()) {
std::vector<Gtk::TreePath> paths = tv.get_selection()->get_selected_rows();
Gtk::TreeIter i = tm->get_iter(paths[paths.size()-1]);
//i++;
//if (i != tm->children().end())
before = (*i)[cols.id];
name = (*i)[cols.name];
}

RStrokeInfo src = action_list->get_info(before);

Gtk::TreeModel::Row row = *(tm->append());
StrokeInfo si;
si.action = src->action;
si.strokes = src->strokes;
Unique *id = action_list->add(si);
row[cols.id] = id;
action_list->set_name(id,name);
//std::string name;
/*if (action_list != actions.get_root())
name = action_list->name + " ";
name += Glib::ustring::compose(_("Gesture %1"), action_list->order_size());
action_list->set_name(id, name);*/

update_row(row);
focus(id, 1, true);
update_actions();
update_counts();
}

void Actions::on_cell_data_apps(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter) {
ActionListDiff *as = (*iter)[ca.actions];
Gtk::CellRendererText *renderer = dynamic_cast<Gtk::CellRendererText *>(cell);
Expand Down Expand Up @@ -789,6 +826,7 @@ void Actions::on_selection_changed() {
int n = tv.get_selection()->count_selected_rows();
button_record->set_sensitive(n == 1);
button_delete->set_sensitive(n >= 1);
button_dup->set_sensitive(n >= 1);
bool resettable = false;
if (n) {
std::vector<Gtk::TreePath> paths = tv.get_selection()->get_selected_rows();
Expand Down
3 changes: 2 additions & 1 deletion actions.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Actions {
public:
Actions();
private:
void on_button_dup();
void on_button_delete();
void on_button_new();
void on_button_record();
Expand Down Expand Up @@ -138,7 +139,7 @@ class Actions {

Glib::RefPtr<Gtk::ListStore> type_store;

Gtk::Button *button_record, *button_delete, *button_remove_app, *button_reset_actions;
Gtk::Button *button_record, *button_delete, *button_remove_app, *button_reset_actions, *button_dup;
Gtk::CheckButton *check_show_deleted;
Gtk::Expander *expander_apps;
Gtk::VPaned *vpaned_apps;
Expand Down
Loading