]> git.pld-linux.org Git - packages/WindowMaker.git/blame - WindowMaker-singleclick.patch
- rel 19; fix build
[packages/WindowMaker.git] / WindowMaker-singleclick.patch
CommitLineData
8a5e3c0d 1--- WindowMaker-0.65.1/WPrefs.app/Expert.c.orig Mon Jun 4 19:47:32 2001
2+++ WindowMaker-0.65.1/WPrefs.app/Expert.c Thu Jul 26 12:09:03 2001
43612bfa 3@@ -33,7 +33,7 @@
6a57ca28 4
43612bfa
JR
5 WMWidget *parent;
6
7- WMButton *swi[8];
f6599bda 8+ WMButton *swi[10];
43612bfa
JR
9
10 } _Panel;
11
12@@ -54,6 +54,7 @@
6a57ca28
JR
13 WMSetButtonSelected(panel->swi[4], GetBoolForKey("DontConfirmKill"));
14 WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking"));
15 WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText"));
16+ WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch"));
43612bfa
JR
17 }
18
19
20@@ -66,7 +67,7 @@
21 panel->box = WMCreateBox(panel->parent);
ffba6295 22 WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
43612bfa 23
6a57ca28
JR
24- for (i=0; i<7; i++) {
25+ for (i=0; i<8; i++) {
26 panel->swi[i] = WMCreateSwitchButton(panel->box);
27 WMResizeWidget(panel->swi[i], FRAME_WIDTH-40, 25);
28 WMMoveWidget(panel->swi[i], 20, 20+i*25);
43612bfa 29@@ -79,6 +80,7 @@
6a57ca28
JR
30 WMSetButtonText(panel->swi[4], _("Disable confirmation panel for the Kill command."));
31 WMSetButtonText(panel->swi[5], _("Disable selection animation for selected icons."));
32 WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart)."));
4283313b 33+ WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click"));
43612bfa 34
6a57ca28
JR
35 WMSetButtonEnabled(panel->swi[6], True);
36
43612bfa 37@@ -101,6 +103,7 @@
6a57ca28
JR
38 SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill");
39 SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking");
40 SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText");
4283313b 41+ SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch");
43612bfa
JR
42 }
43
44
45diff -ur WindowMaker-0.64.0/src/WindowMaker.h WindowMaker-0.64.0.new/src/WindowMaker.h
46--- WindowMaker-0.64.0/src/WindowMaker.h Fri Feb 9 16:56:53 2001
47+++ WindowMaker-0.64.0.new/src/WindowMaker.h Wed Mar 21 19:59:08 2001
48@@ -435,6 +435,9 @@
149d7ea9 49 /* shading animation */
dab91712 50 signed char shade_speed;
149d7ea9
JR
51
52+ /* single click to lauch applications */
53+ char single_click;
54+
55 int edge_resistance;
5a1d6215 56 char attract;
149d7ea9 57
43612bfa
JR
58diff -ur WindowMaker-0.64.0/src/appicon.c WindowMaker-0.64.0.new/src/appicon.c
59--- WindowMaker-0.64.0/src/appicon.c Thu Jan 18 20:21:57 2001
60+++ WindowMaker-0.64.0.new/src/appicon.c Wed Mar 21 19:59:08 2001
ffba6295 61@@ -704,6 +704,7 @@
149d7ea9
JR
62 int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0;
63 int ix, iy;
64 int clickButton = event->xbutton.button;
6a57ca28 65+ Bool hasMoved;
149d7ea9
JR
66 Pixmap ghost = None;
67 Window wins[2];
ffba6295 68 Bool movingSingle = False;
69@@ -785,6 +786,7 @@
149d7ea9
JR
70 XClearWindow(dpy, scr->dock_shadow);
71 }
6a57ca28 72
ffba6295 73+ hasMoved = False;
149d7ea9 74 while (!done) {
6a57ca28
JR
75 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
76 |ButtonMotionMask|ExposureMask, &ev);
ffba6295 77@@ -794,6 +796,7 @@
6a57ca28 78 break;
149d7ea9 79
6a57ca28
JR
80 case MotionNotify:
81+ hasMoved = True;
82 if (!grabbed) {
83 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
84 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
ffba6295 85@@ -943,6 +946,9 @@
6a57ca28
JR
86 wArrangeIcons(scr, True);
87
88 done = 1;
89+ if (!hasMoved && wPreferences.single_click) {
90+ iconDblClick(desc, event);
91+ }
92 break;
93 }
149d7ea9 94 }
43612bfa
JR
95diff -ur WindowMaker-0.64.0/src/defaults.c WindowMaker-0.64.0.new/src/defaults.c
96--- WindowMaker-0.64.0/src/defaults.c Thu Jan 18 20:21:57 2001
97+++ WindowMaker-0.64.0.new/src/defaults.c Wed Mar 21 19:59:08 2001
260b62b4 98@@ -547,6 +547,9 @@
149d7ea9 99 {"DisableBlinking", "NO", NULL,
f6599bda 100 &wPreferences.dont_blink, getBool, NULL
149d7ea9 101 },
dab91712 102+ {"SingleClickLaunch", "NO", NULL,
43612bfa 103+ &wPreferences.single_click, getBool, NULL
dab91712 104+ },
f6599bda 105 /* style options */
dab91712 106 {"MenuStyle", "normal", seMenuStyles,
f6599bda 107 &wPreferences.menu_style, getEnum, setMenuStyle
43612bfa
JR
108diff -ur WindowMaker-0.64.0/src/dock.c WindowMaker-0.64.0.new/src/dock.c
109--- WindowMaker-0.64.0/src/dock.c Thu Jan 18 02:33:45 2001
110+++ WindowMaker-0.64.0.new/src/dock.c Wed Mar 21 19:59:08 2001
260b62b4 111@@ -3752,7 +3752,7 @@
149d7ea9
JR
112
113
114
115-static void
116+static int
117 handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
118 {
119 WScreen *scr = dock->screen_ptr;
43612bfa 120@@ -3767,11 +3767,11 @@
149d7ea9
JR
121 int ix = aicon->xindex, iy = aicon->yindex;
122 int tmp;
123 Pixmap ghost = None;
124- Bool docked;
125+ Bool docked, hasMoved;
126 int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
127 int omnipresent = aicon->omnipresent; /* this must be cached!!! */
128
43612bfa 129-
149d7ea9
JR
130+ hasMoved = False;
131 if (wPreferences.flags.noupdates)
6a57ca28 132 return;
149d7ea9 133
43612bfa 134@@ -3822,6 +3822,7 @@
6a57ca28 135 break;
149d7ea9 136
6a57ca28
JR
137 case MotionNotify:
138+ hasMoved = True;
139 if (!grabbed) {
140 if (abs(ofs_x-ev.xmotion.x)>=MOVE_THRESHOLD
141 || abs(ofs_y-ev.xmotion.y)>=MOVE_THRESHOLD) {
43612bfa 142@@ -3977,7 +3978,10 @@
149d7ea9 143 #ifdef DEBUG
6a57ca28 144 puts("End icon move");
149d7ea9 145 #endif
6a57ca28
JR
146- return;
147+ if (!hasMoved) {
148+ return 1;
149+ }
150+ return 0;
151 }
149d7ea9
JR
152 }
153 }
43612bfa 154@@ -4117,7 +4121,9 @@
149d7ea9
JR
155 else
156 handleDockMove(dock, aicon, event);
157 } else
6a57ca28
JR
158- handleIconMove(dock, aicon, event);
159+ if (handleIconMove(dock, aicon, event) != 0 &&
160+ wPreferences.single_click)
161+ iconDblClick(desc, event);
149d7ea9
JR
162
163 } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
164 aicon==scr->clip_icon) {
43612bfa
JR
165diff -ur WindowMaker-0.64.0/src/icon.c WindowMaker-0.64.0.new/src/icon.c
166--- WindowMaker-0.64.0/src/icon.c Sat Jan 6 19:54:16 2001
167+++ WindowMaker-0.64.0.new/src/icon.c Wed Mar 21 19:59:08 2001
dab91712 168@@ -874,6 +874,7 @@
149d7ea9
JR
169 int dx=event->xbutton.x, dy=event->xbutton.y;
170 int grabbed=0;
171 int clickButton=event->xbutton.button;
6a57ca28 172+ Bool hasMoved;
149d7ea9
JR
173
174 if (WCHECK_STATE(WSTATE_MODAL))
6a57ca28 175 return;
dab91712 176@@ -916,6 +917,7 @@
6a57ca28 177 wwarning("pointer grab failed for icon move");
149d7ea9
JR
178 #endif
179 }
6a57ca28 180+ hasMoved = False;
149d7ea9 181 while(1) {
6a57ca28
JR
182 WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask
183 |ButtonMotionMask|ExposureMask, &ev);
dab91712 184@@ -925,6 +927,7 @@
6a57ca28 185 break;
149d7ea9 186
6a57ca28
JR
187 case MotionNotify:
188+ hasMoved = True;
189 if (!grabbed) {
190 if (abs(dx-ev.xmotion.x)>=MOVE_THRESHOLD
191 || abs(dy-ev.xmotion.y)>=MOVE_THRESHOLD) {
dab91712 192@@ -962,6 +965,9 @@
149d7ea9 193
6a57ca28
JR
194 if (wPreferences.auto_arrange_icons)
195 wArrangeIcons(wwin->screen_ptr, True);
196+ if (!hasMoved && wPreferences.single_click) {
197+ miniwindowDblClick(desc, event);
198+ }
199 return;
200
201 }
e7e26f16
JB
202--- WindowMaker-0.92.0/WPrefs.app/po/pl.po.orig 2006-02-02 23:40:48.467023000 +0100
203+++ WindowMaker-0.92.0/WPrefs.app/po/pl.po 2006-02-02 23:44:37.461334500 +0100
204@@ -402,6 +402,10 @@
205 msgid "Smooth font edges (needs restart)."
206 msgstr "Gładkie krawędzie fontów (wymagają restartu)."
207
208+#: ../../WPrefs.app/Expert.c:83
209+msgid "Launch applications and restore windows with a single click"
210+msgstr "Uruchamiaj aplikacje i odtwarzaj okna pojedynczym kliknięciem"
211+
212 #: ../../WPrefs.app/Expert.c:117
213 msgid "Expert User Preferences"
214 msgstr "Ustawienia zaawansowanego użytkownika"
This page took 0.078842 seconds and 4 git commands to generate.