Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fm.c e_fwin.c 


Log Message:


asparagus - pass distcheck.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -3 -r1.157 -r1.158
--- e_fm.c      5 May 2007 01:57:26 -0000       1.157
+++ e_fm.c      5 May 2007 15:14:15 -0000       1.158
@@ -2013,6 +2013,7 @@
        if (ic->h > rh) rh = ic->h;
        if ((ic->x + ic->w) > sd->max.w) sd->max.w = ic->x + ic->w;
        if ((ic->y + ic->h) > sd->max.h) sd->max.h = ic->y + ic->h;
+//     printf("BLAH %s - %i %i %ix%i\n", ic->info.file, ic->x, ic->y, ic->w, 
ic->h);
      }
 }
 
@@ -2372,25 +2373,36 @@
         * fileman/list_odd/fixed
         * fileman/list_odd/variable
         * 
-        * and now list other things i will need
-        * 
-        * fileman/background
-        * fileman/selection
-        * fileman/scrollframe
-        *
         */
+//     printf("CALC ICON\n");
        if ((!ic->sd->config->icon.fixed.w) || (!ic->sd->config->icon.fixed.h))
          {
             obj = ic->sd->tmp.obj;
             if (!obj)
               {
                  obj = edje_object_add(evas_object_evas_get(ic->sd->obj));
-                 _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
-                                         "e/fileman/icon/variable");
+                 if ((ic->sd->config->icon.fixed.w) && 
(ic->sd->config->icon.fixed.h))
+                   _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
+                                                "e/fileman/icon/fixed");
+                 else
+                   _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
+                                                "e/fileman/icon/variable");
                   ic->sd->tmp.obj = obj;
+//               printf("CALC OBJ %p\n", ic->sd->tmp.obj);
               }
             _e_fm2_icon_label_set(ic, obj);
+            obj2 = ic->sd->tmp.obj2;
+            if (!obj2)
+              {
+                 obj2 = 
evas_object_rectangle_add(evas_object_evas_get(ic->sd->obj));
+                 ic->sd->tmp.obj2 = obj2;
+              }
+            /* FIXME: if icons are allowed to have their own size - use it */
+            edje_extern_object_min_size_set(obj2, ic->sd->config->icon.icon.w, 
ic->sd->config->icon.icon.h);
+            edje_extern_object_max_size_set(obj2, ic->sd->config->icon.icon.w, 
ic->sd->config->icon.icon.h);
+            edje_object_part_swallow(obj, "e.swallow.icon", obj2);
             edje_object_size_min_calc(obj, &mw, &mh);
+//          printf("CALC %ix%i\n", mw, mh);
          }
        ic->w = mw;
        ic->h = mh;
@@ -2405,12 +2417,13 @@
             if (!obj)
               {
                  obj = edje_object_add(evas_object_evas_get(ic->sd->obj));
-                 if (ic->sd->config->icon.fixed.w)
+// vairable sized list items are pretty usless - ignore.                 
+//               if (ic->sd->config->icon.fixed.w)
                    _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
                                            "e/fileman/list/fixed");
-                 else
-                   _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
-                                           "e/fileman/list/variable");
+//               else
+//                 _e_fm2_theme_edje_object_set(ic->sd, obj, 
"base/theme/fileman",
+//                                         "e/fileman/list/variable");
                  ic->sd->tmp.obj = obj;
               }
             _e_fm2_icon_label_set(ic, obj);
@@ -2494,24 +2507,24 @@
    evas_object_stack_below(ic->obj, ic->sd->drop);
    if (ic->sd->config->view.mode == E_FM2_VIEW_MODE_LIST)
      {
-        if (ic->sd->config->icon.fixed.w)
-         {
+//        if (ic->sd->config->icon.fixed.w)
+//       {
             if (ic->odd)
               _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
                                       "e/fileman/list_odd/fixed");
             else
               _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
                                       "e/fileman/list/fixed");
-         }
-       else
-         {
-            if (ic->odd)
-              _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
-                                      "e/fileman/list_odd/variable");
-            else
-              _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
-                                      "e/fileman/list/variable");
-         }
+//       }
+//     else
+//       {
+//          if (ic->odd)
+//            _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
+//                                    "e/fileman/list_odd/variable");
+//          else
+//            _e_fm2_theme_edje_object_set(ic->sd, ic->obj, 
"base/theme/widgets",
+//                                    "e/fileman/list/variable");
+//       }
      }
    else
      {
@@ -3340,7 +3353,7 @@
    if (strcmp(type, "text/uri-list")) return;
    ev = (E_Event_Dnd_Move *)event;
    printf("DND MOVE %i %i\n", ev->x, ev->y);
-   for (l = sd->icons; l; l = l->next)
+   for (l = sd->icons; l; l = l->next) /* FIXME: should only walk regions and 
skip non-visible ones */
      {
        ic = l->data;
        if (E_INSIDE(ev->x, ev->y, ic->x - ic->sd->pos.x, ic->y - 
ic->sd->pos.y, ic->w, ic->h))
@@ -3352,7 +3365,6 @@
               {
                  /* if there is a .order file - we can re-order files */
                  if (ic->sd->order_file)
-//               if (1)
                    {
                       /* if dir: */
                        if ((S_ISDIR(ic->info.statinfo.st_mode)) &&
@@ -3398,7 +3410,12 @@
               }
             else
               {
-                 /* FIXME: icon view mode */
+                 /* if it's over a dir - hilight as it will be dropped in */
+                 if ((S_ISDIR(ic->info.statinfo.st_mode)) &&
+                     (!ic->sd->config->view.no_subdir_drop))
+                   _e_fm2_dnd_drop_show(ic, -1);
+                 else
+                   _e_fm2_dnd_drop_hide(sd->obj);
               }
             return;
          }
@@ -3428,7 +3445,7 @@
          }
        else
          {
-            /* FIXME: icon view mode */
+            _e_fm2_dnd_drop_all_show(sd->obj);
          }
        return;
      }
@@ -3575,6 +3592,20 @@
                         }
                    }
               }
+            else
+              {
+                 for (ll = fsel; ll; ll = ll->next)
+                   {
+                      fp = _e_fm2_icon_desktop_url_eval(ll->data);
+                      if (!fp) continue;
+                      /* move the file into the subdir */
+                      snprintf(buf, sizeof(buf), "%s/%s",
+                               sd->realpath, ecore_file_get_file(fp));
+                      printf("mv %s %s\n", (char *)fp, buf);
+                      _e_fm2_client_file_move(sd->id, fp, buf, "", 0, ev->x, 
ev->y);
+                      evas_stringshare_del(fp);
+                   }
+              }
          }
      }
    _e_fm2_dnd_drop_hide(sd->obj);
@@ -3944,7 +3975,7 @@
        
        e_icon_size_get(obj, &w, &h);
        have_alpha = e_icon_alpha_get(obj);
-       if (ic->sd->config->view.mode == E_FM2_VIEW_MODE_LIST)
+//     if (ic->sd->config->view.mode == E_FM2_VIEW_MODE_LIST)
          {
             edje_extern_object_aspect_set(obj,
                                           EDJE_ASPECT_CONTROL_BOTH, w, h);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- e_fwin.c    3 May 2007 17:24:13 -0000       1.39
+++ e_fwin.c    5 May 2007 15:14:15 -0000       1.40
@@ -112,15 +112,24 @@
    o = e_fm2_add(e_win_evas_get(fwin->win));
    fwin->fm_obj = o;
    memset(&fmc, 0, sizeof(E_Fm2_Config));
+#if 1   
    fmc.view.mode = E_FM2_VIEW_MODE_LIST;
-   fmc.view.open_dirs_in_place = 0;
-   fmc.view.selector = 0;
-   fmc.view.single_click = 0;
-   fmc.view.no_subdir_jump = 0;
    fmc.icon.list.w = 24;
    fmc.icon.list.h = 24;
    fmc.icon.fixed.w = 1;
    fmc.icon.fixed.h = 1;
+#else   
+   fmc.view.mode = E_FM2_VIEW_MODE_ICONS;
+   fmc.icon.icon.w = 48;
+   fmc.icon.icon.h = 48;
+   fmc.icon.fixed.w = 0;
+   fmc.icon.fixed.h = 0;
+#endif
+   
+   fmc.view.open_dirs_in_place = 0;
+   fmc.view.selector = 0;
+   fmc.view.single_click = 0;
+   fmc.view.no_subdir_jump = 0;
    fmc.icon.extension.show = 1;
    fmc.list.sort.no_case = 1;
    fmc.list.sort.dirs.first = 1;
@@ -952,6 +961,8 @@
 //   printf("PAN %p -> %i %i\n", fwin, x, y);
    if (x > fwin->fm_pan.max_x) x = fwin->fm_pan.max_x;
    if (y > fwin->fm_pan.max_y) y = fwin->fm_pan.max_y;
+   if (x < 0) x = 0;
+   if (y < 0) y = 0;
    fwin->fm_pan.x = x;
    fwin->fm_pan.y = y;
    _e_fwin_pan_scroll_update(fwin);
@@ -1016,7 +1027,10 @@
    msg->val[3] = fwin->fm_pan.max_y;
    msg->val[4] = fwin->fm_pan.w;
    msg->val[5] = fwin->fm_pan.h;
-//   printf("SEND MSG\n");
+//   printf("SEND MSG %i %i | %i %i | %ix%i\n",
+//       fwin->fm_pan.x, fwin->fm_pan.y,
+//       fwin->fm_pan.max_x, fwin->fm_pan.max_y,
+//       fwin->fm_pan.w, fwin->fm_pan.h);
    if (fwin->under_obj)
      edje_object_message_send(fwin->under_obj, EDJE_MESSAGE_INT_SET, 1, msg);
    if (fwin->over_obj)



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to