formatting

SVN revision: 83667
This commit is contained in:
Mike Blumenkrantz 2013-02-06 09:11:53 +00:00
parent 7c4da3e843
commit 1231a2e453
1 changed files with 101 additions and 100 deletions

View File

@ -2,12 +2,12 @@
/* PROTOTYPES - same all the time */
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _advanced_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _basic_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _advanced_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _advanced_check_changed(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
@ -15,24 +15,24 @@ static Evas_Object *_advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_
struct _E_Config_Dialog_Data
{
/*- BASIC -*/
int mode;
int use_auto_raise;
int mode;
int use_auto_raise;
/*- ADVANCED -*/
int focus_policy;
int focus_setting;
int pass_click_on;
int window_activehint_policy;
int always_click_to_raise;
int always_click_to_focus;
int focus_last_focused_per_desktop;
int focus_revert_on_hide_or_close;
int pointer_slide;
int disable_all_pointer_warps;
int focus_policy;
int focus_setting;
int pass_click_on;
int window_activehint_policy;
int always_click_to_raise;
int always_click_to_focus;
int focus_last_focused_per_desktop;
int focus_revert_on_hide_or_close;
int pointer_slide;
int disable_all_pointer_warps;
double pointer_warp_speed;
double auto_raise_delay;
int border_raise_on_mouse_action;
int border_raise_on_focus;
int allow_above_fullscreen;
int border_raise_on_mouse_action;
int border_raise_on_focus;
int allow_above_fullscreen;
};
/* a nice easy setup function that does the dirty work */
@ -46,7 +46,7 @@ e_int_config_focus(E_Container *con, const char *params __UNUSED__)
v = E_NEW(E_Config_Dialog_View, 1);
/* methods */
v->create_cfdata = _create_data;
v->create_cfdata = _create_data;
v->free_cfdata = _free_data;
v->basic.apply_cfdata = _basic_apply;
v->basic.create_widgets = _basic_create;
@ -118,42 +118,42 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
e_border_button_bindings_ungrab_all();
if (cfdata->mode == E_FOCUS_CLICK)
{
e_config->focus_policy = E_FOCUS_CLICK;
e_config->focus_setting = E_FOCUS_NEW_WINDOW;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 1;
e_config->focus_revert_on_hide_or_close = 1;
e_config->pointer_slide = 0;
e_config->disable_all_pointer_warps = 1;
e_config->focus_policy = E_FOCUS_CLICK;
e_config->focus_setting = E_FOCUS_NEW_WINDOW;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 1;
e_config->focus_revert_on_hide_or_close = 1;
e_config->pointer_slide = 0;
e_config->disable_all_pointer_warps = 1;
}
else if (cfdata->mode == E_FOCUS_MOUSE)
{
e_config->focus_policy = E_FOCUS_MOUSE;
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 0;
e_config->focus_revert_on_hide_or_close = 0;
e_config->pointer_slide = 1;
e_config->disable_all_pointer_warps = 0;
e_config->focus_policy = E_FOCUS_MOUSE;
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 0;
e_config->focus_revert_on_hide_or_close = 0;
e_config->pointer_slide = 1;
e_config->disable_all_pointer_warps = 0;
}
else
{
e_config->focus_policy = E_FOCUS_SLOPPY;
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 1;
e_config->focus_revert_on_hide_or_close = 1;
e_config->pointer_slide = 1;
e_config->disable_all_pointer_warps = 0;
e_config->focus_policy = E_FOCUS_SLOPPY;
e_config->focus_setting = E_FOCUS_NEW_DIALOG_IF_OWNER_FOCUSED;
e_config->pass_click_on = 1;
e_config->window_activehint_policy = 2;
e_config->always_click_to_raise = 0;
e_config->always_click_to_focus = 0;
e_config->focus_last_focused_per_desktop = 1;
e_config->focus_revert_on_hide_or_close = 1;
e_config->pointer_slide = 1;
e_config->disable_all_pointer_warps = 0;
}
e_config->use_auto_raise = cfdata->use_auto_raise;
e_border_button_bindings_grab_all();
@ -164,8 +164,8 @@ _basic_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
return ((e_config->focus_policy != cfdata->mode) ||
(e_config->use_auto_raise != cfdata->use_auto_raise));
return (e_config->focus_policy != cfdata->mode) ||
(e_config->use_auto_raise != cfdata->use_auto_raise);
}
static int
@ -200,22 +200,22 @@ _advanced_apply(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
static int
_advanced_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
return ((e_config->focus_policy != cfdata->focus_policy) ||
(e_config->focus_setting != cfdata->focus_setting) ||
(e_config->pass_click_on != cfdata->pass_click_on) ||
(e_config->window_activehint_policy != cfdata->window_activehint_policy) ||
(e_config->always_click_to_raise != cfdata->always_click_to_raise) ||
(e_config->always_click_to_focus != cfdata->always_click_to_focus) ||
(e_config->focus_last_focused_per_desktop != cfdata->focus_last_focused_per_desktop) ||
(e_config->focus_revert_on_hide_or_close != cfdata->focus_revert_on_hide_or_close) ||
(e_config->pointer_slide != cfdata->pointer_slide) ||
(e_config->disable_all_pointer_warps != cfdata->disable_all_pointer_warps) ||
(fabs(e_config->pointer_warp_speed - cfdata->pointer_warp_speed) < DBL_EPSILON) ||
(e_config->use_auto_raise != cfdata->use_auto_raise) ||
(e_config->auto_raise_delay != cfdata->auto_raise_delay) ||
(e_config->border_raise_on_mouse_action != cfdata->border_raise_on_mouse_action) ||
(e_config->border_raise_on_focus != cfdata->border_raise_on_focus) ||
(e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen));
return (e_config->focus_policy != cfdata->focus_policy) ||
(e_config->focus_setting != cfdata->focus_setting) ||
(e_config->pass_click_on != cfdata->pass_click_on) ||
(e_config->window_activehint_policy != cfdata->window_activehint_policy) ||
(e_config->always_click_to_raise != cfdata->always_click_to_raise) ||
(e_config->always_click_to_focus != cfdata->always_click_to_focus) ||
(e_config->focus_last_focused_per_desktop != cfdata->focus_last_focused_per_desktop) ||
(e_config->focus_revert_on_hide_or_close != cfdata->focus_revert_on_hide_or_close) ||
(e_config->pointer_slide != cfdata->pointer_slide) ||
(e_config->disable_all_pointer_warps != cfdata->disable_all_pointer_warps) ||
(fabs(e_config->pointer_warp_speed - cfdata->pointer_warp_speed) < DBL_EPSILON) ||
(e_config->use_auto_raise != cfdata->use_auto_raise) ||
(e_config->auto_raise_delay != cfdata->auto_raise_delay) ||
(e_config->border_raise_on_mouse_action != cfdata->border_raise_on_mouse_action) ||
(e_config->border_raise_on_focus != cfdata->border_raise_on_focus) ||
(e_config->allow_above_fullscreen != cfdata->allow_above_fullscreen);
}
/**--GUI--**/
@ -331,7 +331,7 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
*/
obp = ob = e_widget_check_add(evas, _("Prevent all forms of pointer warping"),
&(cfdata->disable_all_pointer_warps));
&(cfdata->disable_all_pointer_warps));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Slide pointer to a new window which is focused"),
&(cfdata->pointer_slide));
@ -374,3 +374,4 @@ _advanced_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Da
e_widget_toolbook_page_show(otb, 0);
return otb;
}