fix formatting for conf_keybindings

SVN revision: 71840
This commit is contained in:
Mike Blumenkrantz 2012-06-08 09:48:19 +00:00
parent 0d4c7b2741
commit 4c5e4226a2
4 changed files with 772 additions and 757 deletions

View File

@ -86,7 +86,8 @@ struct _E_Config_Dialog_Data
Evas_Object *o_del; Evas_Object *o_del;
Evas_Object *o_mod; Evas_Object *o_mod;
Evas_Object *o_del_all; Evas_Object *o_del_all;
struct { struct
{
Evas_Object *o_any, *o_window, *o_menu, *o_winlist, *o_popup, *o_zone, Evas_Object *o_any, *o_window, *o_menu, *o_winlist, *o_popup, *o_zone,
*o_container, *o_manager, *o_none; *o_container, *o_manager, *o_none;
} context; } context;
@ -745,12 +746,15 @@ _update_mouse_binding_list(E_Config_Dialog_Data *cfdata)
case 1: case 1:
icon = "preferences-desktop-mouse-left"; icon = "preferences-desktop-mouse-left";
break; break;
case 2: case 2:
icon = "preferences-desktop-mouse-middle"; icon = "preferences-desktop-mouse-middle";
break; break;
case 3: case 3:
icon = "preferences-desktop-mouse-right"; icon = "preferences-desktop-mouse-right";
break; break;
default: default:
icon = "preferences-desktop-mouse-extra"; icon = "preferences-desktop-mouse-extra";
} }
@ -1144,17 +1148,21 @@ _helper_button_name_get(E_Config_Binding_Mouse *eb)
case 1: case 1:
name = strdup("Left Button"); name = strdup("Left Button");
break; break;
case 2: case 2:
name = strdup("Middle Button"); name = strdup("Middle Button");
break; break;
case 3: case 3:
name = strdup("Right Button"); name = strdup("Right Button");
break; break;
case 4: case 4:
case 5: case 5:
case 6: case 6:
case 7: case 7:
break; break;
default: default:
snprintf(buf, sizeof(buf), "Extra Button (%d)", eb->button); snprintf(buf, sizeof(buf), "Extra Button (%d)", eb->button);
name = strdup(buf); name = strdup(buf);
@ -1176,6 +1184,7 @@ _helper_wheel_name_get(E_Config_Binding_Wheel *bw)
else else
name = strdup("Mouse Wheel Down"); name = strdup("Mouse Wheel Down");
break; break;
default: default:
if (bw->z >= 0) if (bw->z >= 0)
snprintf(buf, sizeof(buf), "Extra Wheel (%d) Up", bw->direction); snprintf(buf, sizeof(buf), "Extra Wheel (%d) Up", bw->direction);
@ -1225,11 +1234,13 @@ _mouse_binding_sort_cb(const void *d1, const void *d2)
eb2 = d2; eb2 = d2;
if (eb->button < eb2->button) return -1; if (eb->button < eb2->button) return -1;
else if (eb->button > eb2->button) return 1; else if (eb->button > eb2->button)
return 1;
else else
{ {
if (eb->modifiers < eb2->modifiers) return -1; if (eb->modifiers < eb2->modifiers) return -1;
else if (eb->modifiers > eb2->modifiers) return 1; else if (eb->modifiers > eb2->modifiers)
return 1;
} }
return 0; return 0;
} }
@ -1243,16 +1254,19 @@ _wheel_binding_sort_cb(const void *d1, const void *d2)
bw2 = d2; bw2 = d2;
if (bw->direction < bw2->direction) return -1; if (bw->direction < bw2->direction) return -1;
else if (bw->direction > bw2->direction) return 1; else if (bw->direction > bw2->direction)
return 1;
else else
{ {
if ((bw->z < 0) && (bw2->z > 0)) return 1; if ((bw->z < 0) && (bw2->z > 0)) return 1;
else if ((bw->z > 0) && (bw2->z < 0)) return -1; else if ((bw->z > 0) && (bw2->z < 0))
return -1;
else if (((bw->z < 0) && (bw2->z < 0)) || else if (((bw->z < 0) && (bw2->z < 0)) ||
((bw->z > 0) && (bw2->z > 0))) ((bw->z > 0) && (bw2->z > 0)))
{ {
if (bw->modifiers < bw2->modifiers) return -1; if (bw->modifiers < bw2->modifiers) return -1;
else if (bw->modifiers > bw2->modifiers) return 1; else if (bw->modifiers > bw2->modifiers)
return 1;
} }
} }
return 0; return 0;
@ -1441,7 +1455,6 @@ _grab_mouse_wheel_cb(void *data, __UNUSED__ int type, void *event)
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (cfdata->locals.add) if (cfdata->locals.add)
{ {
bw = E_NEW(E_Config_Binding_Wheel, 1); bw = E_NEW(E_Config_Binding_Wheel, 1);
@ -1552,3 +1565,4 @@ _grab_key_down_cb(void *data, __UNUSED__ int type, void *event)
} }
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
} }

View File

@ -61,3 +61,4 @@ e_modapi_save(E_Module *m __UNUSED__)
{ {
return 1; return 1;
} }