]>
Commit | Line | Data |
---|---|---|
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 | |
3 | @@ -33,7 +33,7 @@ | |
4 | ||
5 | WMWidget *parent; | |
6 | ||
7 | - WMButton *swi[8]; | |
8 | + WMButton *swi[10]; | |
9 | ||
10 | } _Panel; | |
11 | ||
12 | @@ -54,6 +54,7 @@ | |
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")); | |
17 | } | |
18 | ||
19 | ||
20 | @@ -66,7 +67,7 @@ | |
21 | panel->box = WMCreateBox(panel->parent); | |
22 | WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); | |
23 | ||
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); | |
29 | @@ -79,6 +80,7 @@ | |
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).")); | |
33 | + WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click")); | |
34 | ||
35 | WMSetButtonEnabled(panel->swi[6], True); | |
36 | ||
37 | @@ -101,6 +103,7 @@ | |
38 | SetBoolForKey(WMGetButtonSelected(panel->swi[4]), "DontConfirmKill"); | |
39 | SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking"); | |
40 | SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText"); | |
41 | + SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch"); | |
42 | } | |
43 | ||
44 | ||
45 | diff -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 @@ | |
49 | /* shading animation */ | |
50 | signed char shade_speed; | |
51 | ||
52 | + /* single click to lauch applications */ | |
53 | + char single_click; | |
54 | + | |
55 | int edge_resistance; | |
56 | char attract; | |
57 | ||
58 | diff -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 | |
61 | @@ -704,6 +704,7 @@ | |
62 | int shad_x = 0, shad_y = 0, docking=0, dockable, collapsed = 0; | |
63 | int ix, iy; | |
64 | int clickButton = event->xbutton.button; | |
65 | + Bool hasMoved; | |
66 | Pixmap ghost = None; | |
67 | Window wins[2]; | |
68 | Bool movingSingle = False; | |
69 | @@ -785,6 +786,7 @@ | |
70 | XClearWindow(dpy, scr->dock_shadow); | |
71 | } | |
72 | ||
73 | + hasMoved = False; | |
74 | while (!done) { | |
75 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
76 | |ButtonMotionMask|ExposureMask, &ev); | |
77 | @@ -794,6 +796,7 @@ | |
78 | break; | |
79 | ||
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) { | |
85 | @@ -943,6 +946,9 @@ | |
86 | wArrangeIcons(scr, True); | |
87 | ||
88 | done = 1; | |
89 | + if (!hasMoved && wPreferences.single_click) { | |
90 | + iconDblClick(desc, event); | |
91 | + } | |
92 | break; | |
93 | } | |
94 | } | |
95 | diff -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 | |
98 | @@ -547,6 +547,9 @@ | |
99 | {"DisableBlinking", "NO", NULL, | |
100 | &wPreferences.dont_blink, getBool, NULL | |
101 | }, | |
102 | + {"SingleClickLaunch", "NO", NULL, | |
103 | + &wPreferences.single_click, getBool, NULL | |
104 | + }, | |
105 | /* style options */ | |
106 | {"MenuStyle", "normal", seMenuStyles, | |
107 | &wPreferences.menu_style, getEnum, setMenuStyle | |
108 | diff -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 | |
111 | @@ -3752,7 +3752,7 @@ | |
112 | ||
113 | ||
114 | ||
115 | -static void | |
116 | +static int | |
117 | handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event) | |
118 | { | |
119 | WScreen *scr = dock->screen_ptr; | |
120 | @@ -3767,11 +3767,11 @@ | |
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 | ||
129 | - | |
130 | + hasMoved = False; | |
131 | if (wPreferences.flags.noupdates) | |
132 | return; | |
133 | ||
134 | @@ -3822,6 +3822,7 @@ | |
135 | break; | |
136 | ||
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) { | |
142 | @@ -3977,7 +3978,10 @@ | |
143 | #ifdef DEBUG | |
144 | puts("End icon move"); | |
145 | #endif | |
146 | - return; | |
147 | + if (!hasMoved) { | |
148 | + return 1; | |
149 | + } | |
150 | + return 0; | |
151 | } | |
152 | } | |
153 | } | |
154 | @@ -4117,7 +4121,9 @@ | |
155 | else | |
156 | handleDockMove(dock, aicon, event); | |
157 | } else | |
158 | - handleIconMove(dock, aicon, event); | |
159 | + if (handleIconMove(dock, aicon, event) != 0 && | |
160 | + wPreferences.single_click) | |
161 | + iconDblClick(desc, event); | |
162 | ||
163 | } else if (event->xbutton.button==Button2 && dock->type==WM_CLIP && | |
164 | aicon==scr->clip_icon) { | |
165 | diff -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 | |
168 | @@ -874,6 +874,7 @@ | |
169 | int dx=event->xbutton.x, dy=event->xbutton.y; | |
170 | int grabbed=0; | |
171 | int clickButton=event->xbutton.button; | |
172 | + Bool hasMoved; | |
173 | ||
174 | if (WCHECK_STATE(WSTATE_MODAL)) | |
175 | return; | |
176 | @@ -916,6 +917,7 @@ | |
177 | wwarning("pointer grab failed for icon move"); | |
178 | #endif | |
179 | } | |
180 | + hasMoved = False; | |
181 | while(1) { | |
182 | WMMaskEvent(dpy, PointerMotionMask|ButtonReleaseMask|ButtonPressMask | |
183 | |ButtonMotionMask|ExposureMask, &ev); | |
184 | @@ -925,6 +927,7 @@ | |
185 | break; | |
186 | ||
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) { | |
192 | @@ -962,6 +965,9 @@ | |
193 | ||
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 | } | |
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" |