2 /* MouseSettings.c- mouse options (some are equivalent to xset)
4 * WPrefs - Window Maker Preferences Program
6 * Copyright (c) 1998-2003 Alfredo K. Kojima
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #include <X11/Xutil.h>
26 #include <X11/XKBlib.h>
34 typedef struct _Panel
{
41 CallbackRec callbacks
;
64 WMPopUpButton
*button1P
;
65 WMPopUpButton
*button2P
;
66 WMPopUpButton
*button3P
;
67 WMPopUpButton
*wheelP
;
74 /**/ int maxThreshold
;
78 #define ICON_FILE "mousesettings"
80 #define SPEED_ICON_FILE "mousespeed"
82 #define DELAY_ICON "timer%i"
83 #define DELAY_ICON_S "timer%is"
85 /* need access to the double click variables */
86 #include <WINGs/WINGsP.h>
88 static char *modifierNames
[8];
90 static char *buttonActions
[4];
92 static char *wheelActions
[2];
94 #define DELAY(i) ((i)*75+170)
97 static void setMouseAccel(WMScreen
* scr
, float accel
, int threshold
)
104 XChangePointerControl(WMScreenDisplay(scr
), True
, True
, n
, d
, threshold
);
107 static void speedChange(WMWidget
* w
, void *data
)
109 _Panel
*panel
= (_Panel
*) data
;
118 tmp
= WMGetTextFieldText(panel
->acceT
);
119 if (sscanf(tmp
, "%f", &accel
) != 1 || accel
< 0) {
120 WMRunAlertPanel(WMWidgetScreen(panel
->acceT
), GetWindow(),
122 _("Invalid mouse acceleration value. Must be a positive real value."),
123 _("OK"), NULL
, NULL
);
127 panel
->acceleration
= accel
;
130 i
= (int)WMGetSliderValue(panel
->speedS
);
132 panel
->acceleration
= 0.25 + (i
* 0.25);
134 sprintf(buffer
, "%.2f", 0.25 + (i
* 0.25));
135 WMSetTextFieldText(panel
->acceT
, buffer
);
138 tmp
= WMGetTextFieldText(panel
->threT
);
139 if (sscanf(tmp
, "%i", &threshold
) != 1 || threshold
< 0 || threshold
> panel
->maxThreshold
) {
140 WMRunAlertPanel(WMWidgetScreen(panel
->parent
), GetWindow(), _("Error"),
142 ("Invalid mouse acceleration threshold value. Must be the number of pixels to travel before accelerating."),
143 _("OK"), NULL
, NULL
);
145 setMouseAccel(WMWidgetScreen(panel
->parent
), panel
->acceleration
, threshold
);
150 static void returnPressed(void *observerData
, WMNotification
* notification
)
152 _Panel
*panel
= (_Panel
*) observerData
;
154 /* Parameter not used, but tell the compiler that it is ok */
157 speedChange(NULL
, panel
);
160 static void doubleClick(WMWidget
* w
, void *data
)
162 _Panel
*panel
= (_Panel
*) data
;
166 for (i
= 0; i
< 5; i
++) {
167 if (panel
->ddelaB
[i
] == w
)
170 WINGsConfiguration
.doubleClickDelay
= DELAY(i
);
172 sprintf(buffer
, "%i", DELAY(i
));
173 WMSetTextFieldText(panel
->ddelaT
, buffer
);
176 static int getButtonAction(const char *str
)
181 if (strcasecmp(str
, "None") == 0)
183 else if (strcasecmp(str
, "OpenApplicationsMenu") == 0)
185 else if (strcasecmp(str
, "OpenWindowListMenu") == 0)
187 else if (strcasecmp(str
, "SelectWindows") == 0)
194 static int getWheelAction(const char *str
)
199 if (strcasecmp(str
, "None") == 0)
201 else if (strcasecmp(str
, "SwitchWorkspaces") == 0)
208 static void getMouseParameters(Display
* dpy
, float *accel
, int *thre
)
212 XGetPointerControl(dpy
, &n
, &d
, thre
);
214 *accel
= (float)n
/ (float)d
;
217 static void showData(_Panel
* panel
)
221 int a
= -1, b
= -1, c
= -1, w
= -1;
224 Display
*dpy
= WMScreenDisplay(WMWidgetScreen(panel
->parent
));
226 str
= GetStringForKey("MouseLeftButtonAction");
227 i
= getButtonAction(str
);
231 wwarning(_("bad value %s for option %s"), str
, "MouseLeftButtonAction");
236 WMSetPopUpButtonSelectedItem(panel
->button1P
, a
);
238 str
= GetStringForKey("MouseMiddleButtonAction");
239 i
= getButtonAction(str
);
243 wwarning(_("bad value %s for option %s"), str
, "MouseMiddleButtonAction");
248 WMSetPopUpButtonSelectedItem(panel
->button2P
, b
);
250 str
= GetStringForKey("MouseRightButtonAction");
251 i
= getButtonAction(str
);
255 wwarning(_("bad value %s for option %s"), str
, "MouseRightButtonAction");
260 WMSetPopUpButtonSelectedItem(panel
->button3P
, c
);
262 str
= GetStringForKey("MouseWheelAction");
263 i
= getWheelAction(str
);
267 wwarning(_("bad value %s for option %s"), str
, "MouseWheelAction");
272 WMSetPopUpButtonSelectedItem(panel
->wheelP
, w
);
274 WMSetButtonSelected(panel
->disaB
, GetBoolForKey("DisableWSMouseActions"));
276 /**/ getMouseParameters(dpy
, &accel
, &a
);
277 panel
->maxThreshold
= WidthOfScreen(DefaultScreenOfDisplay(dpy
));
278 if (a
> panel
->maxThreshold
) {
279 panel
->maxThreshold
= a
;
281 sprintf(buffer
, "%i", a
);
282 WMSetTextFieldText(panel
->threT
, buffer
);
284 WMSetSliderValue(panel
->speedS
, (accel
- 0.25) / 0.25);
286 panel
->acceleration
= accel
;
287 sprintf(buffer
, "%.2f", accel
);
288 WMSetTextFieldText(panel
->acceT
, buffer
);
290 /**/ b
= GetIntegerForKey("DoubleClickTime");
291 /* find best match */
293 for (i
= 0; i
< 5; i
++) {
298 WMPerformButtonClick(panel
->ddelaB
[a
]);
299 sprintf(buffer
, "%i", b
);
300 WMSetTextFieldText(panel
->ddelaT
, buffer
);
302 /**/ str
= GetStringForKey("ModifierKey");
305 a
= ModifierFromKey(dpy
, str
);
308 str
= modifierNames
[a
];
311 for (i
= 0; i
< WMGetPopUpButtonNumberOfItems(panel
->grabP
); i
++) {
312 if (strstr(WMGetPopUpButtonItem(panel
->grabP
, i
), str
)) {
313 WMSetPopUpButtonSelectedItem(panel
->grabP
, i
);
323 previous
= WMGetPopUpButtonItem(panel
->grabP
, 0);
324 if (previous
!= NULL
)
325 WMSetPopUpButtonSelectedItem(panel
->grabP
, 0);
326 wwarning(_("modifier key %s for option ModifierKey was not recognized. Using %s as default"),
327 str
, previous
?previous
:"(empty)");
331 static void fillModifierPopUp(WMPopUpButton
* pop
)
333 XModifierKeymap
*mapping
;
334 Display
*dpy
= WMScreenDisplay(WMWidgetScreen(pop
));
339 mapping
= XGetModifierMapping(dpy
);
341 if (!mapping
|| mapping
->max_keypermod
== 0) {
342 WMAddPopUpButtonItem(pop
, "Mod1");
343 WMAddPopUpButtonItem(pop
, "Mod2");
344 WMAddPopUpButtonItem(pop
, "Mod3");
345 WMAddPopUpButtonItem(pop
, "Mod4");
346 WMAddPopUpButtonItem(pop
, "Mod5");
347 wwarning(_("could not retrieve keyboard modifier mapping"));
351 for (j
= 0; j
< 8; j
++) {
361 memset(array
, 0, sizeof(char *) * 8);
362 for (i
= 0; i
< mapping
->max_keypermod
; i
++) {
363 idx
= i
+ j
* mapping
->max_keypermod
;
364 if (mapping
->modifiermap
[idx
] != 0) {
366 for (l
= 0; l
< 4; l
++) {
367 if (xext_xkb_supported
)
368 ksym
= XkbKeycodeToKeysym(dpy
, mapping
->modifiermap
[idx
], 0, l
);
370 ksym
= XKeycodeToKeysym(dpy
, mapping
->modifiermap
[idx
], 0);
371 if (ksym
!= NoSymbol
)
374 if (ksym
!= NoSymbol
)
375 str
= XKeysymToString(ksym
);
378 if (str
&& !strstr(str
, "_Lock") && !strstr(str
, "Shift")
379 && !strstr(str
, "Control")) {
380 array
[a
++] = wstrdup(str
);
385 for (k
= 0; k
< a
; k
++) {
386 if (array
[k
] == NULL
)
388 tmp
= wstrdup(array
[k
]);
389 ptr
= strstr(tmp
, "_L");
392 ptr
= strstr(tmp
, "_R");
395 sprintf(buffer
, "%s (%s)", modifierNames
[j
], tmp
);
396 /*sprintf(buffer, "%s", tmp); */
397 WMAddPopUpButtonItem(pop
, buffer
);
398 for (i
= k
+ 1; i
< a
; i
++) {
399 if (array
[i
] == NULL
)
401 if (strstr(array
[i
], tmp
)) {
417 XFreeModifiermap(mapping
);
420 static void createPanel(Panel
* p
)
422 _Panel
*panel
= (_Panel
*) p
;
423 WMScreen
*scr
= WMWidgetScreen(panel
->parent
);
434 panel
->box
= WMCreateBox(panel
->parent
);
435 WMSetViewExpandsToParent(WMWidgetView(panel
->box
), 2, 2, 2, 2);
437 /**************** Mouse Speed ****************/
438 panel
->speedF
= WMCreateFrame(panel
->box
);
439 WMResizeWidget(panel
->speedF
, 225, 100);
440 WMMoveWidget(panel
->speedF
, 15, 5);
441 WMSetFrameTitle(panel
->speedF
, _("Mouse Speed"));
443 panel
->speedL
= WMCreateLabel(panel
->speedF
);
444 WMResizeWidget(panel
->speedL
, 40, 46);
445 WMMoveWidget(panel
->speedL
, 10, 14);
446 WMSetLabelImagePosition(panel
->speedL
, WIPImageOnly
);
447 path
= LocateImage(SPEED_ICON_FILE
);
449 icon
= WMCreateBlendedPixmapFromFile(scr
, path
, &color
);
451 WMSetLabelImage(panel
->speedL
, icon
);
452 WMReleasePixmap(icon
);
454 wwarning(_("could not load icon %s"), path
);
459 panel
->speedS
= WMCreateSlider(panel
->speedF
);
460 WMResizeWidget(panel
->speedS
, 150, 15);
461 WMMoveWidget(panel
->speedS
, 60, 35);
462 WMSetSliderMinValue(panel
->speedS
, 0);
463 WMSetSliderMaxValue(panel
->speedS
, 40);
464 WMSetSliderContinuous(panel
->speedS
, False
);
465 WMSetSliderAction(panel
->speedS
, speedChange
, panel
);
467 panel
->acceL
= WMCreateLabel(panel
->speedF
);
468 WMResizeWidget(panel
->acceL
, 50, 16);
469 WMMoveWidget(panel
->acceL
, 10, 67);
470 WMSetLabelTextAlignment(panel
->acceL
, WARight
);
471 WMSetLabelText(panel
->acceL
, _("Accel.:"));
473 panel
->acceT
= WMCreateTextField(panel
->speedF
);
474 WMResizeWidget(panel
->acceT
, 40, 20);
475 WMMoveWidget(panel
->acceT
, 60, 65);
476 WMAddNotificationObserver(returnPressed
, panel
, WMTextDidEndEditingNotification
, panel
->acceT
);
478 panel
->threL
= WMCreateLabel(panel
->speedF
);
479 WMResizeWidget(panel
->threL
, 80, 16);
480 WMMoveWidget(panel
->threL
, 100, 67);
481 WMSetLabelTextAlignment(panel
->threL
, WARight
);
482 WMSetLabelText(panel
->threL
, _("Threshold:"));
484 panel
->threT
= WMCreateTextField(panel
->speedF
);
485 WMResizeWidget(panel
->threT
, 30, 20);
486 WMMoveWidget(panel
->threT
, 180, 65);
487 WMAddNotificationObserver(returnPressed
, panel
, WMTextDidEndEditingNotification
, panel
->threT
);
489 WMMapSubwidgets(panel
->speedF
);
491 /***************** Doubleclick Delay ****************/
493 panel
->ddelaF
= WMCreateFrame(panel
->box
);
494 WMResizeWidget(panel
->ddelaF
, 225, 105);
495 WMMoveWidget(panel
->ddelaF
, 15, 115);
496 WMSetFrameTitle(panel
->ddelaF
, _("Double-Click Delay"));
498 buf1
= wmalloc(strlen(DELAY_ICON
) + 2);
499 buf2
= wmalloc(strlen(DELAY_ICON_S
) + 2);
501 for (i
= 0; i
< 5; i
++) {
502 panel
->ddelaB
[i
] = WMCreateCustomButton(panel
->ddelaF
, WBBStateChangeMask
);
503 WMResizeWidget(panel
->ddelaB
[i
], 25, 25);
504 WMMoveWidget(panel
->ddelaB
[i
], 20 + (40 * i
), 25);
505 WMSetButtonBordered(panel
->ddelaB
[i
], False
);
506 WMSetButtonImagePosition(panel
->ddelaB
[i
], WIPImageOnly
);
507 WMSetButtonAction(panel
->ddelaB
[i
], doubleClick
, panel
);
509 WMGroupButtons(panel
->ddelaB
[0], panel
->ddelaB
[i
]);
511 sprintf(buf1
, DELAY_ICON
, i
+ 1);
512 sprintf(buf2
, DELAY_ICON_S
, i
+ 1);
513 path
= LocateImage(buf1
);
515 icon
= WMCreatePixmapFromFile(scr
, path
);
517 WMSetButtonImage(panel
->ddelaB
[i
], icon
);
518 WMReleasePixmap(icon
);
520 wwarning(_("could not load icon file %s"), path
);
524 path
= LocateImage(buf2
);
526 icon
= WMCreatePixmapFromFile(scr
, path
);
528 WMSetButtonAltImage(panel
->ddelaB
[i
], icon
);
529 WMReleasePixmap(icon
);
531 wwarning(_("could not load icon file %s"), path
);
539 panel
->tester
= CreateDoubleTest(panel
->ddelaF
, _("Test"));
540 WMResizeWidget(panel
->tester
, 84, 29);
541 WMMoveWidget(panel
->tester
, 25, 60);
543 panel
->ddelaT
= WMCreateTextField(panel
->ddelaF
);
544 WMResizeWidget(panel
->ddelaT
, 40, 20);
545 WMMoveWidget(panel
->ddelaT
, 130, 65);
547 panel
->ddelaL
= WMCreateLabel(panel
->ddelaF
);
548 WMResizeWidget(panel
->ddelaL
, 40, 16);
549 WMMoveWidget(panel
->ddelaL
, 175, 70);
554 font
= WMSystemFontOfSize(scr
, 10);
555 color
= WMDarkGrayColor(scr
);
556 WMSetLabelTextColor(panel
->ddelaL
, color
);
557 WMSetLabelFont(panel
->ddelaL
, font
);
559 WMReleaseColor(color
);
561 WMSetLabelText(panel
->ddelaL
, _("msec"));
563 WMMapSubwidgets(panel
->ddelaF
);
565 /* ************** Workspace Action Buttons **************** */
566 panel
->menuF
= WMCreateFrame(panel
->box
);
567 WMResizeWidget(panel
->menuF
, 260, 160);
568 WMMoveWidget(panel
->menuF
, 250, 5);
569 WMSetFrameTitle(panel
->menuF
, _("Workspace Mouse Actions"));
571 panel
->disaB
= WMCreateSwitchButton(panel
->menuF
);
572 WMResizeWidget(panel
->disaB
, 205, 18);
573 WMMoveWidget(panel
->disaB
, 10, 18);
574 WMSetButtonText(panel
->disaB
, _("Disable mouse actions"));
576 panel
->button1L
= WMCreateLabel(panel
->menuF
);
577 WMResizeWidget(panel
->button1L
, 107, 20);
578 WMMoveWidget(panel
->button1L
, 5, 45);
579 WMSetLabelTextAlignment(panel
->button1L
, WARight
);
580 WMSetLabelText(panel
->button1L
, _("Left Button"));
582 panel
->button1P
= WMCreatePopUpButton(panel
->menuF
);
583 WMResizeWidget(panel
->button1P
, 135, 20);
584 WMMoveWidget(panel
->button1P
, 115, 45);
586 panel
->button2L
= WMCreateLabel(panel
->menuF
);
587 WMResizeWidget(panel
->button2L
, 107, 20);
588 WMMoveWidget(panel
->button2L
, 5, 73);
589 WMSetLabelTextAlignment(panel
->button2L
, WARight
);
590 WMSetLabelText(panel
->button2L
, _("Middle Button"));
592 panel
->button2P
= WMCreatePopUpButton(panel
->menuF
);
593 WMResizeWidget(panel
->button2P
, 135, 20);
594 WMMoveWidget(panel
->button2P
, 115, 73);
596 panel
->button3L
= WMCreateLabel(panel
->menuF
);
597 WMResizeWidget(panel
->button3L
, 107, 20);
598 WMMoveWidget(panel
->button3L
, 5, 101);
599 WMSetLabelTextAlignment(panel
->button3L
, WARight
);
600 WMSetLabelText(panel
->button3L
, _("Right Button"));
602 panel
->button3P
= WMCreatePopUpButton(panel
->menuF
);
603 WMResizeWidget(panel
->button3P
, 135, 20);
604 WMMoveWidget(panel
->button3P
, 115, 101);
606 panel
->wheelL
= WMCreateLabel(panel
->menuF
);
607 WMResizeWidget(panel
->wheelL
, 107, 20);
608 WMMoveWidget(panel
->wheelL
, 5, 129);
609 WMSetLabelTextAlignment(panel
->wheelL
, WARight
);
610 WMSetLabelText(panel
->wheelL
, _("Mouse Wheel"));
612 panel
->wheelP
= WMCreatePopUpButton(panel
->menuF
);
613 WMResizeWidget(panel
->wheelP
, 135, 20);
614 WMMoveWidget(panel
->wheelP
, 115, 129);
616 for (i
= 0; i
< wlengthof(buttonActions
); i
++) {
617 WMAddPopUpButtonItem(panel
->button1P
, buttonActions
[i
]);
618 WMAddPopUpButtonItem(panel
->button2P
, buttonActions
[i
]);
619 WMAddPopUpButtonItem(panel
->button3P
, buttonActions
[i
]);
622 for (i
= 0; i
< wlengthof(wheelActions
); i
++) {
623 WMAddPopUpButtonItem(panel
->wheelP
, wheelActions
[i
]);
626 WMMapSubwidgets(panel
->menuF
);
628 /* ************** Grab Modifier **************** */
629 panel
->grabF
= WMCreateFrame(panel
->box
);
630 WMResizeWidget(panel
->grabF
, 260, 50);
631 WMMoveWidget(panel
->grabF
, 250, 170);
632 WMSetFrameTitle(panel
->grabF
, _("Mouse Grab Modifier"));
634 WMSetBalloonTextForView(_("Keyboard modifier to use for actions that\n"
635 "involve dragging windows with the mouse,\n"
636 "clicking inside the window."), WMWidgetView(panel
->grabF
));
638 panel
->grabP
= WMCreatePopUpButton(panel
->grabF
);
639 WMResizeWidget(panel
->grabP
, 160, 20);
640 WMMoveWidget(panel
->grabP
, 50, 20);
642 fillModifierPopUp(panel
->grabP
);
644 WMMapSubwidgets(panel
->grabF
);
646 WMRealizeWidget(panel
->box
);
647 WMMapSubwidgets(panel
->box
);
652 static void storeCommandInScript(const char *cmd
, const char *line
)
658 path
= wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
660 f
= fopen(path
, "rb");
662 f
= fopen(path
, "wb");
664 werror(_("could not create %s"), path
);
667 fprintf(f
, "#!/bin/sh\n");
671 int len
= strlen(cmd
);
676 tmppath
= wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
677 fo
= fopen(tmppath
, "wb");
679 werror(_("could not create temporary file %s"), tmppath
);
685 if (!fgets(buffer
, 127, f
)) {
688 if (buffer
[0] == '\n') {
689 /* don't write empty lines, else the file will grow
690 * indefinitely (one '\n' added at end of file on each save).
694 if (strncmp(buffer
, cmd
, len
) == 0) {
711 if (rename(tmppath
, path
) != 0) {
712 werror(_("could not rename file %s to %s"), tmppath
, path
);
716 sprintf(buffer
, "chmod u+x %s", path
);
717 if (system(buffer
) == -1)
718 werror(_("could not execute command \"%s\""), buffer
);
723 fsync(fileno(f
)); /* this may be rw */
728 static void storeData(_Panel
* panel
)
733 static char *button
[4] = { "None", "OpenApplicationsMenu", "OpenWindowListMenu", "SelectWindows" };
734 static char *wheel
[2] = { "None", "SwitchWorkspaces" };
735 WMUserDefaults
*udb
= WMGetStandardUserDefaults();
737 if (!WMGetUDBoolForKey(udb
, "NoXSetStuff")) {
738 tmp
= WMGetTextFieldText(panel
->threT
);
739 if (strlen(tmp
) == 0) {
744 sprintf(buffer
, XSET
" m %i/%i %s\n", (int)(panel
->acceleration
* 10), 10, tmp
);
745 storeCommandInScript(XSET
" m", buffer
);
750 tmp
= WMGetTextFieldText(panel
->ddelaT
);
751 if (sscanf(tmp
, "%i", &i
) == 1 && i
> 0)
752 SetIntegerForKey(i
, "DoubleClickTime");
755 SetBoolForKey(WMGetButtonSelected(panel
->disaB
), "DisableWSMouseActions");
757 i
= WMGetPopUpButtonSelectedItem(panel
->button1P
);
758 SetStringForKey(button
[i
], "MouseLeftButtonAction");
760 i
= WMGetPopUpButtonSelectedItem(panel
->button2P
);
761 SetStringForKey(button
[i
], "MouseMiddleButtonAction");
763 i
= WMGetPopUpButtonSelectedItem(panel
->button3P
);
764 SetStringForKey(button
[i
], "MouseRightButtonAction");
766 i
= WMGetPopUpButtonSelectedItem(panel
->wheelP
);
767 SetStringForKey(wheel
[i
], "MouseWheelAction");
769 tmp
= WMGetPopUpButtonItem(panel
->grabP
, WMGetPopUpButtonSelectedItem(panel
->grabP
));
771 p
= strchr(tmp
, ' ');
775 SetStringForKey(tmp
, "ModifierKey");
780 Panel
*InitMouseSettings(WMWidget
*parent
)
784 modifierNames
[0] = wstrdup(_("Shift"));
785 modifierNames
[1] = wstrdup(_("Lock"));
786 modifierNames
[2] = wstrdup(_("Control"));
787 modifierNames
[3] = wstrdup(_("Mod1"));
788 modifierNames
[4] = wstrdup(_("Mod2"));
789 modifierNames
[5] = wstrdup(_("Mod3"));
790 modifierNames
[6] = wstrdup(_("Mod4"));
791 modifierNames
[7] = wstrdup(_("Mod5"));
793 buttonActions
[0] = wstrdup(_("None"));
794 buttonActions
[1] = wstrdup(_("Applications Menu"));
795 buttonActions
[2] = wstrdup(_("Window List Menu"));
796 buttonActions
[3] = wstrdup(_("Select Windows"));
798 wheelActions
[0] = wstrdup(_("None"));
799 wheelActions
[1] = wstrdup(_("Switch Workspaces"));
801 panel
= wmalloc(sizeof(_Panel
));
803 panel
->sectionName
= _("Mouse Preferences");
805 panel
->description
= _("Mouse speed/acceleration, double click delay,\n" "mouse button bindings etc.");
807 panel
->parent
= parent
;
809 panel
->callbacks
.createWidgets
= createPanel
;
810 panel
->callbacks
.updateDomain
= storeData
;
812 AddSection(panel
, ICON_FILE
);