Enlightenment CVS committal

Author  : lok
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_filechooser_widget.c etk_tree.c 


Log Message:
[Tree] Fix a double sent row-selected signal when the multiple selection is 
activated

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_filechooser_widget.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- etk_filechooser_widget.c    21 Sep 2007 11:14:02 -0000      1.29
+++ etk_filechooser_widget.c    26 Sep 2007 21:10:28 -0000      1.30
@@ -387,31 +387,31 @@
       return ETK_FALSE;
    
    if (strchr(filename, '/') == NULL)
-     {
-       // filename doesn't contains slashes, then i can use it directly 
-       etk_entry_text_set(ETK_ENTRY(filechooser_widget->name_entry), filename);
-       return ETK_TRUE;
-     } 
+   {
+      // filename doesn't contains slashes, then i can use it directly 
+      etk_entry_text_set(ETK_ENTRY(filechooser_widget->name_entry), filename);
+      return ETK_TRUE;
+   } 
    else
-     {
-       // filename contains slashes, now i've to check if path is right
-       char *path;
+   {
+      // filename contains slashes, now i've to check if path is right
+      char *path;
 
-       path = ecore_file_dir_get(filename);
-       if (ecore_file_exists(path) == 0) 
-         {
-           // the extracted path doesn't exists, error
-           return ETK_FALSE; 
-         } 
-       else 
-         {
-           // the extracted path exists, sync current folder and set filename
-           etk_filechooser_widget_current_folder_set(filechooser_widget, path);
-           etk_entry_text_set(ETK_ENTRY(filechooser_widget->name_entry), 
ecore_file_file_get(filename));
-           return ETK_TRUE;         
-         }
-       free(path);
-     }
+      path = ecore_file_dir_get(filename);
+      if (ecore_file_exists(path) == 0) 
+      {
+         // the extracted path doesn't exists, error
+         return ETK_FALSE; 
+      } 
+      else 
+      {
+         // the extracted path exists, sync current folder and set filename
+         etk_filechooser_widget_current_folder_set(filechooser_widget, path);
+         etk_entry_text_set(ETK_ENTRY(filechooser_widget->name_entry), 
ecore_file_file_get(filename));
+         return ETK_TRUE;         
+      }
+      free(path);
+   }
 }
 
 /**************************
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_tree.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- etk_tree.c  19 Sep 2007 20:16:26 -0000      1.108
+++ etk_tree.c  26 Sep 2007 21:10:28 -0000      1.109
@@ -3776,8 +3776,11 @@
          /* Unselect all the rows and select only the given row */
          etk_tree_unselect_all(tree);
          row->selected = ETK_TRUE;
-         row->tree->last_selected_row = row;
-         etk_signal_emit(_etk_tree_signals[ETK_TREE_ROW_SELECTED_SIGNAL], 
ETK_OBJECT(row->tree), NULL, row);
+         if (row->tree->last_selected_row != row)
+         {
+            row->tree->last_selected_row = row;
+            etk_signal_emit(_etk_tree_signals[ETK_TREE_ROW_SELECTED_SIGNAL], 
ETK_OBJECT(row->tree), NULL, row);
+         }
       }
    }
 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to