Some more patches here. This time it's five patches for Elementary:

 01  Removes unused variable.
 02  Fixes bad format strings in *printf() calls.
 03  Simplifies code and removes redundant duplicated code.
 04  Fixes copy&paste error and possible invalid memory access.
 05  Require Ecore >= 1.7.99 to build Elementary to fix following
     compiler errors:
     -------------------------------------
     elm_win.c: In function '_elm_win_client_message':
     elm_win.c:1880:23: error: 'ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP' 
undeclared (first use in this function)
     elm_win.c:1880:23: note: each undeclared identifier is reported only once 
for each function it appears in
     elm_win.c:1886:23: error: 'ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN' 
undeclared (first use in this function)
     -------------------------------------

-- Igor
Index: src/examples/web_example_01.c
===================================================================
--- src/examples/web_example_01.c	(revision 77380)
+++ src/examples/web_example_01.c	(working copy)
@@ -13,7 +13,7 @@
 EAPI_MAIN int
 elm_main(int argc, char *argv[])
 {
-   Evas_Object *win, *bg, *web;
+   Evas_Object *win, *web;
 
    /* The program will proceed only if Ewebkit library is available. */
    if (elm_need_web() == EINA_FALSE)
Index: src/bin/test_flipselector.c
===================================================================
--- src/bin/test_flipselector.c	(revision 77380)
+++ src/bin/test_flipselector.c	(working copy)
@@ -129,7 +129,7 @@
    evas_object_size_hint_weight_set(fp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    for (i = 1990; i <= 2099; i++)
      {
-        snprintf(buf, 8, "%d", i);
+        snprintf(buf, 8, "%u", i);
         elm_flipselector_item_append(fp, buf, _sel_cb, NULL);
      }
 
Index: src/bin/test_web.c
===================================================================
--- src/bin/test_web.c	(revision 77380)
+++ src/bin/test_web.c	(working copy)
@@ -226,7 +226,7 @@
 static void
 _console_message_hook(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *message, unsigned int line_number, const char *source_id)
 {
-   printf("CONSOLE: %s:%d:%s\n", source_id, line_number, message);
+   printf("CONSOLE: %s:%u:%s\n", source_id, line_number, message);
 }
 
 static void
Index: src/lib/elc_popup.c
===================================================================
--- src/lib/elc_popup.c	(revision 77380)
+++ src/lib/elc_popup.c	(working copy)
@@ -447,9 +447,9 @@
           {
              sd->buttons[i] = sd->buttons[i + 1];
 
-             snprintf(buf, sizeof(buf), "actionbtn%u", pos + 1);
+             snprintf(buf, sizeof(buf), "actionbtn%d", pos + 1);
              elm_object_part_content_unset(sd->action_area, buf);
-             snprintf(buf, sizeof(buf), "actionbtn%u", pos);
+             snprintf(buf, sizeof(buf), "actionbtn%d", pos);
              elm_object_part_content_set
                (sd->action_area, buf, sd->buttons[i]->btn);
           }
Index: src/lib/elm_check.c
===================================================================
--- src/lib/elm_check.c	(revision 77380)
+++ src/lib/elm_check.c	(working copy)
@@ -41,27 +41,13 @@
      {
         elm_layout_signal_emit(obj, "elm,state,check,on", "elm");
         if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
-          {
-             if (!elm_layout_text_get(obj, "on"))
-               {
-                  _elm_access_say(E_("State: On"));
-               }
-             else
-               _elm_access_say(E_("State: On"));
-          }
+             _elm_access_say(E_("State: On"));
      }
    else
      {
         elm_layout_signal_emit(obj, "elm,state,check,off", "elm");
         if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
-          {
-             if (!elm_layout_text_get(obj, "off"))
-               {
-                  _elm_access_say(E_("State: Off"));
-               }
-             else
-               _elm_access_say(E_("State: Off"));
-          }
+             _elm_access_say(E_("State: Off"));
      }
 
    evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);
Index: src/lib/elm_menu.c
===================================================================
--- src/lib/elm_menu.c	(revision 77380)
+++ src/lib/elm_menu.c	(working copy)
@@ -110,8 +110,6 @@
 
    if (y_p + bh > py + ph)
      y_p -= y_p + bh - (py + ph);
-   if (y_p < py)
-     y_p += y_p - y_p;
 
    evas_object_move(parent_it->submenu.location, x_p, y_p);
    evas_object_resize(parent_it->submenu.location, bw, h_p);
@@ -149,10 +147,10 @@
    if (elm_widget_mirrored_get(obj)) x_p -= w_p;
 
    if (x_p + bw > x2 + w2) x_p -= x_p + bw - (x2 + w2);
-   if (x_p < x2) x_p += x2 - x_p;
+   if (x_p < x2) x_p = x2;
 
    if (y_p + h_p + bh > y2 + h2) y_p -= y_p + h_p + bh - (y2 + h2);
-   if (y_p < y2) y_p += y2 - y_p;
+   if (y_p < y2) y_p = y2;
 
    evas_object_move(sd->location, x_p, y_p);
    evas_object_resize(sd->location, bw, h_p);
Index: src/lib/elm_toolbar.c
===================================================================
--- src/lib/elm_toolbar.c	(revision 77380)
+++ src/lib/elm_toolbar.c	(working copy)
@@ -833,16 +833,8 @@
 
    if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_NONE)
      {
-        if (sd->vertical)
-          {
-             minw = minw_bx + (w - vw);
-             minh = minh_bx + (h - vh);
-          }
-        else
-          {
-             minw = minw_bx + (w - vw);
-             minh = minh_bx + (h - vh);
-          }
+        minw = minw_bx + (w - vw);
+        minh = minh_bx + (h - vh);
      }
    else if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_EXPAND)
      {
Index: src/examples/codegen_example.c
===================================================================
--- src/examples/codegen_example.c	(revision 77380)
+++ src/examples/codegen_example.c	(working copy)
@@ -79,7 +79,7 @@
 EAPI_MAIN int
 elm_main(int argc, char **argv)
 {
-    Evas_Object *win, *bg, *btn, *layout, *tbl_items[3];
+    Evas_Object *win, *bg, *btn, *layout, *tbl_items[6];
     const char *labels[] = {"One", "Two", "Three", "Four", "Five", "Six"};
     int i;
 
Index: src/lib/elm_access.c
===================================================================
--- src/lib/elm_access.c	(revision 77380)
+++ src/lib/elm_access.c	(working copy)
@@ -691,13 +691,13 @@
 EAPI void
 _elm_access_widget_item_register(Elm_Widget_Item *item)
 {
-   Evas_Object *ao;
-   Evas_Object *ho = item->view;
+   Evas_Object *ao, *ho;
    Evas_Coord x, y, w, h;
 
    if (!item) return;
 
    // create access object
+   ho = item->view;
    ao = _elm_access_add(item->widget);
    evas_object_event_callback_add(ho, EVAS_CALLBACK_RESIZE,
                                   _content_resize, ao);
Index: src/lib/elm_flip.c
===================================================================
--- src/lib/elm_flip.c	(revision 77380)
+++ src/lib/elm_flip.c	(working copy)
@@ -874,7 +874,7 @@
         else
           {
              if (sd->front.content)
-               evas_object_hide(sd->front.clip);
+               evas_object_show(sd->front.clip);
              else
                evas_object_hide(sd->front.clip);
              if (sd->back.content)
Index: configure.ac
===================================================================
--- configure.ac	(revision 77385)
+++ configure.ac	(working copy)
@@ -218,9 +218,9 @@
     eina >= 1.6.99
     eet >= 1.6.99
     evas >= 1.6.99
-    ecore >= 1.6.99
-    ecore-evas >= 1.6.99
-    ecore-file >= 1.6.99
+    ecore >= 1.7.99
+    ecore-evas >= 1.7.99
+    ecore-file >= 1.7.99
     edje >= 1.6.99
    ]
 )
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to