formatting

SVN revision: 73147
This commit is contained in:
Mike Blumenkrantz 2012-07-02 10:13:27 +00:00
parent 0fe8872ab7
commit 55e263ef55
3 changed files with 430 additions and 426 deletions

View File

@ -130,7 +130,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_list_object_append(o, of, 1, 1, 0.5);
e_dialog_resizable_set(cfd->dia, 1);
e_widget_toolbook_page_append(otb, NULL, _("Add Gadget"), o, 1, 1, 1, 1, 0.5, 0.0);
ft = e_widget_table_add(evas, 0);
@ -188,7 +187,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
cfdata, NULL);
e_widget_frametable_object_append(of, cfdata->o_btn, 0, 1, 2, 1, 1, 1, 1, 0);
if (cfdata->fmdir == 1)
e_prefix_data_concat_static(path, "data/backgrounds");
else
@ -275,6 +273,7 @@ _basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
return 1;
}
//Basic Callbacks
static void
_fill_gadgets_list(Evas_Object *ilist)
@ -413,6 +412,7 @@ _cb_fm_sel_change(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
cfdata = data;
e_widget_change(cfdata->o_sf);
}
static void
_cb_button_up(void *data1, void *data2 __UNUSED__)
{
@ -424,3 +424,4 @@ _cb_button_up(void *data1, void *data2 __UNUSED__)
e_fm2_parent_go(cfdata->o_fm);
e_widget_scrollframe_child_pos_set(cfdata->o_sf, 0, 0);
}

View File

@ -7,13 +7,13 @@
static void _attach_menu(void *data, E_Gadcon_Client *gcc, E_Menu *menu);
static void _save_widget_position(E_Gadcon_Client *gcc);
static void _apply_widget_position(E_Gadcon_Client *gcc);
static char *_get_bind_text(const char* action);
static char *_get_bind_text(const char *action);
static void _on_menu_layer(E_Gadcon_Client *gcc, Gadman_Layer_Type layer);
static E_Gadcon_Client *_gadman_gadget_add(const E_Gadcon_Client_Class *cc, Gadman_Layer_Type layer, E_Config_Gadcon_Client *src_cf);
static Evas_Object* _create_mover(E_Gadcon *gc);
static Evas_Object* _get_mover(E_Gadcon_Client *gcc);
static E_Gadcon* _gadman_gadcon_new(const char* name, Gadman_Layer_Type layer, E_Zone *zone, E_Gadcon_Location * loc);
static Evas_Object *_create_mover(E_Gadcon *gc);
static Evas_Object *_get_mover(E_Gadcon_Client *gcc);
static E_Gadcon *_gadman_gadcon_new(const char *name, Gadman_Layer_Type layer, E_Zone *zone, E_Gadcon_Location *loc);
static void on_shape_change(void *data, E_Container_Shape *es, E_Container_Shape_Change ch);
@ -39,8 +39,8 @@ static void on_menu_delete(void *data, E_Menu *m, E_Menu_Item *mi);
static void on_menu_edit(void *data, E_Menu *m, E_Menu_Item *mi);
static void on_menu_add(void *data, E_Menu *m, E_Menu_Item *mi);
static int _e_gadman_client_add (void *data __UNUSED__, const E_Gadcon_Client_Class *cc);
static void _e_gadman_client_remove (void *data __UNUSED__, E_Gadcon_Client *gcc);
static int _e_gadman_client_add(void *data __UNUSED__, const E_Gadcon_Client_Class *cc);
static void _e_gadman_client_remove(void *data __UNUSED__, E_Gadcon_Client *gcc);
static void _e_gadman_handlers_add(void);
static void _e_gadman_handler_del(void);
@ -454,12 +454,14 @@ gadman_update_bg(void)
case BG_STD:
case BG_TRANS:
break;
case BG_COLOR:
obj = evas_object_rectangle_add(Man->gc_top->evas);
evas_object_color_set(obj, Man->conf->color_r, Man->conf->color_g,
Man->conf->color_b, 200);
edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
break;
case BG_CUSTOM:
ext = strrchr(Man->conf->custom_bg, '.');
if (!strcmp(ext, ".edj") || !strcmp(ext, ".EDJ"))
@ -479,14 +481,15 @@ gadman_update_bg(void)
}
edje_object_part_swallow(Man->full_bg, "e.swallow.bg", obj);
break;
default:
break;
}
}
/* Internals */
static E_Gadcon*
_gadman_gadcon_new(const char* name, Gadman_Layer_Type layer, E_Zone *zone, E_Gadcon_Location * loc)
static E_Gadcon *
_gadman_gadcon_new(const char *name, Gadman_Layer_Type layer, E_Zone *zone, E_Gadcon_Location *loc)
{
const Eina_List *l;
E_Gadcon *gc;
@ -558,7 +561,7 @@ _gadman_gadcon_new(const char* name, Gadman_Layer_Type layer, E_Zone *zone, E_Ga
e_gadcon_zone_set(gc, zone);
e_gadcon_util_menu_attach_func_set(gc, _attach_menu, NULL);
e_gadcon_populate_callback_set(gc, gadman_populate_class, (void*)layer);
e_gadcon_populate_callback_set(gc, gadman_populate_class, (void *)layer);
gc->id = ID_GADMAN_LAYER_BASE + layer;
gc->edje.o_parent = NULL;
@ -616,38 +619,38 @@ _create_mover(E_Gadcon *gc)
e_theme_edje_object_set(mover, "base/theme/gadman", "e/gadman/control");
edje_object_signal_callback_add(mover, "e,action,move,start", "",
on_move, (void*)DRAG_START);
on_move, (void *)DRAG_START);
edje_object_signal_callback_add(mover, "e,action,move,stop", "",
on_move, (void*)DRAG_STOP);
on_move, (void *)DRAG_STOP);
edje_object_signal_callback_add(mover, "e,action,move,go", "",
on_move, (void*)DRAG_MOVE);
on_move, (void *)DRAG_MOVE);
edje_object_signal_callback_add(mover, "mouse,down,3", "overlay",
gadman_gadget_edit_end, NULL);
edje_object_signal_callback_add(mover, "e,action,resize,left,start", "",
on_left, (void*)DRAG_START);
on_left, (void *)DRAG_START);
edje_object_signal_callback_add(mover, "e,action,resize,left,stop", "",
on_left, (void*)DRAG_STOP);
on_left, (void *)DRAG_STOP);
edje_object_signal_callback_add(mover, "e,action,resize,left,go", "",
on_left, (void*)DRAG_MOVE);
on_left, (void *)DRAG_MOVE);
edje_object_signal_callback_add(mover, "e,action,resize,down,start", "",
on_down, (void*)DRAG_START);
on_down, (void *)DRAG_START);
edje_object_signal_callback_add(mover, "e,action,resize,down,stop", "",
on_down, (void*)DRAG_STOP);
on_down, (void *)DRAG_STOP);
edje_object_signal_callback_add(mover, "e,action,resize,down,go", "",
on_down, (void*)DRAG_MOVE);
on_down, (void *)DRAG_MOVE);
edje_object_signal_callback_add(mover, "e,action,resize,right,start", "",
on_right, (void*)DRAG_START);
on_right, (void *)DRAG_START);
edje_object_signal_callback_add(mover, "e,action,resize,right,stop", "",
on_right, (void*)DRAG_STOP);
on_right, (void *)DRAG_STOP);
edje_object_signal_callback_add(mover, "e,action,resize,right,go", "",
on_right, (void*)DRAG_MOVE);
on_right, (void *)DRAG_MOVE);
edje_object_signal_callback_add(mover, "e,action,resize,up,start", "",
on_top, (void*)DRAG_START);
on_top, (void *)DRAG_START);
edje_object_signal_callback_add(mover, "e,action,resize,up,stop", "",
on_top, (void*)DRAG_STOP);
on_top, (void *)DRAG_STOP);
edje_object_signal_callback_add(mover, "e,action,resize,up,go", "",
on_top, (void*)DRAG_MOVE);
on_top, (void *)DRAG_MOVE);
evas_object_move(mover, 20, 30);
evas_object_resize(mover, 100, 100);
@ -670,7 +673,7 @@ _save_widget_position(E_Gadcon_Client *gcc)
evas_object_geometry_get(gcc->o_frame, &x, &y, &w, &h);
current->cf->geom.pos_x = (double)x / (double)Man->width;
current->cf->geom.pos_y = (double)y / (double)Man->height;
current->cf->geom.size_w = (double)w / (double)Man->width;;
current->cf->geom.size_w = (double)w / (double)Man->width;
current->cf->geom.size_h = (double)h / (double)Man->height;
e_config_save_queue();
@ -734,7 +737,6 @@ _attach_menu(void *data __UNUSED__, E_Gadcon_Client *gcc, E_Menu *menu)
e_util_menu_item_theme_icon_set(mi, "transform-scale");
e_menu_item_callback_set(mi, on_menu_edit, gcc);
/* plain / inset */
if (!gcc->cf->style)
gcc->cf->style = eina_stringshare_add(E_GADCON_CLIENT_STYLE_INSET);
@ -840,7 +842,7 @@ _attach_menu(void *data __UNUSED__, E_Gadcon_Client *gcc, E_Menu *menu)
}
static char *
_get_bind_text(const char* action)
_get_bind_text(const char *action)
{
E_Binding_Key *binding;
char b[256] = "";
@ -1357,7 +1359,7 @@ on_move(void *data, Evas_Object *o __UNUSED__, const char *em __UNUSED__, const
if (y < 0) y = 0;
if (y > (Man->height - oh)) y = Man->height - oh;
evas_object_move(current->o_frame, x , y);
evas_object_move(current->o_frame, x, y);
evas_object_move(mover, x, y);
evas_object_raise(current->o_frame);
evas_object_raise(mover);
@ -1417,7 +1419,7 @@ static Eina_Bool
_e_gadman_cb_zone_add(void *data __UNUSED__, int type __UNUSED__, void *event)
{
E_Event_Zone_Add *ev;
E_Zone* zone;
E_Zone *zone;
E_Gadcon *gc;
Eina_List *l;
unsigned int layer;
@ -1450,7 +1452,7 @@ static Eina_Bool
_e_gadman_cb_zone_del(void *data __UNUSED__, int type __UNUSED__, void *event)
{
E_Event_Zone_Del *ev;
E_Zone* zone;
E_Zone *zone;
Eina_List *l, *ll;
E_Gadcon *gc;
E_Gadcon_Client *gcc;

View File

@ -146,3 +146,4 @@ _gadman_action_cb(E_Object *obj __UNUSED__, const char *params __UNUSED__)
{
gadman_gadgets_toggle();
}