Re: [E-devel] Etk filechooser widget patch

2006-12-19 Thread Hisham Mardam Bey
On 12/19/06, DaveMDS <[EMAIL PROTECTED]> wrote:
> Hi all,
> from the #etk discussion this is  a patch for
> e17/proto/etk/src/lib/etk_filechooser_widget.c
>
> This patch resolve the bug  that cause
> etk_filechooser_widget_selected_file_get()
> to return trash in the case no file is selected. With  the  patch
> applied  the function
> will return NULL if no file is selected.
>

Thanks! In cvs. (=


-- 
Hisham Mardam Bey
MSc (Computer Science)
http://hisham.cc/
+9613609386
Codito Ergo Sum (I Code Therefore I Am)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Etk filechooser widget patch

2006-12-19 Thread Sebastian Dransfeld
DaveMDS wrote:
> ps: this is my first patch for the e17 cvs, I have done it with the 
> command:
> diff -u old_file new_file
> Is this the right method?
> I see that other patch in the list have different syntax, so don't know 
> if this is good enought.

Good enough, but use "cvs diff"

Sebastian

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Etk filechooser widget patch

2006-12-19 Thread DaveMDS

Hi all,
from the #etk discussion this is  a patch for 
e17/proto/etk/src/lib/etk_filechooser_widget.c


This patch resolve the bug  that cause  
etk_filechooser_widget_selected_file_get()
to return trash in the case no file is selected. With  the  patch  
applied  the function

will return NULL if no file is selected.

ps: this is my first patch for the e17 cvs, I have done it with the command:
diff -u old_file new_file
Is this the right method?
I see that other patch in the list have different syntax, so don't know 
if this is good enought.


Thanks Dave
--- src/lib/etk_filechooser_widget_orig.c	2006-10-20 19:51:44.0 +0200
+++ src/lib/etk_filechooser_widget.c	2006-12-19 16:01:10.0 +0100
@@ -238,14 +238,14 @@
  */
 const char *etk_filechooser_widget_selected_file_get(Etk_Filechooser_Widget *filechooser_widget)
 {
-   const char *filename;
+   const char *filename = NULL;
Etk_Tree_Row *row;
 
if (!filechooser_widget && !(filechooser_widget->files_tree))
   return NULL;
 
-   row = etk_tree_selected_row_get(ETK_TREE(filechooser_widget->files_tree));
-   etk_tree_row_fields_get(row, filechooser_widget->files_name_col, NULL, NULL, &filename, NULL);
+   if (row = etk_tree_selected_row_get(ETK_TREE(filechooser_widget->files_tree)))
+	etk_tree_row_fields_get(row, filechooser_widget->files_name_col, NULL, NULL, &filename, NULL);
 
return filename;
 }
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel