Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/modules/fileman


Modified Files:
        e_fwin.c 


Log Message:
Spawn new fwin next to icon that was selected.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/modules/fileman/e_fwin.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_fwin.c    3 Dec 2007 18:56:33 -0000       1.19
+++ e_fwin.c    11 Dec 2007 14:59:18 -0000      1.20
@@ -377,7 +377,7 @@
    if (fileman_config->view.show_toolbar) 
      {
        fwin->tbar = e_toolbar_new(e_win_evas_get(fwin->win), "toolbar", 
-                             fwin->win, fwin->fm_obj);
+                                  fwin->win, fwin->fm_obj);
        e_toolbar_show(fwin->tbar);
      }
 
@@ -1071,7 +1071,7 @@
                           e_fm2_real_path_get(fwin->fm_obj), ici->file);
                  if (S_ISDIR(ici->statinfo.st_mode))
                    {
-                      if (!fileman_config->view.open_dirs_in_place || 
fwin->zone) 
+                      if ((!fileman_config->view.open_dirs_in_place) || 
(fwin->zone)) 
                         {
                            if (fwin->win)
                              fwin2 = _e_fwin_new(fwin->win->container, NULL, 
buf);
@@ -1093,7 +1093,8 @@
                    {
                       Evas_Object *oic;
                       const char *itype = NULL;
-                      
+                      int ix, iy, iw, ih, nx, ny;
+
                       oic = e_fm2_icon_get(evas_object_evas_get(fwin->fm_obj),
                                            ici->ic, NULL, NULL, 0, &itype);
                       if (oic)
@@ -1126,6 +1127,17 @@
                                   evas_stringshare_add(file);
                              }
                            evas_object_del(oic);
+
+                           /* Move spawned window */
+                           e_fm2_icon_geometry_get(ici->ic, &ix, &iy, &iw, 
&ih);
+                           nx = ((ix + iw) / 2);
+                           ny = ((iy + ih) / 2);
+                           if (fwin->win) 
+                             {
+                                nx += fwin->win->x;
+                                ny += fwin->win->y;
+                             }
+                           e_win_move(fwin2->win, nx, ny);
                         }
                       if (ici->label)
                         e_win_title_set(fwin2->win, ici->label);



-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to