forked from enlightenment/enlightenment
been hacking... umm. config dialog additions.
SVN revision: 36033
This commit is contained in:
parent
77ccc1ba82
commit
4b969ed2fc
|
@ -39,20 +39,6 @@ e_canvas_add(Ecore_Evas *ee)
|
||||||
}
|
}
|
||||||
else if (e_config->font_hinting == 2)
|
else if (e_config->font_hinting == 2)
|
||||||
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
|
||||||
// FIXME: just a hack.
|
|
||||||
{
|
|
||||||
static scale = -1.0;
|
|
||||||
|
|
||||||
if (scale == -1.0)
|
|
||||||
{
|
|
||||||
char *s;
|
|
||||||
|
|
||||||
s = getenv("E_SCALE");
|
|
||||||
if (s) scale = atof(s);
|
|
||||||
else scale = 1.0;
|
|
||||||
}
|
|
||||||
edje_scale_set(scale);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
|
@ -173,6 +173,7 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "ADVANCED");
|
snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "ADVANCED");
|
||||||
cfd->dia = e_dialog_new(cfd->con, cfd->name, buf);
|
cfd->dia = e_dialog_new(cfd->con, cfd->name, buf);
|
||||||
|
if (cfd->view->normal_win) e_win_dialog_set(cfd->dia->win, 0);
|
||||||
cfd->dia->data = cfd;
|
cfd->dia->data = cfd;
|
||||||
e_object_del_attach_func_set(E_OBJECT(cfd->dia), _e_config_dialog_cb_dialog_del);
|
e_object_del_attach_func_set(E_OBJECT(cfd->dia), _e_config_dialog_cb_dialog_del);
|
||||||
e_dialog_title_set(cfd->dia, cfd->title);
|
e_dialog_title_set(cfd->dia, cfd->title);
|
||||||
|
@ -210,6 +211,7 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
||||||
}
|
}
|
||||||
|
|
||||||
e_widget_min_size_get(o, &mw, &mh);
|
e_widget_min_size_get(o, &mw, &mh);
|
||||||
|
printf("SET changed on %p @ %p\n", o, _e_config_dialog_cb_changed);
|
||||||
e_widget_on_change_hook_set(o, _e_config_dialog_cb_changed, cfd);
|
e_widget_on_change_hook_set(o, _e_config_dialog_cb_changed, cfd);
|
||||||
e_dialog_content_set(cfd->dia, o, mw, mh);
|
e_dialog_content_set(cfd->dia, o, mw, mh);
|
||||||
|
|
||||||
|
@ -226,7 +228,8 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
|
||||||
e_dialog_button_add(cfd->dia, _("Close"), NULL, _e_config_dialog_cb_close, cfd);
|
e_dialog_button_add(cfd->dia, _("Close"), NULL, _e_config_dialog_cb_close, cfd);
|
||||||
if (!pdia)
|
if (!pdia)
|
||||||
{
|
{
|
||||||
e_win_centered_set(cfd->dia->win, 1);
|
if (!cfd->view->normal_win)
|
||||||
|
e_win_centered_set(cfd->dia->win, 1);
|
||||||
e_dialog_show(cfd->dia);
|
e_dialog_show(cfd->dia);
|
||||||
if (cfd->icon) e_dialog_border_icon_set(cfd->dia, cfd->icon);
|
if (cfd->icon) e_dialog_border_icon_set(cfd->dia, cfd->icon);
|
||||||
}
|
}
|
||||||
|
@ -364,6 +367,7 @@ _e_config_dialog_cb_changed(void *data, Evas_Object *obj)
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
|
|
||||||
cfd = data;
|
cfd = data;
|
||||||
|
printf("_e_config_dialog_cb_changed\n");
|
||||||
if (!cfd->hide_buttons)
|
if (!cfd->hide_buttons)
|
||||||
{
|
{
|
||||||
cfd->cfg_changed = 1;
|
cfd->cfg_changed = 1;
|
||||||
|
|
|
@ -22,8 +22,9 @@ typedef struct _E_Config_Dialog_Data E_Config_Dialog_Data;
|
||||||
|
|
||||||
struct _E_Config_Dialog_View
|
struct _E_Config_Dialog_View
|
||||||
{
|
{
|
||||||
int override_auto_apply;
|
unsigned char override_auto_apply : 1;
|
||||||
int basic_only;
|
unsigned char basic_only : 1;
|
||||||
|
unsigned char normal_win : 1;
|
||||||
|
|
||||||
void *(*create_cfdata) (E_Config_Dialog *cfd);
|
void *(*create_cfdata) (E_Config_Dialog *cfd);
|
||||||
void (*free_cfdata) (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
void (*free_cfdata) (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||||
|
|
|
@ -534,6 +534,21 @@ main(int argc, char **argv)
|
||||||
/* setup edje to animate @ e_config->framerate frames per sec. */
|
/* setup edje to animate @ e_config->framerate frames per sec. */
|
||||||
edje_frametime_set(1.0 / e_config->framerate);
|
edje_frametime_set(1.0 / e_config->framerate);
|
||||||
|
|
||||||
|
// FIXME: just a hack.
|
||||||
|
{
|
||||||
|
static scale = -1.0;
|
||||||
|
|
||||||
|
if (scale == -1.0)
|
||||||
|
{
|
||||||
|
char *s;
|
||||||
|
|
||||||
|
s = getenv("E_SCALE");
|
||||||
|
if (s) scale = atof(s);
|
||||||
|
else scale = 1.0;
|
||||||
|
}
|
||||||
|
edje_scale_set(scale);
|
||||||
|
}
|
||||||
|
|
||||||
TS("font");
|
TS("font");
|
||||||
/* init font system */
|
/* init font system */
|
||||||
if (!e_font_init())
|
if (!e_font_init())
|
||||||
|
|
|
@ -187,7 +187,7 @@ _e_test_internal(E_Container *con)
|
||||||
e_dialog_title_set(dia, "A Test Dialog");
|
e_dialog_title_set(dia, "A Test Dialog");
|
||||||
|
|
||||||
o = e_icon_add(dia->win->evas);
|
o = e_icon_add(dia->win->evas);
|
||||||
e_icon_file_set(o, "/home/rephorm/scroll.png");
|
e_icon_file_set(o, "/home/raster/scroll.png");
|
||||||
evas_object_resize(o, 1024, 768);
|
evas_object_resize(o, 1024, 768);
|
||||||
evas_object_focus_set(o, 1);
|
evas_object_focus_set(o, 1);
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
|
@ -134,22 +134,21 @@ EAPI void
|
||||||
e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
|
e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
|
||||||
{
|
{
|
||||||
API_ENTRY return;
|
API_ENTRY return;
|
||||||
/* enable if i want to hunt bad things in widgets
|
|
||||||
if (evas_list_find(sd->subobjs, sobj))
|
|
||||||
{
|
|
||||||
printf("----------EEEEEK! dupe sub obj is a sub obj!\n");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
sd->subobjs = evas_list_append(sd->subobjs, sobj);
|
sd->subobjs = evas_list_append(sd->subobjs, sobj);
|
||||||
if (!sd->child_can_focus)
|
if (!sd->child_can_focus)
|
||||||
{
|
{
|
||||||
if (e_widget_can_focus_get(sobj)) sd->child_can_focus = 1;
|
if (e_widget_can_focus_get(sobj)) sd->child_can_focus = 1;
|
||||||
}
|
}
|
||||||
|
printf("ADD SUB %p -> %p [%s]\n", obj, sobj, evas_object_type_get(sobj));
|
||||||
if (!strcmp(evas_object_type_get(sobj), SMART_NAME))
|
if (!strcmp(evas_object_type_get(sobj), SMART_NAME))
|
||||||
{
|
{
|
||||||
sd = evas_object_smart_data_get(sobj);
|
sd = evas_object_smart_data_get(sobj);
|
||||||
if (sd) sd->parent_obj = obj;
|
if (sd)
|
||||||
|
{
|
||||||
|
if (sd->parent_obj) e_widget_sub_object_del(sd->parent_obj, sobj);
|
||||||
|
sd->parent_obj = obj;
|
||||||
|
}
|
||||||
|
printf(" SD = %p\n", sd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +156,7 @@ EAPI void
|
||||||
e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj)
|
e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj)
|
||||||
{
|
{
|
||||||
API_ENTRY return;
|
API_ENTRY return;
|
||||||
|
printf("DEL SUB %p -> %p\n", obj, sobj);
|
||||||
sd->subobjs = evas_list_remove(sd->subobjs, sobj);
|
sd->subobjs = evas_list_remove(sd->subobjs, sobj);
|
||||||
if (!sd->child_can_focus)
|
if (!sd->child_can_focus)
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,12 +61,12 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
|
||||||
edje_object_part_text_set(o, "e.text.label", label);
|
edje_object_part_text_set(o, "e.text.label", label);
|
||||||
wd->type |= E_WIDGET_BUTTON_TEXT;
|
wd->type |= E_WIDGET_BUTTON_TEXT;
|
||||||
}
|
}
|
||||||
evas_object_show(o);
|
|
||||||
|
|
||||||
e_widget_sub_object_add(obj, o);
|
e_widget_sub_object_add(obj, o);
|
||||||
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
_e_wid_focus_steal, obj);
|
_e_wid_focus_steal, obj);
|
||||||
e_widget_resize_object_set(obj, o);
|
e_widget_resize_object_set(obj, o);
|
||||||
|
evas_object_show(o);
|
||||||
|
|
||||||
if (icon)
|
if (icon)
|
||||||
{
|
{
|
||||||
|
@ -74,8 +74,8 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
|
||||||
wd->o_icon = o;
|
wd->o_icon = o;
|
||||||
e_util_edje_icon_set(o, icon);
|
e_util_edje_icon_set(o, icon);
|
||||||
edje_object_part_swallow(wd->o_button, "e.swallow.icon", o);
|
edje_object_part_swallow(wd->o_button, "e.swallow.icon", o);
|
||||||
evas_object_show(o);
|
|
||||||
e_widget_sub_object_add(obj, o);
|
e_widget_sub_object_add(obj, o);
|
||||||
|
evas_object_show(o);
|
||||||
wd->type |= E_WIDGET_BUTTON_ICON;
|
wd->type |= E_WIDGET_BUTTON_ICON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue