[gedit/wip/reusable-code] Move enums from gedit-document.h to gedit-document-enums.h



commit 10b624cfb11bd8dff7e0ae723ad5d9dc586f22cc
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Sep 13 17:23:00 2013 +0200

    Move enums from gedit-document.h to gedit-document-enums.h
    
    And gedit-document-enums.h is in the libgedit.

 gedit/Makefile.am      |    1 +
 gedit/gedit-document.h |   45 +--------------------------------------------
 libgedit               |    2 +-
 3 files changed, 3 insertions(+), 45 deletions(-)
---
diff --git a/gedit/Makefile.am b/gedit/Makefile.am
index f70dc24..5567ad7 100644
--- a/gedit/Makefile.am
+++ b/gedit/Makefile.am
@@ -146,6 +146,7 @@ INST_H_FILES =                              \
        gedit-view-activatable.h        \
        gedit-window.h                  \
        gedit-window-activatable.h      \
+       $(top_srcdir)/libgedit/gedit/gedit-document-enums.h             \
        $(top_srcdir)/libgedit/gedit/gedit-encodings.h
 
 if !ENABLE_GVFS_METADATA
diff --git a/gedit/gedit-document.h b/gedit/gedit-document.h
index 91aa2b0..5a843d4 100644
--- a/gedit/gedit-document.h
+++ b/gedit/gedit-document.h
@@ -29,6 +29,7 @@
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksource.h>
 #include <gedit/gedit-encodings.h>
+#include <gedit/gedit-document-enums.h>
 
 G_BEGIN_DECLS
 
@@ -49,19 +50,6 @@ G_BEGIN_DECLS
 #define GEDIT_METADATA_ATTRIBUTE_LANGUAGE "metadata::gedit-language"
 #endif
 
-typedef enum
-{
-       GEDIT_DOCUMENT_NEWLINE_TYPE_LF,
-       GEDIT_DOCUMENT_NEWLINE_TYPE_CR,
-       GEDIT_DOCUMENT_NEWLINE_TYPE_CR_LF
-} GeditDocumentNewlineType;
-
-#ifdef G_OS_WIN32
-#define GEDIT_DOCUMENT_NEWLINE_TYPE_DEFAULT GEDIT_DOCUMENT_NEWLINE_TYPE_CR_LF
-#else
-#define GEDIT_DOCUMENT_NEWLINE_TYPE_DEFAULT GEDIT_DOCUMENT_NEWLINE_TYPE_LF
-#endif
-
 /**
  * GeditSearchFlags:
  * @GEDIT_SEARCH_DONT_SET_FLAGS:
@@ -77,37 +65,6 @@ typedef enum
        GEDIT_SEARCH_CASE_SENSITIVE     = 1 << 2
 } GeditSearchFlags;
 
-/*
- * NOTE: when adding a new compression type, make sure to update:
- *   1) The document loader to support it
- *   2) gedit_document_compression_type_for_display
- */
-
-/**
- * GeditDocumentCompressionType:
- * @GEDIT_DOCUMENT_COMPRESSION_TYPE_NONE: save file in plain text.
- * @GEDIT_DOCUMENT_COMPRESSION_TYPE_GZIP: save file using gzip compression.
- */
-typedef enum
-{
-       GEDIT_DOCUMENT_COMPRESSION_TYPE_NONE,
-       GEDIT_DOCUMENT_COMPRESSION_TYPE_GZIP
-} GeditDocumentCompressionType;
-
-/**
- * GeditDocumentSaveFlags:
- * @GEDIT_DOCUMENT_SAVE_IGNORE_MTIME: save file despite external modifications.
- * @GEDIT_DOCUMENT_SAVE_IGNORE_BACKUP: write the file directly without attempting to backup.
- * @GEDIT_DOCUMENT_SAVE_PRESERVE_BACKUP: preserve previous backup file, needed to support autosaving.
- */
-typedef enum
-{
-       GEDIT_DOCUMENT_SAVE_IGNORE_MTIME        = 1 << 0,
-       GEDIT_DOCUMENT_SAVE_IGNORE_BACKUP       = 1 << 1,
-       GEDIT_DOCUMENT_SAVE_PRESERVE_BACKUP     = 1 << 2,
-       GEDIT_DOCUMENT_SAVE_IGNORE_INVALID_CHARS= 1 << 3
-} GeditDocumentSaveFlags;
-
 typedef struct _GeditDocument           GeditDocument;
 typedef struct _GeditDocumentClass     GeditDocumentClass;
 typedef struct _GeditDocumentPrivate    GeditDocumentPrivate;
diff --git a/libgedit b/libgedit
index 802aebe..89f4c39 160000
--- a/libgedit
+++ b/libgedit
@@ -1 +1 @@
-Subproject commit 802aebe46305c688216efd91598eb4e53c2d6ab4
+Subproject commit 89f4c39daf7059c78514b7b88ed5214cb9bc2af7


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