From: cnook <kimcinoo@gmail.com>
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 25 Apr 2011 09:04:23 +0000 (09:04 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 25 Apr 2011 09:04:23 +0000 (09:04 +0000)
I have attached patch for elm_diskselector.
This patch is setting the width of elm_diskselector using its parent width
size, if there is no mention in the theme file.

git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@58895 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_diskselector.c

index 71e4a76..66dc2b4 100644 (file)
@@ -168,6 +168,7 @@ static void
 _theme_data_get(Widget_Data *wd)
 {
    const char* str;
+   Evas_Object *parent;
    str = edje_object_data_get(wd->right_blank, "len_threshold");
    if (str) wd->len_threshold = MAX(0, atoi(str));
    else wd->len_threshold = 0;
@@ -181,7 +182,12 @@ _theme_data_get(Widget_Data *wd)
 
    str = edje_object_data_get(wd->right_blank, "min_width");
    if (str) wd->minw = MAX(-1, atoi(str));
-   else wd->minw = -1;
+   else
+     {
+        parent = elm_widget_parent_widget_get(wd->self);
+        if (!parent) wd->minw = -1;
+        else evas_object_geometry_get(parent, NULL, NULL, &wd->minw, NULL);
+     }
 
    str = edje_object_data_get(wd->right_blank, "min_height");
    if (str) wd->minh = MAX(-1, atoi(str));