diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed-persist.c | 23 | ||||
-rw-r--r-- | embed/ephy-embed-persist.h | 6 |
2 files changed, 28 insertions, 1 deletions
diff --git a/embed/ephy-embed-persist.c b/embed/ephy-embed-persist.c index baa6a781c..36be83084 100644 --- a/embed/ephy-embed-persist.c +++ b/embed/ephy-embed-persist.c @@ -630,3 +630,26 @@ ephy_embed_persist_to_string (EphyEmbedPersist *persist) EphyEmbedPersistClass *klass = EPHY_EMBED_PERSIST_GET_CLASS (persist); return klass->to_string (persist); } + +GType +ephy_embed_persist_flags_get_type (void) +{ + static GType type = 0; + + if (G_UNLIKELY (type == 0)) + { + static const GFlagsValue values[] = + { + { EMBED_PERSIST_COPY_PAGE, "EMBED_PERSIST_COPY_PAGE", "copy-page" }, + { EMBED_PERSIST_MAINDOC, "EMBED_PERSIST_MAINDOC", "main-document" }, + { EMBED_PERSIST_NO_VIEW, "EMBED_PERSIST_NO_VIEW", "no-view" }, + { EMBED_PERSIST_ASK_DESTINATION, "EMBED_PERSIST_ASK_DESTINATION", "ask-destination" }, + { EMBED_PERSIST_DO_CONVERSION, "EMBED_PERSIST_DO_CONVERSION", "do-conversion" }, + { 0, NULL, NULL } + }; + + type = g_flags_register_static ("EphyEmbedPersistFlags", values); + } + + return type; +} diff --git a/embed/ephy-embed-persist.h b/embed/ephy-embed-persist.h index cb312a6d2..fc65088a1 100644 --- a/embed/ephy-embed-persist.h +++ b/embed/ephy-embed-persist.h @@ -38,6 +38,8 @@ G_BEGIN_DECLS #define EPHY_IS_EMBED_PERSIST_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_EMBED_PERSIST)) #define EPHY_EMBED_PERSIST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_EMBED_PERSIST, EphyEmbedPersistClass)) +#define EPHY_TYPE_EMBED_PERSIST_FLAGS (ephy_embed_persist_flags_get_type ()) + typedef struct _EphyEmbedPersistClass EphyEmbedPersistClass; typedef struct _EphyEmbedPersist EphyEmbedPersist; typedef struct EphyEmbedPersistPrivate EphyEmbedPersistPrivate; @@ -74,7 +76,9 @@ struct _EphyEmbedPersistClass char * (* to_string) (EphyEmbedPersist *persist); }; -GType ephy_embed_persist_get_type (void); +GType ephy_embed_persist_flags_get_type (void); + +GType ephy_embed_persist_get_type (void); gboolean ephy_embed_persist_save (EphyEmbedPersist *persist); |