forked from enlightenment/enlightenment
illogict - patch. lefty mouse etc.
- e-config-pointer_mapping_support.patch: and actually use that on Enlightenment SVN revision: 36114
This commit is contained in:
parent
112412f7c3
commit
bd470ac03d
|
@ -1,5 +1,5 @@
|
||||||
group "E_Config" struct {
|
group "E_Config" struct {
|
||||||
value "config_version" int: 65828;
|
value "config_version" int: 65829;
|
||||||
value "show_splash" int: 1;
|
value "show_splash" int: 1;
|
||||||
value "init_default_theme" string: "default.edj";
|
value "init_default_theme" string: "default.edj";
|
||||||
value "desktop_default_name" string: "Desktop %i, %i";
|
value "desktop_default_name" string: "Desktop %i, %i";
|
||||||
|
@ -1901,6 +1901,7 @@ group "E_Config" struct {
|
||||||
value "clientlist_warp_to_iconified_desktop" int: 0;
|
value "clientlist_warp_to_iconified_desktop" int: 0;
|
||||||
value "clientlist_limit_caption_len" int: 0;
|
value "clientlist_limit_caption_len" int: 0;
|
||||||
value "clientlist_max_caption_len" int: 2;
|
value "clientlist_max_caption_len" int: 2;
|
||||||
|
value "mouse_hand" int: 1;
|
||||||
value "mouse_accel_numerator" int: 2;
|
value "mouse_accel_numerator" int: 2;
|
||||||
value "mouse_accel_denominator" int: 1;
|
value "mouse_accel_denominator" int: 1;
|
||||||
value "mouse_accel_threshold" int: 4;
|
value "mouse_accel_threshold" int: 4;
|
||||||
|
|
|
@ -570,6 +570,7 @@ e_config_init(void)
|
||||||
E_CONFIG_VAL(D, T, clientlist_limit_caption_len, INT);
|
E_CONFIG_VAL(D, T, clientlist_limit_caption_len, INT);
|
||||||
E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
|
E_CONFIG_VAL(D, T, clientlist_max_caption_len, INT);
|
||||||
|
|
||||||
|
E_CONFIG_VAL(D, T, mouse_hand, INT);
|
||||||
E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
|
E_CONFIG_VAL(D, T, mouse_accel_numerator, INT);
|
||||||
E_CONFIG_VAL(D, T, mouse_accel_denominator, INT);
|
E_CONFIG_VAL(D, T, mouse_accel_denominator, INT);
|
||||||
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
|
E_CONFIG_VAL(D, T, mouse_accel_threshold, INT);
|
||||||
|
@ -1531,6 +1532,10 @@ e_config_init(void)
|
||||||
e_config->thumbscroll_friction = 1.0;
|
e_config->thumbscroll_friction = 1.0;
|
||||||
IFCFGEND;
|
IFCFGEND;
|
||||||
|
|
||||||
|
IFCFG(0x0125);
|
||||||
|
e_config->mouse_hand = E_MOUSE_HAND_RIGHT;
|
||||||
|
IFCFGEND;
|
||||||
|
|
||||||
e_config->config_version = E_CONFIG_FILE_VERSION;
|
e_config->config_version = E_CONFIG_FILE_VERSION;
|
||||||
|
|
||||||
#if 0 /* example of new config */
|
#if 0 /* example of new config */
|
||||||
|
@ -1653,6 +1658,7 @@ e_config_init(void)
|
||||||
E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
|
E_CONFIG_LIMIT(e_config->clientlist_sort_by, 0, 3);
|
||||||
E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
|
E_CONFIG_LIMIT(e_config->clientlist_separate_iconified_apps, 0, 2);
|
||||||
E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
|
E_CONFIG_LIMIT(e_config->clientlist_warp_to_iconified_desktop, 0, 1);
|
||||||
|
E_CONFIG_LIMIT(e_config->mouse_hand, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
|
E_CONFIG_LIMIT(e_config->clientlist_limit_caption_len, 0, 1);
|
||||||
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
|
E_CONFIG_LIMIT(e_config->clientlist_max_caption_len, 2, E_CLIENTLIST_MAX_CAPTION_LEN);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
|
||||||
/* increment this whenever a new set of config values are added but the users
|
/* increment this whenever a new set of config values are added but the users
|
||||||
* config doesn't need to be wiped - simply new values need to be put in
|
* config doesn't need to be wiped - simply new values need to be put in
|
||||||
*/
|
*/
|
||||||
#define E_CONFIG_FILE_GENERATION 0x0124
|
#define E_CONFIG_FILE_GENERATION 0x0125
|
||||||
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
|
||||||
|
|
||||||
#define E_EVAS_ENGINE_DEFAULT 0
|
#define E_EVAS_ENGINE_DEFAULT 0
|
||||||
|
@ -243,6 +243,7 @@ struct _E_Config
|
||||||
int clientlist_limit_caption_len; // GUI
|
int clientlist_limit_caption_len; // GUI
|
||||||
int clientlist_max_caption_len; // GUI
|
int clientlist_max_caption_len; // GUI
|
||||||
|
|
||||||
|
int mouse_hand; //GUI
|
||||||
int mouse_accel_numerator; // GUI
|
int mouse_accel_numerator; // GUI
|
||||||
int mouse_accel_denominator; // GUI
|
int mouse_accel_denominator; // GUI
|
||||||
int mouse_accel_threshold; // GUI
|
int mouse_accel_threshold; // GUI
|
||||||
|
|
|
@ -858,7 +858,7 @@ main(int argc, char **argv)
|
||||||
/* setup mouse accel */
|
/* setup mouse accel */
|
||||||
if (!e_mouse_init())
|
if (!e_mouse_init())
|
||||||
{
|
{
|
||||||
e_error_message_show(_("Enlightenment cannot configure the mouse acceleration settings."));
|
e_error_message_show(_("Enlightenment cannot configure the mouse settings."));
|
||||||
_e_main_shutdown(-1);
|
_e_main_shutdown(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,23 @@
|
||||||
EAPI int
|
EAPI int
|
||||||
e_mouse_init(void)
|
e_mouse_init(void)
|
||||||
{
|
{
|
||||||
|
unsigned char map[256];
|
||||||
|
int n;
|
||||||
|
|
||||||
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
|
if (!ecore_x_pointer_control_set(e_config->mouse_accel_numerator,
|
||||||
e_config->mouse_accel_denominator,
|
e_config->mouse_accel_denominator,
|
||||||
e_config->mouse_accel_threshold))
|
e_config->mouse_accel_threshold))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (!(n = ecore_x_pointer_mapping_get(map, 256))) return 0;
|
||||||
|
|
||||||
|
if (((e_config->mouse_hand == E_MOUSE_HAND_LEFT) && (map[2] != 1)) ||
|
||||||
|
((e_config->mouse_hand == E_MOUSE_HAND_RIGHT) && (map[0] != 1)))
|
||||||
|
{
|
||||||
|
const unsigned char tmp = map[0];
|
||||||
|
map[0] = map[2]; map[2] = tmp;
|
||||||
|
if (ecore_x_pointer_mapping_set(map, n)) return 0;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,11 @@
|
||||||
#ifdef E_TYPEDEFS
|
#ifdef E_TYPEDEFS
|
||||||
|
|
||||||
|
typedef enum _E_Mouse_Hand
|
||||||
|
{
|
||||||
|
E_MOUSE_HAND_LEFT,
|
||||||
|
E_MOUSE_HAND_RIGHT
|
||||||
|
} E_Mouse_Hand;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifndef E_MOUSE_H
|
#ifndef E_MOUSE_H
|
||||||
#define E_MOUSE_H
|
#define E_MOUSE_H
|
||||||
|
|
|
@ -10,6 +10,7 @@ struct _E_Config_Dialog_Data
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
|
||||||
|
int mouse_hand;
|
||||||
double numerator;
|
double numerator;
|
||||||
double denominator;
|
double denominator;
|
||||||
double threshold;
|
double threshold;
|
||||||
|
@ -32,7 +33,7 @@ e_int_config_mouse(E_Container *con, const char *params __UNUSED__)
|
||||||
v->basic.create_widgets = _basic_create_widgets;
|
v->basic.create_widgets = _basic_create_widgets;
|
||||||
v->override_auto_apply = 1;
|
v->override_auto_apply = 1;
|
||||||
|
|
||||||
cfd = e_config_dialog_new(con, _("Mouse Acceleration Settings"), "E",
|
cfd = e_config_dialog_new(con, _("Mouse Settings"), "E",
|
||||||
"_config_mouse_dialog",
|
"_config_mouse_dialog",
|
||||||
"enlightenment/mouse_clean", 0, v, NULL);
|
"enlightenment/mouse_clean", 0, v, NULL);
|
||||||
return cfd;
|
return cfd;
|
||||||
|
@ -41,6 +42,7 @@ e_int_config_mouse(E_Container *con, const char *params __UNUSED__)
|
||||||
static void
|
static void
|
||||||
_fill_data(E_Config_Dialog_Data *cfdata)
|
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
|
cfdata->mouse_hand = e_config->mouse_hand;
|
||||||
cfdata->numerator = e_config->mouse_accel_numerator;
|
cfdata->numerator = e_config->mouse_accel_numerator;
|
||||||
cfdata->denominator = e_config->mouse_accel_denominator;
|
cfdata->denominator = e_config->mouse_accel_denominator;
|
||||||
cfdata->threshold = e_config->mouse_accel_threshold;
|
cfdata->threshold = e_config->mouse_accel_threshold;
|
||||||
|
@ -70,6 +72,8 @@ _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
static int
|
static int
|
||||||
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
|
e_config->mouse_hand = cfdata->mouse_hand;
|
||||||
|
|
||||||
e_config->mouse_accel_numerator = cfdata->numerator;
|
e_config->mouse_accel_numerator = cfdata->numerator;
|
||||||
/* Force denominator to 1 for simplicity. */
|
/* Force denominator to 1 for simplicity. */
|
||||||
e_config->mouse_accel_denominator = 1;
|
e_config->mouse_accel_denominator = 1;
|
||||||
|
@ -86,8 +90,18 @@ static Evas_Object *
|
||||||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
Evas_Object *o, *of, *ob;
|
Evas_Object *o, *of, *ob;
|
||||||
|
E_Radio_Group *rg;
|
||||||
|
|
||||||
o = e_widget_list_add(evas, 0, 0);
|
o = e_widget_list_add(evas, 0, 0);
|
||||||
|
|
||||||
|
of = e_widget_frametable_add(evas, _("Mouse Hand"), 0);
|
||||||
|
rg = e_widget_radio_group_new(&(cfdata->mouse_hand));
|
||||||
|
ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/mouse_right", 48, 48, E_MOUSE_HAND_LEFT, rg);
|
||||||
|
e_widget_frametable_object_append(of, ob, 0, 0, 1, 1, 1, 1, 1, 1);
|
||||||
|
ob = e_widget_radio_icon_add(evas, NULL, "enlightenment/mouse_left", 48, 48, E_MOUSE_HAND_RIGHT, rg);
|
||||||
|
e_widget_frametable_object_append(of, ob, 1, 0, 1, 1, 1, 1, 1, 1);
|
||||||
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||||
|
|
||||||
of = e_widget_framelist_add(evas, _("Mouse Acceleration"), 0);
|
of = e_widget_framelist_add(evas, _("Mouse Acceleration"), 0);
|
||||||
|
|
||||||
ob = e_widget_label_add(evas, _("Acceleration"));
|
ob = e_widget_label_add(evas, _("Acceleration"));
|
||||||
|
|
|
@ -25,14 +25,14 @@ static E_Module *conf_module = NULL;
|
||||||
EAPI E_Module_Api e_modapi =
|
EAPI E_Module_Api e_modapi =
|
||||||
{
|
{
|
||||||
E_MODULE_API_VERSION,
|
E_MODULE_API_VERSION,
|
||||||
"Configuration - Mouse Acceleration"
|
"Configuration - Mouse Settings"
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI void *
|
EAPI void *
|
||||||
e_modapi_init(E_Module *m)
|
e_modapi_init(E_Module *m)
|
||||||
{
|
{
|
||||||
e_configure_registry_category_add("keyboard_and_mouse", 40, _("Keyboard & Mouse"), NULL, "enlightenment/behavior");
|
e_configure_registry_category_add("keyboard_and_mouse", 40, _("Keyboard & Mouse"), NULL, "enlightenment/behavior");
|
||||||
e_configure_registry_item_add("keyboard_and_mouse/mouse_acceleration", 30, _("Mouse Acceleration"), NULL, "enlightenment/mouse_clean", e_int_config_mouse);
|
e_configure_registry_item_add("keyboard_and_mouse/mouse_settings", 30, _("Mouse Settings"), NULL, "enlightenment/mouse_clean", e_int_config_mouse);
|
||||||
conf_module = m;
|
conf_module = m;
|
||||||
e_module_delayed_set(m, 1);
|
e_module_delayed_set(m, 1);
|
||||||
return m;
|
return m;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Link
|
Type=Link
|
||||||
Name=Configuration - Mouse Acceleration
|
Name=Configuration - Mouse Settings
|
||||||
Name[de]=
|
Name[de]=
|
||||||
Name[eo]=Agordo - Musa plirapidigo
|
Name[eo]=Agordo - Musa plirapidigo
|
||||||
Name[es]=Configuración - Aceleración del mouse
|
Name[es]=Configuración - Aceleración del mouse
|
||||||
Name[fr]=
|
Name[fr]=Configuration - Paramètres de la souris
|
||||||
Name[hu]=Beállítások - Egér sebessége
|
Name[hu]=Beállítások - Egér sebessége
|
||||||
Name[it]=Configurazione - Accelerazione mouse
|
Name[it]=Configurazione - Accelerazione mouse
|
||||||
Name[ja]=
|
Name[ja]=
|
||||||
|
@ -13,11 +13,11 @@ Name[pt_BR]=
|
||||||
Name[zh_CN]=
|
Name[zh_CN]=
|
||||||
Name[zh_TW]=
|
Name[zh_TW]=
|
||||||
Icon=e-module-conf_mouse
|
Icon=e-module-conf_mouse
|
||||||
Comment=<title>E17 Configuration Applet</title><br>Configure mouse cursor acceleration.
|
Comment=<title>E17 Configuration Applet</title><br>Configure mouse behavior.
|
||||||
Comment[de]=
|
Comment[de]=
|
||||||
Comment[eo]=<title>Aplikaĵeto de E17 agordo</title><br>Agordi la musan plirapidigon.
|
Comment[eo]=<title>Aplikaĵeto de E17 agordo</title><br>Agordi la musan plirapidigon.
|
||||||
Comment[es]=<title>Applet de configuración de E17</title><br>Configure la aceleración del cursor del mouse.
|
Comment[es]=<title>Applet de configuración de E17</title><br>Configure la aceleración del cursor del mouse.
|
||||||
Comment[fr]=
|
Comment[fr]=<hilight>Applet de configuration de E17</hilight><br><br>Permet de configurer les paramètres du curseur de la souris.
|
||||||
Comment[hu]=<title>E17 beállító alkalmazás</title><br>Egér kurzor sebességének beállítása.
|
Comment[hu]=<title>E17 beállító alkalmazás</title><br>Egér kurzor sebességének beállítása.
|
||||||
Comment[it]=<title>Applet configurazione di E17</title><br>Configura l'accelerazione del puntatore del mouse.
|
Comment[it]=<title>Applet configurazione di E17</title><br>Configura l'accelerazione del puntatore del mouse.
|
||||||
Comment[ja]=
|
Comment[ja]=
|
||||||
|
|
Loading…
Reference in New Issue