aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-04 02:15:25 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-04 02:15:25 +0800
commit78c98f4f1bd781a6d83f91a37b3ed0c457d19457 (patch)
treed9b89f29e2c2bde7ded9943cfb3f7307bc48bb98
parentc4b9c39ec588430681b25d52a1cd5f57dab716d4 (diff)
downloadgsoc2013-epiphany-78c98f4f1bd781a6d83f91a37b3ed0c457d19457.tar.gz
gsoc2013-epiphany-78c98f4f1bd781a6d83f91a37b3ed0c457d19457.tar.zst
gsoc2013-epiphany-78c98f4f1bd781a6d83f91a37b3ed0c457d19457.zip
Another enum type.
2005-01-03 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-permission-manager.c: (ephy_permission_get_type): * embed/ephy-permission-manager.h: Another enum type. * lib/ephy-marshal.list: Remove unused marshal. * src/ephy-tab.c: (ephy_tab_class_init): Use enum for security level type.
-rw-r--r--ChangeLog15
-rw-r--r--embed/ephy-permission-manager.c21
-rw-r--r--embed/ephy-permission-manager.h3
-rw-r--r--lib/ephy-marshal.list1
-rw-r--r--src/ephy-tab.c11
5 files changed, 44 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 20cb6a520..1be969e5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
2005-01-03 Christian Persch <chpe@cvs.gnome.org>
+ * embed/ephy-permission-manager.c: (ephy_permission_get_type):
+ * embed/ephy-permission-manager.h:
+
+ Another enum type.
+
+ * lib/ephy-marshal.list:
+
+ Remove unused marshal.
+
+ * src/ephy-tab.c: (ephy_tab_class_init):
+
+ Use enum for security level type.
+
+2005-01-03 Christian Persch <chpe@cvs.gnome.org>
+
* embed/ephy-embed-event.c: (ephy_embed_event_context_get_type),
(ephy_embed_event_type_get_type):
* embed/ephy-embed-event.h:
diff --git a/embed/ephy-permission-manager.c b/embed/ephy-permission-manager.c
index a3e68eb93..f5a390964 100644
--- a/embed/ephy-permission-manager.c
+++ b/embed/ephy-permission-manager.c
@@ -28,6 +28,27 @@
/* EphyPermissionInfo */
GType
+ephy_permission_get_type (void)
+{
+ static GType type = 0;
+
+ if (G_UNLIKELY (type == 0))
+ {
+ static const GEnumValue values[] =
+ {
+ { EPHY_PERMISSION_ALLOWED, "EPHY_PERMISSION_ALLOWED", "allowed" },
+ { EPHY_PERMISSION_DENIED, "EPHY_PERMISSION_DENIED", "denied" },
+ { EPHY_PERMISSION_DEFAULT, "EPHY_PERMISSION_DEFAULT", "default" },
+ { 0, NULL, NULL }
+ };
+
+ type = g_enum_register_static ("EphyPermission", values);
+ }
+
+ return type;
+}
+
+GType
ephy_permission_info_get_type (void)
{
static GType type = 0;
diff --git a/embed/ephy-permission-manager.h b/embed/ephy-permission-manager.h
index 8ada417f2..b3d2ec1d0 100644
--- a/embed/ephy-permission-manager.h
+++ b/embed/ephy-permission-manager.h
@@ -35,6 +35,7 @@ G_BEGIN_DECLS
#define EPHY_PERMISSION_MANAGER_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_PERMISSION_MANAGER, EphyPermissionManagerIface))
#define EPHY_TYPE_PERMISSION_INFO (ephy_permission_info_get_type ())
+#define EPHY_TYPE_PERMISSION (ephy_permission_get_type ())
#define EPT_COOKIE "cookie"
#define EPT_IMAGE "image"
@@ -90,6 +91,8 @@ struct EphyPermissionManagerIface
/* EphyPermissionInfo */
+GType ephy_permission_get_type (void);
+
GType ephy_permission_info_get_type (void);
EphyPermissionInfo *ephy_permission_info_new (const char *host,
diff --git a/lib/ephy-marshal.list b/lib/ephy-marshal.list
index 1933a40b7..8d61a9a54 100644
--- a/lib/ephy-marshal.list
+++ b/lib/ephy-marshal.list
@@ -3,7 +3,6 @@ BOOLEAN:STRING,STRING
BOOLEAN:VOID
OBJECT:FLAGS
OBJECT:STRING,OBJECT,FLAGS
-VOID:ENUM
VOID:POINTER,BOOLEAN
VOID:POINTER,POINTER
VOID:STRING,FLAGS
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 5db93ddd8..4f0588a9d 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -423,13 +423,12 @@ ephy_tab_class_init (EphyTabClass *class)
g_object_class_install_property (object_class,
PROP_SECURITY,
- g_param_spec_int ("security-level",
- "Security Level",
- "The tab's security level",
+ g_param_spec_enum ("security-level",
+ "Security Level",
+ "The tab's security level",
+ EPHY_TYPE_EMBED_SECURITY_LEVEL,
STATE_IS_UNKNOWN,
- STATE_IS_SECURE_HIGH,
- STATE_IS_UNKNOWN,
- G_PARAM_READABLE));
+ G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_HIDDEN_POPUP_COUNT,