Enlightenment CVS committal
Author : atmosphere
Project : e17
Module : proto
Dir : e17/proto/esmart/src/file_dialog
Modified Files:
Esmart_File_Dialog.h esmart_file_dialog.c
Log Message:
add files to selection on load request, and indent
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/esmart/src/file_dialog/Esmart_File_Dialog.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Esmart_File_Dialog.h 27 Apr 2004 19:34:28 -0000 1.4
+++ Esmart_File_Dialog.h 2 May 2004 21:20:18 -0000 1.5
@@ -5,10 +5,11 @@
#include <Edje.h>
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-typedef struct _Esmart_File_Dialog Esmart_File_Dialog;
+ typedef struct _Esmart_File_Dialog Esmart_File_Dialog;
#define FILE_NEW 1
#define FILE_RENAME 2
@@ -17,45 +18,45 @@
#define FILE_CANCEL 5
#define DIR_CHANGED 6
-struct _Esmart_File_Dialog
-{
- Evas_Object *clip; /* clipped area for the file dialog */
- Evas_Object *edje; /* the edje file we load groups from */
- Evas_Object *directories; /* directory containers */
- char *directories_dragbar; /* dragable part name for the
+ struct _Esmart_File_Dialog
+ {
+ Evas_Object *clip; /* clipped area for the file dialog */
+ Evas_Object *edje; /* the edje file we load groups from */
+ Evas_Object *directories; /* directory containers */
+ char *directories_dragbar; /* dragable part name for the
* directories */
- Evas_Object *files; /* file container */
- char *files_dragbar; /* the dragable for the file container */
+ Evas_Object *files; /* file container */
+ char *files_dragbar; /* the dragable for the file container */
- Evas_Object *entry; /* Esmart_Text_Entry */
- char *path; /* the cwd for the dialog */
+ Evas_Object *entry; /* Esmart_Text_Entry */
+ char *path; /* the cwd for the dialog */
- /* the client callback for intercepting file dialog specific stuff */
- void (*func) (void *data, Evas_Object * edje, int type);
- /* the data that's passed to the file dialog callback */
- void *fdata;
-
- /* the current geometry/location of the file dialog */
- Evas_Coord x, y, w, h;
-
- /* the files the user wants to load/open/save(?)/ */
- Evas_List *selections;
-};
+ /* the client callback for intercepting file dialog specific stuff */
+ void (*func) (void *data, Evas_Object * edje, int type);
+ /* the data that's passed to the file dialog callback */
+ void *fdata;
+
+ /* the current geometry/location of the file dialog */
+ Evas_Coord x, y, w, h;
+
+ /* the files the user wants to load/open/save(?)/ */
+ Evas_List *selections;
+ };
/**
* esmart_file_dialog_new
* @param evas the evas to add the object to
* @param edje the file to load the edje parts from
*/
-Evas_Object *esmart_file_dialog_new (Evas * evas, const char *edje_file);
+ Evas_Object *esmart_file_dialog_new (Evas * evas, const char *edje_file);
-void esmart_file_dialog_callback_add (Evas_Object * efd,
- void (*func) (void *data,
- Evas_Object * edje,
- int type), void *data);
-Evas_Object *esmart_file_dialog_edje_get (Evas_Object * efd);
-Evas_List *esmart_file_dialog_selections_get (Evas_Object * efd);
-const char *esmart_file_dialog_current_directory_get (Evas_Object * efd);
+ void esmart_file_dialog_callback_add (Evas_Object * efd,
+ void (*func) (void *data,
+ Evas_Object * edje,
+ int type), void *data);
+ Evas_Object *esmart_file_dialog_edje_get (Evas_Object * efd);
+ Evas_List *esmart_file_dialog_selections_get (Evas_Object * efd);
+ const char *esmart_file_dialog_current_directory_get (Evas_Object * efd);
#ifdef __cplusplus
}
===================================================================
RCS file:
/cvsroot/enlightenment/e17/proto/esmart/src/file_dialog/esmart_file_dialog.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- esmart_file_dialog.c 27 Apr 2004 19:34:28 -0000 1.7
+++ esmart_file_dialog.c 2 May 2004 21:20:19 -0000 1.8
@@ -117,7 +117,7 @@
container = esmart_container_new (e);
esmart_container_direction_set (container, 1);
esmart_container_fill_policy_set (container,
- CONTAINER_FILL_POLICY_FILL_X);
+ CONTAINER_FILL_POLICY_FILL_X);
if ((str = edje_object_data_get (data->edje,
"e,fd,container,files,direction")))
{
@@ -125,7 +125,7 @@
{
esmart_container_direction_set (container, 0);
esmart_container_fill_policy_set (container,
-
CONTAINER_FILL_POLICY_FILL_Y);
+
CONTAINER_FILL_POLICY_FILL_Y);
}
}
if ((str = edje_object_data_get (data->edje,
@@ -147,7 +147,7 @@
container = esmart_container_new (e);
esmart_container_direction_set (container, 1);
esmart_container_fill_policy_set (container,
- CONTAINER_FILL_POLICY_FILL_X);
+ CONTAINER_FILL_POLICY_FILL_X);
if ((str = edje_object_data_get (data->edje,
"e,fd,container,directory,direction")))
{
@@ -155,7 +155,7 @@
{
esmart_container_direction_set (container, 0);
esmart_container_fill_policy_set (container,
-
CONTAINER_FILL_POLICY_FILL_Y);
+
CONTAINER_FILL_POLICY_FILL_Y);
}
}
if ((str = edje_object_data_get (data->edje,
@@ -494,14 +494,16 @@
if (__esmart_file_dialog_directory_set_test (obj, buf))
return;
- fddata->selections =
- evas_list_free (fddata->selections);
if ((part = edje_object_data_get (fddata->edje,
"e,fd,entry")))
{
edje_object_part_text_set (fddata->edje, part, txt);
}
+ fddata->selections =
+ evas_list_append (fddata->selections, txt);
fddata->func (fddata->fdata, obj, FILE_OK);
+ fddata->selections =
+ evas_list_free (fddata->selections);
}
}
else if ((!strcmp (emission, "e,fd,directory,selected")))
@@ -555,9 +557,14 @@
else if (!strcmp ("e,fd,file,load", emission))
{
fprintf (stderr, "Load Request: %s\n", txt);
+ fddata->selections = evas_list_append (fddata->selections, txt);
+ fddata->func (fddata->fdata, obj, FILE_OK);
+ fddata->selections = evas_list_free (fddata->selections);
}
}
+#if 0
fprintf (stderr, "%s\n", emission);
+#endif
}
}
static void
@@ -778,7 +785,8 @@
}
void
-_esmart_file_dialog_object_resize (Evas_Object * o, Evas_Coord w, Evas_Coord h)
+_esmart_file_dialog_object_resize (Evas_Object * o, Evas_Coord w,
+ Evas_Coord h)
{
Esmart_File_Dialog *data;
@@ -959,8 +967,9 @@
di->
d_name)))
{
- esmart_container_element_append (data->directories,
- obj);
+ esmart_container_element_append (data->
+ directories,
+ obj);
}
}
}
@@ -972,7 +981,8 @@
di->
d_name)))
{
- esmart_container_element_append (data->files, obj);
+ esmart_container_element_append (data->files,
+ obj);
}
}
}
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs