aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-04 03:29:08 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-04 03:29:08 +0800
commitc7eaafa8fa678b1908b629495fb263dca7b76751 (patch)
tree2415f06695b3ccfdce2b5a3b3b181ea0ecf6efe9 /embed
parent82a6f3e75f4e46be84fc3d650918badc8e1563a1 (diff)
downloadgsoc2013-epiphany-c7eaafa8fa678b1908b629495fb263dca7b76751.tar.gz
gsoc2013-epiphany-c7eaafa8fa678b1908b629495fb263dca7b76751.tar.zst
gsoc2013-epiphany-c7eaafa8fa678b1908b629495fb263dca7b76751.zip
Add type for flags.
2005-01-03 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-embed-persist.c: (ephy_embed_persist_flags_get_type): * embed/ephy-embed-persist.h: Add type for flags.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-embed-persist.c23
-rw-r--r--embed/ephy-embed-persist.h6
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);