aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog17
-rw-r--r--embed/ephy-permission-manager.c36
-rw-r--r--embed/ephy-permission-manager.h26
-rw-r--r--src/ephy-tab.c4
-rw-r--r--src/epiphany.defs20
-rw-r--r--src/epiphany.override10
6 files changed, 65 insertions, 48 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f10f11a1..3770b4944 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,22 @@
2006-01-22 Crispin Flowerday <gnome@flowerday.cx>
+ * embed/ephy-permission-manager.c:
+ (ephy_permission_manager_add_permission),
+ (ephy_permission_manager_remove_permission),
+ (ephy_permission_manager_clear_permissions),
+ (ephy_permission_manager_test_permission),
+ (ephy_permission_manager_list_permissions):
+ * embed/ephy-permission-manager.h:
+ * src/ephy-tab.c: (ephy_tab_get_popups_allowed),
+ (ephy_tab_set_popups_allowed):
+ * src/epiphany.defs:
+ * src/epiphany.override:
+
+ Change the EphyPermissionManager API so that it is
+ more obvious what it does when used from python.
+
+2006-01-22 Crispin Flowerday <gnome@flowerday.cx>
+
* embed/ephy-favicon-cache.c (remove_obsolete_icons)
(icon_is_obsolete)
* embed/ephy-history.c (page_is_obsolete, remove_obsolete_pages):
diff --git a/embed/ephy-permission-manager.c b/embed/ephy-permission-manager.c
index b83cd3ff4..6dd8bfdc4 100644
--- a/embed/ephy-permission-manager.c
+++ b/embed/ephy-permission-manager.c
@@ -206,7 +206,7 @@ ephy_permission_manager_base_init (gpointer g_class)
}
/**
- * ephy_permission_manager_add:
+ * ephy_permission_manager_add_permission:
* @manager: the #EphyPermissionManager
* @host: a website URL
* @type: a string to identify the type of the permission
@@ -215,17 +215,17 @@ ephy_permission_manager_base_init (gpointer g_class)
* Adds the specified permission to the permissions database.
**/
void
-ephy_permission_manager_add (EphyPermissionManager *manager,
- const char *host,
- const char *type,
- EphyPermission permission)
+ephy_permission_manager_add_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type,
+ EphyPermission permission)
{
EphyPermissionManagerIface *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
iface->add (manager, host, type, permission);
}
/**
- * ephy_permission_manager_remove:
+ * ephy_permission_manager_remove_permission:
* @manager: the #EphyPermissionManager
* @host: a website URL
* @type: a string to identify the type of the permission
@@ -235,29 +235,29 @@ ephy_permission_manager_add (EphyPermissionManager *manager,
* @host's web pages.
**/
void
-ephy_permission_manager_remove (EphyPermissionManager *manager,
- const char *host,
- const char *type)
+ephy_permission_manager_remove_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type)
{
EphyPermissionManagerIface *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
iface->remove (manager, host, type);
}
/**
- * ephy_permission_manager_clear:
+ * ephy_permission_manager_clear_permission:
* @manager: the #EphyPermissionManager
*
* Clears the permissions database. This cannot be undone.
**/
void
-ephy_permission_manager_clear (EphyPermissionManager *manager)
+ephy_permission_manager_clear_permissions (EphyPermissionManager *manager)
{
EphyPermissionManagerIface *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
iface->clear (manager);
}
/**
- * ephy_permission_manager_test:
+ * ephy_permission_manager_test_permission:
* @manager: the #EphyPermissionManager
* @host: a website URL
* @type: a string to identify the type of the permission
@@ -270,16 +270,16 @@ ephy_permission_manager_clear (EphyPermissionManager *manager)
* Return value: the permission of type #EphyPermission
**/
EphyPermission
-ephy_permission_manager_test (EphyPermissionManager *manager,
- const char *host,
- const char *type)
+ephy_permission_manager_test_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type)
{
EphyPermissionManagerIface *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
return iface->test (manager, host, type);
}
/**
- * ephy_permission_manager_list:
+ * ephy_permission_manager_list_permission:
* @manager: the #EphyPermissionManager
* @type: a string to identify the type of the permission
*
@@ -290,8 +290,8 @@ ephy_permission_manager_test (EphyPermissionManager *manager,
* Return value: the list of permission database entries
**/
GList *
-ephy_permission_manager_list (EphyPermissionManager *manager,
- const char *type)
+ephy_permission_manager_list_permissions (EphyPermissionManager *manager,
+ const char *type)
{
EphyPermissionManagerIface *iface = EPHY_PERMISSION_MANAGER_GET_IFACE (manager);
return iface->list (manager, type);
diff --git a/embed/ephy-permission-manager.h b/embed/ephy-permission-manager.h
index b5c3a0354..bba4c37bd 100644
--- a/embed/ephy-permission-manager.h
+++ b/embed/ephy-permission-manager.h
@@ -106,23 +106,23 @@ void ephy_permission_info_free (EphyPermissionInfo *info);
GType ephy_permission_manager_get_type (void);
-void ephy_permission_manager_add (EphyPermissionManager *manager,
- const char *host,
- const char *type,
- EphyPermission permission);
+void ephy_permission_manager_add_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type,
+ EphyPermission permission);
-void ephy_permission_manager_remove (EphyPermissionManager *manager,
- const char *host,
- const char *type);
+void ephy_permission_manager_remove_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type);
-void ephy_permission_manager_clear (EphyPermissionManager *manager);
+void ephy_permission_manager_clear_permissions (EphyPermissionManager *manager);
-EphyPermission ephy_permission_manager_test (EphyPermissionManager *manager,
- const char *host,
- const char *type);
+EphyPermission ephy_permission_manager_test_permission (EphyPermissionManager *manager,
+ const char *host,
+ const char *type);
-GList * ephy_permission_manager_list (EphyPermissionManager *manager,
- const char *type);
+GList * ephy_permission_manager_list_permissions (EphyPermissionManager *manager,
+ const char *type);
G_END_DECLS
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 838e192bf..3d91ded53 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -619,7 +619,7 @@ ephy_tab_get_popups_allowed (EphyTab *tab)
location = ephy_embed_get_location (embed, TRUE);
if (location == NULL) return FALSE; /* FALSE, TRUE... same thing */
- response = ephy_permission_manager_test
+ response = ephy_permission_manager_test_permission
(permission_manager, location, EPT_POPUP);
switch (response)
@@ -757,7 +757,7 @@ ephy_tab_set_popups_allowed (EphyTab *tab,
permission = allowed ? EPHY_PERMISSION_ALLOWED
: EPHY_PERMISSION_DENIED;
- ephy_permission_manager_add (manager, location, EPT_POPUP, permission);
+ ephy_permission_manager_add_permission (manager, location, EPT_POPUP, permission);
if (allowed)
{
diff --git a/src/epiphany.defs b/src/epiphany.defs
index 5416afb1c..76c0e0322 100644
--- a/src/epiphany.defs
+++ b/src/epiphany.defs
@@ -1477,9 +1477,9 @@
(return-type "GType")
)
-(define-method add
+(define-method add_permission
(of-object "EphyPermissionManager")
- (c-name "ephy_permission_manager_add")
+ (c-name "ephy_permission_manager_add_permission")
(return-type "none")
(parameters
'("const-char*" "host")
@@ -1488,9 +1488,9 @@
)
)
-(define-method remove
+(define-method remove_permission
(of-object "EphyPermissionManager")
- (c-name "ephy_permission_manager_remove")
+ (c-name "ephy_permission_manager_remove_permission")
(return-type "none")
(parameters
'("const-char*" "host")
@@ -1498,15 +1498,15 @@
)
)
-(define-method clear
+(define-method clear_permissions
(of-object "EphyPermissionManager")
- (c-name "ephy_permission_manager_clear")
+ (c-name "ephy_permission_manager_clear_permissions")
(return-type "none")
)
-(define-method test
+(define-method test_permission
(of-object "EphyPermissionManager")
- (c-name "ephy_permission_manager_test")
+ (c-name "ephy_permission_manager_test_permission")
(return-type "EphyPermission")
(parameters
'("const-char*" "host")
@@ -1514,9 +1514,9 @@
)
)
-(define-method list
+(define-method list_permissions
(of-object "EphyPermissionManager")
- (c-name "ephy_permission_manager_list")
+ (c-name "ephy_permission_manager_list_permissions")
(return-type "GList*")
(parameters
'("const-char*" "type")
diff --git a/src/epiphany.override b/src/epiphany.override
index 04ef7303e..9bc352bea 100644
--- a/src/epiphany.override
+++ b/src/epiphany.override
@@ -403,20 +403,20 @@ _wrap_ephy_cookie_manager_list_cookies(PyGObject *self)
return _helper_wrap_boxed_glist (EPHY_TYPE_COOKIE, list);
}
%%
-override ephy_permission_manager_list kwargs
+override ephy_permission_manager_list_permissions kwargs
static PyObject *
-_wrap_ephy_permission_manager_list (PyGObject *self,
- PyObject *args, PyObject *kwargs)
+_wrap_ephy_permission_manager_list_permissions (PyGObject *self,
+ PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {"type", NULL};
char *type;
GList *list;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
- "s:EphyPermissionManager.list", kwlist, &type))
+ "s:EphyPermissionManager.list_permissions", kwlist, &type))
return NULL;
- list = ephy_permission_manager_list(EPHY_PERMISSION_MANAGER (self->obj), type);
+ list = ephy_permission_manager_list_permissions(EPHY_PERMISSION_MANAGER (self->obj), type);
return _helper_wrap_boxed_glist (EPHY_TYPE_PERMISSION_INFO, list);
}