From: Enlightenment S. <no-...@en...> - 2008-09-16 19:21:04
|
Author: raster Date: 2008-09-16 19:21:00 -0700 (Tue, 16 Sep 2008) New Revision: 36033 Log: been hacking... umm. config dialog additions. Modified: trunk/e/src/bin/e_canvas.c trunk/e/src/bin/e_config_dialog.c trunk/e/src/bin/e_config_dialog.h trunk/e/src/bin/e_main.c trunk/e/src/bin/e_test.c trunk/e/src/bin/e_widget.c trunk/e/src/bin/e_widget_button.c Modified: trunk/e/src/bin/e_canvas.c =================================================================== --- trunk/e/src/bin/e_canvas.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_canvas.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -39,20 +39,6 @@ } else if (e_config->font_hinting == 2) 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 Modified: trunk/e/src/bin/e_config_dialog.c =================================================================== --- trunk/e/src/bin/e_config_dialog.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_config_dialog.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -173,6 +173,7 @@ else snprintf(buf, sizeof(buf), "%s...%s", cfd->class, "ADVANCED"); 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; e_object_del_attach_func_set(E_OBJECT(cfd->dia), _e_config_dialog_cb_dialog_del); e_dialog_title_set(cfd->dia, cfd->title); @@ -210,6 +211,7 @@ } 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_dialog_content_set(cfd->dia, o, mw, mh); @@ -226,7 +228,8 @@ e_dialog_button_add(cfd->dia, _("Close"), NULL, _e_config_dialog_cb_close, cfd); 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); if (cfd->icon) e_dialog_border_icon_set(cfd->dia, cfd->icon); } @@ -364,6 +367,7 @@ E_Config_Dialog *cfd; cfd = data; + printf("_e_config_dialog_cb_changed\n"); if (!cfd->hide_buttons) { cfd->cfg_changed = 1; Modified: trunk/e/src/bin/e_config_dialog.h =================================================================== --- trunk/e/src/bin/e_config_dialog.h 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_config_dialog.h 2008-09-17 02:21:00 UTC (rev 36033) @@ -22,8 +22,9 @@ struct _E_Config_Dialog_View { - int override_auto_apply; - int basic_only; + unsigned char override_auto_apply : 1; + unsigned char basic_only : 1; + unsigned char normal_win : 1; void *(*create_cfdata) (E_Config_Dialog *cfd); void (*free_cfdata) (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata); Modified: trunk/e/src/bin/e_main.c =================================================================== --- trunk/e/src/bin/e_main.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_main.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -534,6 +534,21 @@ /* setup edje to animate @ e_config->framerate frames per sec. */ 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"); /* init font system */ if (!e_font_init()) Modified: trunk/e/src/bin/e_test.c =================================================================== --- trunk/e/src/bin/e_test.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_test.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -187,7 +187,7 @@ e_dialog_title_set(dia, "A Test Dialog"); 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_focus_set(o, 1); evas_object_show(o); Modified: trunk/e/src/bin/e_widget.c =================================================================== --- trunk/e/src/bin/e_widget.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_widget.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -134,22 +134,21 @@ e_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj) { 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); if (!sd->child_can_focus) { 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)) { 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 @@ e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj) { API_ENTRY return; + printf("DEL SUB %p -> %p\n", obj, sobj); sd->subobjs = evas_list_remove(sd->subobjs, sobj); if (!sd->child_can_focus) { Modified: trunk/e/src/bin/e_widget_button.c =================================================================== --- trunk/e/src/bin/e_widget_button.c 2008-09-17 02:16:34 UTC (rev 36032) +++ trunk/e/src/bin/e_widget_button.c 2008-09-17 02:21:00 UTC (rev 36033) @@ -61,12 +61,12 @@ edje_object_part_text_set(o, "e.text.label", label); wd->type |= E_WIDGET_BUTTON_TEXT; } - evas_object_show(o); e_widget_sub_object_add(obj, o); evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_wid_focus_steal, obj); e_widget_resize_object_set(obj, o); + evas_object_show(o); if (icon) { @@ -74,8 +74,8 @@ wd->o_icon = o; e_util_edje_icon_set(o, icon); edje_object_part_swallow(wd->o_button, "e.swallow.icon", o); + e_widget_sub_object_add(obj, o); evas_object_show(o); - e_widget_sub_object_add(obj, o); wd->type |= E_WIDGET_BUTTON_ICON; } |