updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / easystroke-mt / easystroke_tablet.patch
blob21da0ec6f2f7a2728b65dd84fce395df0ad9b2a7
1 --- easystroke-0.5.5.1/win.cc 2011-08-16 10:11:40.000000000 +0200
2 +++ easystroke-0.5.5.1-mod/win.cc 2011-08-30 07:16:39.000000000 +0200
3 @@ -158,6 +158,10 @@
4 prefs.tray_icon.connect(new Notifier(sigc::mem_fun(*this, &Win::show_hide_icon)));
5 disabled.connect(new Notifier(sigc::mem_fun(*this, &Win::timeout)));
7 + WIDGET(Gtk::MenuItem, menu_preferences, _("_Preferences"), true);
8 + menu.append(menu_preferences);
9 + menu_preferences.signal_activate().connect(sigc::mem_fun(*this, &Win::show_hide));
11 WIDGET(Gtk::CheckMenuItem, menu_disabled, _("D_isabled"), true);
12 menu.append(menu_disabled);
13 new MenuCheck(disabled, &menu_disabled);
14 @@ -194,11 +198,15 @@
15 extern void icon_warning();
17 static gboolean icon_clicked(GtkStatusIcon *status_icon, GdkEventButton *event, gpointer) {
18 - if (event->button == 2)
19 + if (event->button == 1)
20 disabled.set(!disabled.get());
21 return TRUE;
24 +void Win::activate_flip() {
25 + disabled.set(!disabled.get());
28 void Win::show_hide_icon() {
29 bool show = prefs.tray_icon.get();
30 if (show) {
31 @@ -206,10 +214,12 @@
32 return;
33 icon = Gtk::StatusIcon::create("");
34 icon->signal_size_changed().connect(sigc::mem_fun(*this, &Win::on_icon_size_changed));
35 - icon->signal_activate().connect(sigc::mem_fun(*this, &Win::show_hide));
36 + icon->signal_activate().connect(sigc::mem_fun(*this, &Win::activate_flip));
37 icon->signal_popup_menu().connect(sigc::mem_fun(*this, &Win::show_popup));
38 - if (gtk_major_version >= 2 && gtk_minor_version >= 15)
39 +/*
40 + if (gtk_major_version > 2 || ( gtk_major_version == 2 && gtk_minor_version >= 15 ) )
41 g_signal_connect(icon->gobj(), "button-release-event", G_CALLBACK(icon_clicked), NULL);
42 +*/
43 } else {
44 if (icon)
45 icon.reset();
46 --- easystroke-0.5.5.1/win.h 2011-08-16 10:11:40.000000000 +0200
47 +++ easystroke-0.5.5.1-mod/win.h 2011-08-30 07:17:08.000000000 +0200
48 @@ -57,6 +57,7 @@
49 boost::shared_ptr<Actions> actions;
50 boost::shared_ptr<Prefs> prefs_tab;
51 boost::shared_ptr<Stats> stats;
52 + void activate_flip();
53 void show_hide();
54 void set_icon(RStroke stroke, bool invert);
55 private: