ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=e35c4ba3af4f48c0f3a1f7bd654c649a33be8f04

commit e35c4ba3af4f48c0f3a1f7bd654c649a33be8f04
Author: Al Poole <[email protected]>
Date:   Tue Aug 22 12:35:06 2017 +0100

    windows: make windows work properly and autosave properly.
    
    Reviewers: ajwillia.ms
    
    Reviewed By: ajwillia.ms
    
    Differential Revision: https://phab.enlightenment.org/D5116
---
 src/bin/editor/edi_editor.c           | 4 +++-
 src/bin/mainview/edi_mainview_panel.c | 8 +-------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index ea02435..853a590 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -124,7 +124,7 @@ edi_editor_save(Edi_Editor *editor)
 
    filename = elm_code_file_path_get(code->file);
 
-   edi_mainview_save();
+   elm_code_file_save(code->file);
 
    editor->save_time = ecore_file_mod_time(filename);
 
@@ -138,6 +138,8 @@ edi_editor_save(Edi_Editor *editor)
 
    if (edi_language_provider_has(editor))
      edi_language_provider_get(editor)->refresh(editor);
+
+   ecore_event_add(EDI_EVENT_FILE_SAVED, NULL, NULL, NULL);
 }
 
 static Eina_Bool
diff --git a/src/bin/mainview/edi_mainview_panel.c 
b/src/bin/mainview/edi_mainview_panel.c
index 47446f6..f37e401 100644
--- a/src/bin/mainview/edi_mainview_panel.c
+++ b/src/bin/mainview/edi_mainview_panel.c
@@ -424,18 +424,12 @@ void
 edi_mainview_panel_save(Edi_Mainview_Panel *panel)
 {
    Edi_Editor *editor;
-   Elm_Code *code;
 
    editor = (Edi_Editor *)evas_object_data_get(panel->current->view, "editor");
    if (!editor)
      return;
 
-   code = elm_code_widget_code_get(editor->entry);
-   elm_code_file_save(code->file);
-   editor->save_time = ecore_file_mod_time(elm_code_file_path_get(code->file));
-   editor->modified = EINA_FALSE;
-
-   ecore_event_add(EDI_EVENT_FILE_SAVED, NULL, NULL, NULL);
+   edi_editor_save(editor);
 }
 
 void

-- 


Reply via email to