some logic/indent reformatting
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 21 Jul 2011 20:54:54 +0000 (20:54 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 21 Jul 2011 20:54:54 +0000 (20:54 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@61568 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_entry.c

index 5960bfd..a86041b 100644 (file)
@@ -1425,52 +1425,50 @@ _signal_anchor_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emis
    Widget_Data *wd = elm_widget_data_get(data);
    Elm_Entry_Anchor_Info ei;
    char *buf2, *p, *p2, *n;
+   const Eina_List *geoms;
    if (!wd) return;
    p = strrchr(emission, ',');
-   if (p)
-     {
-        const Eina_List *geoms;
-
-        n = p + 1;
-        p2 = p -1;
-        while (p2 >= emission)
-          {
-             if (*p2 == ',') break;
-             p2--;
-          }
-        p2++;
-        buf2 = alloca(5 + p - p2);
-        strncpy(buf2, p2, p - p2);
-        buf2[p - p2] = 0;
-        ei.name = n;
-        ei.button = atoi(buf2);
-        ei.x = ei.y = ei.w = ei.h = 0;
-        geoms =
-           edje_object_part_text_anchor_geometry_get(wd->ent, "elm.text", ei.name);
-        if (geoms)
+   if (!p) return;
+
+   n = p + 1;
+   p2 = p -1;
+   while (p2 >= emission)
+     {
+        if (*p2 == ',') break;
+        p2--;
+     }
+   p2++;
+   buf2 = alloca(5 + p - p2);
+   strncpy(buf2, p2, p - p2);
+   buf2[p - p2] = 0;
+   ei.name = n;
+   ei.button = atoi(buf2);
+   ei.x = ei.y = ei.w = ei.h = 0;
+   geoms =
+      edje_object_part_text_anchor_geometry_get(wd->ent, "elm.text", ei.name);
+   if (geoms)
+     {
+        Evas_Textblock_Rectangle *r;
+        const Eina_List *l;
+        Evas_Coord px, py, x, y;
+
+        evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
+        evas_pointer_canvas_xy_get(evas_object_evas_get(wd->ent), &px, &py);
+        EINA_LIST_FOREACH(geoms, l, r)
           {
-             Evas_Textblock_Rectangle *r;
-             const Eina_List *l;
-             Evas_Coord px, py, x, y;
-
-             evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
-             evas_pointer_canvas_xy_get(evas_object_evas_get(wd->ent), &px, &py);
-             EINA_LIST_FOREACH(geoms, l, r)
+             if (((r->x + x) <= px) && ((r->y + y) <= py) &&
+                 ((r->x + x + r->w) > px) && ((r->y + y + r->h) > py))
                {
-                  if (((r->x + x) <= px) && ((r->y + y) <= py) &&
-                      ((r->x + x + r->w) > px) && ((r->y + y + r->h) > py))
-                    {
-                       ei.x = r->x + x;
-                       ei.y = r->y + y;
-                       ei.w = r->w;
-                       ei.h = r->h;
-                       break;
-                    }
+                  ei.x = r->x + x;
+                  ei.y = r->y + y;
+                  ei.w = r->w;
+                  ei.h = r->h;
+                  break;
                }
           }
-        if (!wd->disabled)
-          evas_object_smart_callback_call(data, SIG_ANCHOR_CLICKED, &ei);
      }
+   if (!wd->disabled)
+     evas_object_smart_callback_call(data, SIG_ANCHOR_CLICKED, &ei);
 }
 
 static void