[gedit-list] Exporting gedit_tab_save(_as)



Hi,

i was trying to extend the External-Tools plugin to save all files when
running a command. First the attached patch is needed to have access to
the gedit_document_save(_as) methods. It adds the GeditDocumentSaveFlags
to gedit.defs.

But these can't be used directly, the gedit_tab.c:document_saving and
gedit.c:document_saved functions are asserting that the tab state is set
to GEDIT_TAB_STATE_SAVING, so is it possible to directly export
_gedit_tab_save(_as)? 

Or are there other ways to save all unsaved documents, in a plugin?

sincerly,
	Johannes H�
Index: bindings/python/gedit.defs
===================================================================
RCS file: /cvs/gnome/gedit/bindings/python/gedit.defs,v
retrieving revision 1.8
diff -u -r1.8 gedit.defs
--- bindings/python/gedit.defs	15 May 2006 18:33:44 -0000	1.8
+++ bindings/python/gedit.defs	11 Jun 2006 19:09:15 -0000
@@ -82,6 +82,16 @@
   )
 )
 
+(define-flags DocumentSaveFlags
+  (in-module "Gedit")
+  (c-name "GeditDocumentSaveFlags")
+  (values
+    '("save-ignore-mtime" "GEDIT_DOCUMENT_SAVE_IGNORE_MTIME")
+    '("save-ignore-backup" "GEDIT_DOCUMENT_SAVE_IGNORE_BACKUP")
+    '("save-preserve-backup" "GEDIT_DOCUMENT_SAVE_PRESERVE_BACKUP")
+  )
+)
+
 (define-flags WindowState
   (in-module "Gedit")
   (c-name "GeditWindowState")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]