Fixed Prevent issues: 55301, 56401, 56400, 56431
authorRajeev Ranjan <rajeev.r@samsung.com>
Sat, 15 Oct 2011 08:34:29 +0000 (14:04 +0530)
committerRajeev Ranjan <rajeev.r@samsung.com>
Wed, 9 Nov 2011 08:45:57 +0000 (14:15 +0530)
Change-Id: I1994004fabe843d9918b2177212a0b1f536e1937

src/bin/test_panel.c
src/lib/elm_glview.c
src/lib/elm_win.c

index 3092fc9..dd42ff3 100644 (file)
@@ -89,14 +89,22 @@ _fill_list(Evas_Object *obj)
    struct dirent *de;
    Eina_List *dirs = NULL, *l;
    char *real;
+   const char *home;
 
-   if (!(d = opendir(getenv("HOME")))) return;
+#ifdef _WIN32
+   home = evil_homedir_get();
+#else
+   home = getenv("HOME");
+#endif
+   if (!home)
+     home = "./";
+   if (!(d = opendir(home))) return;
    while ((de = readdir(d)))
      {
         char buff[PATH_MAX];
 
         if (de->d_name[0] == '.') continue;
-        snprintf(buff, sizeof(buff), "%s/%s", getenv("HOME"), de->d_name);
+        snprintf(buff, sizeof(buff), "%s/%s", home, de->d_name);
         if (!ecore_file_is_dir(buff)) continue;
         real = ecore_file_realpath(buff);
         dirs = eina_list_append(dirs, real);
index d1311e7..8e6e241 100644 (file)
@@ -337,13 +337,13 @@ elm_glview_resize_policy_set(Evas_Object *obj, Elm_GLView_Resize_Policy policy)
       case ELM_GLVIEW_RESIZE_POLICY_RECREATE:
       case ELM_GLVIEW_RESIZE_POLICY_SCALE:
          wd->scale_policy = policy;
+         _glview_update_surface(obj);
+         elm_glview_changed_set(obj);
          return EINA_TRUE;
       default:
          ERR("Invalid Scale Policy.\n");
          return EINA_FALSE;
      }
-   _glview_update_surface(obj);
-   elm_glview_changed_set(obj);
 }
 
 EAPI Eina_Bool
index 7f97552..7e6f957 100644 (file)
@@ -147,6 +147,7 @@ _shot_file_get(Elm_Win *win)
                        sprintf(repname + (dotptr - tmp), "%03i",
                                win->shot.shot_counter + 1);
                        strcat(repname, dotptr);
+                       free(tmp);
                        return repname;
                     }
                }
@@ -2642,7 +2643,6 @@ _elm_ee_win_get(const Evas_Object *obj)
 EAPI Ecore_X_Window
 elm_win_xwindow_get(const Evas_Object *obj)
 {
-   Ecore_X_Window xwin = 0;
    Elm_Win *win;
    const char *type;
 
@@ -2652,10 +2652,9 @@ elm_win_xwindow_get(const Evas_Object *obj)
    if (type != widtype) return _elm_ee_win_get(obj);
 #ifdef HAVE_ELEMENTARY_X
    win = elm_widget_data_get(obj);
-   if (!win) return xwin;
+   if (!win) return 0;
    if (win->xwin) return win->xwin;
    if (win->parent) return elm_win_xwindow_get(win->parent);
 #endif
-   return xwin;
-   win = NULL;
+   return 0;
 }