better alignment, sizing and pass -Wextra

SVN revision: 46796
devs/princeamd/enlightenment-0.17-elive
Gustavo Sverzut Barbieri 13 years ago
parent 29b663723f
commit fccaf3de73
  1. 23
      src/bin/e_widget_frametable.c
  2. 2
      src/bin/e_widget_frametable.h
  3. 47
      src/modules/conf_window_remembers/e_int_config_remembers.c
  4. 6
      src/modules/conf_window_remembers/e_mod_main.c

@ -77,6 +77,29 @@ e_widget_frametable_object_append(Evas_Object *obj, Evas_Object *sobj, int col,
evas_object_show(sobj);
}
EAPI void
e_widget_frametable_object_append_full(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
{
E_Widget_Data *wd = e_widget_data_get(obj);;
Evas_Coord mw = 0, mh = 0;
e_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
e_table_pack_options_set(sobj,
fill_w, fill_h,
expand_w, expand_h,
align_x, align_y,
min_w, min_h,
max_w, max_h
);
e_table_size_min_get(wd->o_table, &mw, &mh);
edje_extern_object_min_size_set(wd->o_table, mw, mh);
edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_table);
edje_object_size_min_calc(wd->o_frame, &mw, &mh);
e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
EAPI void
e_widget_frametable_content_align_set(Evas_Object *obj, double halign, double valign)
{

@ -8,6 +8,8 @@
EAPI Evas_Object *e_widget_frametable_add(Evas *evas, const char *label, int homogenous);
EAPI void e_widget_frametable_object_append(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h);
EAPI void e_widget_frametable_object_append_full(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h);
EAPI void e_widget_frametable_content_align_set(Evas_Object *obj, double halign, double valign);
EAPI void e_widget_frametable_label_set(Evas_Object *obj, const char *label);

@ -74,7 +74,7 @@ _cb_sort(const void *data1, const void *data2)
}
static void *
_create_data(E_Config_Dialog *cfd)
_create_data(E_Config_Dialog *cfd __UNUSED__)
{
E_Config_Dialog_Data *cfdata;
@ -86,13 +86,13 @@ _create_data(E_Config_Dialog *cfd)
}
static void
_free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
E_FREE(cfdata);
}
static int
_basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata)
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
if (cfdata->remember_dialogs)
e_config->remember_internal_windows |= E_REMEMBER_INTERNAL_DIALOGS;
@ -109,17 +109,17 @@ _basic_apply_data(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)
_basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Object *o, *of, *of2, *ow;
Evas_Object *of, *of2, *ow;
Evas_Coord mw, mh;
o = e_widget_list_add(evas, 0, 0);
of = e_widget_frametable_add(evas, _("Window Remembers"), 0);
ow = e_widget_check_add(evas, _("Remember internal dialogs"),
&(cfdata->remember_dialogs));
e_widget_frametable_object_append(of, ow, 0, 0, 1, 1, 1, 1, 1, 0);
ow = e_widget_check_add(evas, _("Remember fileman windows"),
ow = e_widget_check_add(evas, _("Remember file manager windows"),
&(cfdata->remember_fm_wins));
e_widget_frametable_object_append(of, ow, 0, 1, 1, 1, 1, 1, 1, 0);
@ -135,22 +135,30 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
of2 = e_widget_frametable_add(evas, _("Details"), 0);
ow = e_widget_label_add(evas, _("Name:"));
e_widget_frametable_object_append(of2, ow, 0, 0, 1, 1, 1, 1, 0, 0);
e_widget_size_min_get(ow, &mw, &mh);
e_widget_frametable_object_append_full
(of2, ow, 0, 0, 1, 1, 0, 0, 0, 0, 1.0, 1.0, mw, mh, 9999, 9999);
ow = e_widget_label_add(evas, _("<No Name>"));
cfdata->name = ow;
e_widget_frametable_object_append(of2, cfdata->name, 1, 0, 1, 1, 1, 1, 1, 0);
ow = e_widget_label_add(evas, _("Class:"));
e_widget_frametable_object_append(of2, ow, 0, 1, 1, 1, 1, 1, 0, 0);
e_widget_size_min_get(ow, &mw, &mh);
e_widget_frametable_object_append_full
(of2, ow, 0, 1, 1, 1, 0, 0, 0, 0, 1.0, 1.0, mw, mh, 9999, 9999);
ow = e_widget_label_add(evas, _("<No Class>"));
cfdata->class = ow;
e_widget_frametable_object_append(of2, cfdata->class, 1, 1, 1, 1, 1, 1, 1, 0);
ow = e_widget_label_add(evas, _("Title:"));
e_widget_frametable_object_append(of2, ow, 0, 2, 1, 1, 1, 1, 0, 0);
e_widget_size_min_get(ow, &mw, &mh);
e_widget_frametable_object_append_full
(of2, ow, 0, 2, 1, 1, 0, 0, 0, 0, 1.0, 1.0, mw, mh, 9999, 9999);
ow = e_widget_label_add(evas, _("<No Title>"));
cfdata->title = ow;
e_widget_frametable_object_append(of2, cfdata->title, 1, 2, 1, 1, 1, 1, 1, 0);
ow = e_widget_label_add(evas, _("Role:"));
e_widget_frametable_object_append(of2, ow, 0, 3, 1, 1, 1, 1, 0, 0);
e_widget_size_min_get(ow, &mw, &mh);
e_widget_frametable_object_append_full
(of2, ow, 0, 3, 1, 1, 0, 0, 0, 0, 1.0, 1.0, mw, mh, 9999, 9999);
ow = e_widget_label_add(evas, _("<No Role>"));
cfdata->role = ow;
e_widget_frametable_object_append(of2, cfdata->role, 1, 3, 1, 1, 1, 1, 1, 0);
@ -158,10 +166,9 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_frametable_object_append(of, cfdata->list, 0, 2, 1, 1, 1, 1, 1, 1);
e_widget_frametable_object_append(of, of2, 0, 3, 1, 1, 1, 1, 1, 0);
e_widget_frametable_object_append(of, cfdata->btn, 0, 4, 1, 1, 1, 1, 1, 0);
e_widget_list_object_append(o, of, 1, 0, 0.5);
e_widget_disabled_set(cfdata->btn, 1);
return o;
return of;
}
static void
@ -241,7 +248,11 @@ _fill_remembers(E_Config_Dialog_Data *cfdata)
e_widget_ilist_go(cfdata->list);
e_widget_size_min_get(cfdata->list, &w, NULL);
e_widget_size_min_set(cfdata->list, w, 200);
if (w < 100 * e_scale)
w = 100 * e_scale;
else if (w > 200 * e_scale)
w = 200 * e_scale;
e_widget_size_min_set(cfdata->list, w, 150);
e_widget_ilist_thaw(cfdata->list);
edje_thaw();
evas_event_thaw(evas);
@ -249,8 +260,8 @@ _fill_remembers(E_Config_Dialog_Data *cfdata)
e_widget_disabled_set(cfdata->btn, 1);
}
static void
_cb_delete(void *data, void *data2)
static void
_cb_delete(void *data, void *data2 __UNUSED__)
{
E_Config_Dialog_Data *cfdata;
Eina_List *l = NULL;
@ -279,8 +290,8 @@ _cb_delete(void *data, void *data2)
e_widget_ilist_selected_set(cfdata->list, last_selected - deleted + 1);
}
static void
_cb_list_change(void *data, Evas_Object *obj)
static void
_cb_list_change(void *data, Evas_Object *obj __UNUSED__)
{
E_Config_Dialog_Data *cfdata;
E_Remember *rem = NULL;

@ -23,7 +23,7 @@ e_modapi_init(E_Module *m)
}
EAPI int
e_modapi_shutdown(E_Module *m)
e_modapi_shutdown(E_Module *m __UNUSED__)
{
E_Config_Dialog *cfd;
@ -35,8 +35,8 @@ e_modapi_shutdown(E_Module *m)
return 1;
}
EAPI int
e_modapi_save(E_Module *m)
EAPI int
e_modapi_save(E_Module *m __UNUSED__)
{
return 1;
}

Loading…
Cancel
Save