Enlightenment CVS committal
Author : davemds
Project : e17
Module : proto/edje_editor
Dir : e17/proto/edje_editor/src/bin
Modified Files:
callbacks.c inout.h interface.c
Log Message:
Add a button to save the edc source file
===================================================================
RCS file: /cvs/e/e17/proto/edje_editor/src/bin/callbacks.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- callbacks.c 26 Nov 2007 03:04:33 -0000 1.31
+++ callbacks.c 26 Nov 2007 03:36:07 -0000 1.32
@@ -4,6 +4,7 @@
#include <Ecore_Evas.h>
#include "callbacks.h"
#include "interface.h"
+#include "inout.h"
#include "main.h"
#include "evas.h"
@@ -47,9 +48,7 @@
ShowFilechooser(FILECHOOSER_SAVE_EDJ);
break;
case TOOLBAR_SAVE_EDC:
- ShowAlert("Not yet implemented");
- //ShowFilechooser(FILECHOOSER_SAVE_EDC);
- //SaveEDC("/home/dave/test/auto.edc");
+ ShowFilechooser(FILECHOOSER_SAVE_EDC);
break;
case TOOLBAR_SAVE_EDJ:
ShowFilechooser(FILECHOOSER_SAVE_EDJ);
@@ -1399,11 +1398,14 @@
etk_filechooser_widget_selected_file_get
(ETK_FILECHOOSER_WIDGET(UI_FileChooser)));
SaveEDJ(cmd);
break;
-/* case FILECHOOSER_SAVE_EDC:
+ case FILECHOOSER_SAVE_EDC:
printf("SAVE EDC\n");
- engrave_edc_output(Cur.ef,
- (char*)etk_entry_text_get(ETK_ENTRY(UI_FilechooserFileNameEntry)));
- break;*/
+ snprintf(cmd,4096,"%s/%s",
+ etk_filechooser_widget_current_folder_get
(ETK_FILECHOOSER_WIDGET(UI_FileChooser)),
+ etk_filechooser_widget_selected_file_get
(ETK_FILECHOOSER_WIDGET(UI_FileChooser)));
+ if (!SaveEDC(cmd))
+ ShowAlert("Error saving file.");
+ break;
case FILECHOOSER_IMAGE:
if (Cur.eps){
//If the new image is not in the edc dir
===================================================================
RCS file: /cvs/e/e17/proto/edje_editor/src/bin/inout.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- inout.h 23 Nov 2007 02:26:00 -0000 1.3
+++ inout.h 26 Nov 2007 03:36:07 -0000 1.4
@@ -2,6 +2,7 @@
void LoadEDJ (char *file);
int SaveEDJ (char *file_name);
+char* SaveEDC (char *file_name);
int Decompile (void *data); //data is the name of the file to open
int pipe_data (void *data, int ev_type, void *ev);
int load_pipe_exit (void *data, int ev_type, void *ev);
===================================================================
RCS file: /cvs/e/e17/proto/edje_editor/src/bin/interface.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- interface.c 26 Nov 2007 03:04:33 -0000 1.39
+++ interface.c 26 Nov 2007 03:36:07 -0000 1.40
@@ -1095,7 +1095,7 @@
ETK_CALLBACK(on_AllButton_click),
(void*)TOOLBAR_SAVE_EDJ);
//SaveEDCButton
- button = etk_tool_button_new_from_stock(ETK_STOCK_DOCUMENT_SAVE);
+ button = etk_tool_button_new_from_stock(ETK_STOCK_DOCUMENT_SAVE_AS);
etk_object_properties_set(ETK_OBJECT(button),"label","Export edc",NULL);
etk_toolbar_append(ETK_TOOLBAR(UI_Toolbar), button, ETK_BOX_START);
etk_signal_connect("clicked", ETK_OBJECT(button),
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs