e_comp_object: remove the unused code 74/309474/2
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 11 Apr 2024 04:25:50 +0000 (13:25 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 12 Apr 2024 07:26:50 +0000 (07:26 +0000)
The name is always "COMP_RESHADOW" in the current enlightenment impelmentation.
Therefore, the remained code which is activated when the name is not "COMP_RESHADOW"
is useless.

Change-Id: Iafa9792db598cd34e9c4969929505edb8f14f4f1

src/bin/e_comp_object.c

index 07fdcb4..b01fe36 100644 (file)
@@ -4216,146 +4216,12 @@ e_comp_object_frame_exists(Evas_Object *obj)
 EINTERN Eina_Bool
 e_comp_object_frame_theme_set(Evas_Object *obj, const char *name)
 {
-   Evas_Object *o, *pbg;
-   char buf[4096];
-   int ok;
-   Eina_Stringshare *theme;
-
    API_ENTRY EINA_FALSE;
 
-   if (!e_util_strcmp(cw->frame_theme, name))
-    return edje_object_part_swallow(cw->shobj, "e.swallow.content", cw->frame_object ?: cw->obj);
    if (!e_util_strcmp(name, "COMP_RESHADOW"))
      return _e_comp_object_shadow_setup(cw);
-   pbg = cw->frame_object;
-   theme = eina_stringshare_add(name);
-
-   if (cw->frame_object)
-     {
-        int w, h;
-
-        w = cw->ec->w, h = cw->ec->h;
-        e_comp_object_frame_wh_unadjust(obj, w, h, &cw->ec->w, &cw->ec->h);
-        if ((cw->ec->w != w) || (cw->ec->h != h))
-          {
-             cw->ec->changes.size = 1;
-             EC_CHANGED(cw->ec);
-          }
-        E_FREE_FUNC(cw->frame_object, evas_object_del);
-        if (!name) goto reshadow;
-     }
-   o = edje_object_add(e_comp->evas);
-   snprintf(buf, sizeof(buf), "e/widgets/border/%s/border", name);
-   ok = e_theme_edje_object_set(o, "base/theme/border", buf);
-   if ((!ok) && (!e_util_strcmp(name, "borderless")))
-     {
-        cw->frame_object = NULL;
-        evas_object_del(o);
-        eina_stringshare_del(cw->frame_theme);
-        cw->frame_theme = theme;
-        goto reshadow;
-     }
-   if (!ok)
-     {
-        if (theme != e_config->theme_default_border_style)
-          {
-             snprintf(buf, sizeof(buf), "e/widgets/border/%s/border", e_config->theme_default_border_style);
-             ok = e_theme_edje_object_set(o, "base/theme/border", buf);
-          }
-        if (!ok)
-          {
-             ok = e_theme_edje_object_set(o, "base/theme/border",
-                                          "e/widgets/border/default/border");
-             if (ok && (theme == e_config->theme_default_border_style))
-               {
-                  /* Reset default border style to default */
-                  eina_stringshare_replace(&e_config->theme_default_border_style, "default");
-                  e_config_save_queue();
-               }
-          }
-     }
-
-   if (ok)
-     {
-        cw->frame_object = o;
-        eina_stringshare_del(cw->frame_theme);
-        cw->frame_theme = theme;
-        evas_object_name_set(o, "cw->frame_object");
-
-        if (cw->frame_name)
-          edje_object_part_text_set(o, "e.text.title", cw->frame_name);
-
-        if (!pbg)
-          {
-             cw->ec->changes.icon = 1;
-             EC_CHANGED(cw->ec);
-          }
-     }
-   else
-     {
-        CRI("USER IS USING A SHITTY THEME! ABORT!!!!");
-        evas_object_del(o);
-     }
-reshadow:
-   if (cw->shobj)
-     _e_comp_object_shadow_setup(cw);
-   do
-     {
-        int old_x, old_y, new_x = 0, new_y = 0;
 
-        old_x = cw->x, old_y = cw->y;
-
-        _e_comp_smart_cb_frame_recalc(cw, cw->smart_obj, NULL);
-        if (pbg)
-          new_x = cw->ec->x, new_y = cw->ec->y;
-        else if (cw->ec->placed || (!cw->ec->new_client))
-          {
-             /* if no previous frame:
-              * - reapply client_inset
-              * - clamp to zone
-              */
-             int x, y;
-
-             if (cw->ec->changes.size)
-               {
-                  x = cw->ec->x;
-                  y = cw->ec->y;
-               }
-             else
-               {
-                  E_Zone *zone;
-                  zone = e_comp_zone_find_by_ec(cw->ec);
-                  if (!zone) break;
-
-                  x = cw->ec->client.x, y = cw->ec->client.y;
-                  x = MAX(zone->x, cw->ec->client.x - cw->client_inset.l);
-                  y = MAX(zone->y, cw->ec->client.y - cw->client_inset.t);
-               }
-             new_x = x, new_y = y;
-          }
-
-        if (old_x != new_x || old_y != new_y)
-          {
-             /* this guarantees that we won't get blocked by the NOP check in the interceptor */
-             cw->y = cw->x = -99999;
-             evas_object_move(obj, new_x, new_y);
-          }
-     } while (0);
-
-   if (cw->ec->maximized)
-     {
-        cw->ec->changes.need_maximize = 1;
-        EC_CHANGED(cw->ec);
-     }
-   evas_object_smart_callback_call(cw->smart_obj, "frame_changed", NULL);
-   if (cw->frame_object)
-     {
-        cw->frame_extends = !!edje_object_data_get(cw->frame_object, "frame_extends");
-     }
-   else
-     cw->frame_extends = 0;
-   evas_object_del(pbg);
-   return EINA_TRUE;
+   return EINA_FALSE;
 }
 
 E_API void