[epiphany] sync: Use GList instead of GSList when handling records
- From: Gabriel Ivașcu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] sync: Use GList instead of GSList when handling records
- Date: Tue, 15 Aug 2017 14:02:52 +0000 (UTC)
commit 72355af67c6d5dc52c7b0db59a334f55e1b1a1cb
Author: Gabriel Ivascu <gabrielivascu gnome org>
Date: Tue Aug 15 16:56:47 2017 +0300
sync: Use GList instead of GSList when handling records
GList has better performance at deleting list links.
embed/ephy-embed-shell.c | 8 +-
embed/web-extension/ephy-web-extension.c | 16 ++--
lib/sync/ephy-history-manager.c | 76 ++++++++++----------
lib/sync/ephy-open-tabs-manager.c | 28 ++++----
lib/sync/ephy-open-tabs-manager.h | 2 +-
lib/sync/ephy-open-tabs-record.c | 14 ++--
lib/sync/ephy-open-tabs-record.h | 2 +-
lib/sync/ephy-password-manager.c | 119 +++++++++++++++---------------
lib/sync/ephy-password-manager.h | 4 +-
lib/sync/ephy-sync-service.c | 22 +++---
lib/sync/ephy-synchronizable-manager.c | 8 +-
lib/sync/ephy-synchronizable-manager.h | 10 +-
lib/sync/ephy-tabs-catalog.c | 4 +-
lib/sync/ephy-tabs-catalog.h | 4 +-
src/bookmarks/ephy-bookmarks-manager.c | 30 ++++----
src/passwords-dialog.c | 12 ++--
src/synced-tabs-dialog.c | 8 +-
17 files changed, 184 insertions(+), 183 deletions(-)
---
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 798ffd9..72a94cc 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -103,14 +103,14 @@ G_DEFINE_TYPE_WITH_CODE (EphyEmbedShell, ephy_embed_shell, GTK_TYPE_APPLICATION,
G_IMPLEMENT_INTERFACE (EPHY_TYPE_TABS_CATALOG,
ephy_embed_shell_tabs_catalog_iface_init))
-static GSList *
+static GList *
tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog)
{
EphyEmbedShell *embed_shell = EPHY_EMBED_SHELL (catalog);
WebKitFaviconDatabase *database;
GList *windows;
GList *tabs;
- GSList *tabs_info = NULL;
+ GList *tabs_info = NULL;
const char *title;
const char *url;
char *favicon;
@@ -130,8 +130,8 @@ tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog)
url = ephy_web_view_get_display_address (ephy_embed_get_web_view (t->data));
favicon = webkit_favicon_database_get_favicon_uri (database, url);
- tabs_info = g_slist_prepend (tabs_info,
- ephy_tab_info_new (title, url, favicon));
+ tabs_info = g_list_prepend (tabs_info,
+ ephy_tab_info_new (title, url, favicon));
g_free (favicon);
}
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index e8e1bae..df984b5 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -367,7 +367,7 @@ out:
}
static void
-should_store_cb (GSList *records,
+should_store_cb (GList *records,
gpointer user_data)
{
EphyEmbedFormAuth *form_auth = EPHY_EMBED_FORM_AUTH (user_data);
@@ -445,7 +445,7 @@ out:
g_free (origin);
g_free (uri_string);
g_object_unref (form_auth);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
}
static gboolean
@@ -499,7 +499,7 @@ form_submitted_cb (WebKitDOMHTMLFormElement *dom_form,
}
static void
-fill_form_cb (GSList *records,
+fill_form_cb (GList *records,
gpointer user_data)
{
EphyEmbedFormAuth *form_auth = EPHY_EMBED_FORM_AUTH (user_data);
@@ -528,7 +528,7 @@ fill_form_cb (GSList *records,
webkit_dom_html_input_element_set_auto_filled (password_node, TRUE);
webkit_dom_html_input_element_set_editing_value (password_node, password);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
}
static void
@@ -739,7 +739,7 @@ show_user_choices (WebKitDOMDocument *document,
WebKitDOMNode *body;
WebKitDOMElement *main_div;
WebKitDOMElement *ul;
- GSList *cached_users;
+ GList *cached_users;
gboolean username_node_ever_edited;
double x, y;
double input_width;
@@ -785,13 +785,13 @@ show_user_choices (WebKitDOMDocument *document,
"padding: 0;",
NULL);
- cached_users = (GSList *)g_object_get_data (G_OBJECT (username_node), "ephy-cached-users");
+ cached_users = (GList *)g_object_get_data (G_OBJECT (username_node), "ephy-cached-users");
username_node_ever_edited =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (username_node),
"ephy-user-ever-edited"));
- for (GSList *l = cached_users; l && l->data; l = l->next) {
+ for (GList *l = cached_users; l && l->data; l = l->next) {
const char *user = l->data;
WebKitDOMElement *li;
WebKitDOMElement *anchor;
@@ -1111,7 +1111,7 @@ web_page_form_controls_associated (WebKitWebPage *web_page,
/* We have a field that may be the user, and one for a password. */
if (ephy_web_dom_utils_find_form_auth_elements (form, &username_node, &password_node)) {
EphyEmbedFormAuth *form_auth;
- GSList *cached_users;
+ GList *cached_users;
const char *uri;
LOG ("Hooking and pre-filling a form");
diff --git a/lib/sync/ephy-history-manager.c b/lib/sync/ephy-history-manager.c
index f436c2f..818f791 100644
--- a/lib/sync/ephy-history-manager.c
+++ b/lib/sync/ephy-history-manager.c
@@ -48,8 +48,8 @@ static GParamSpec *obj_properties[LAST_PROP];
typedef struct {
EphyHistoryManager *manager;
gboolean is_initial;
- GSList *remotes_deleted;
- GSList *remotes_updated;
+ GList *remotes_deleted;
+ GList *remotes_updated;
EphySynchronizableManagerMergeCallback callback;
gpointer user_data;
} MergeHistoryAsyncData;
@@ -57,8 +57,8 @@ typedef struct {
static MergeHistoryAsyncData *
merge_history_async_data_new (EphyHistoryManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
@@ -287,12 +287,12 @@ synchronizable_manager_save (EphySynchronizableManager *manager,
}
static EphyHistoryRecord *
-get_record_by_id (GSList *records,
+get_record_by_id (GList *records,
const char *id)
{
g_assert (id);
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_history_record_get_id (l->data), id))
return l->data;
}
@@ -301,12 +301,12 @@ get_record_by_id (GSList *records,
}
static EphyHistoryRecord *
-get_record_by_url (GSList *records,
+get_record_by_url (GList *records,
const char *url)
{
g_assert (url);
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_history_record_get_uri (l->data), url))
return l->data;
}
@@ -314,14 +314,14 @@ get_record_by_url (GSList *records,
return NULL;
}
-static GSList *
-delete_record_by_id (GSList *records,
+static GList *
+delete_record_by_id (GList *records,
const char *id)
{
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_history_record_get_id (l->data), id)) {
g_object_unref (l->data);
- return g_slist_delete_link (records, l);
+ return g_list_delete_link (records, l);
}
}
@@ -354,14 +354,14 @@ ephy_history_manager_handle_different_id_same_url (EphyHistoryManager *self,
ephy_history_record_add_visit_time (remote, local_last_visit_time);
}
-static GSList *
+static GList *
ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
- GSList *local_records,
- GSList *remote_records)
+ GList *local_records,
+ GList *remote_records)
{
EphyHistoryRecord *record;
GHashTable *dont_upload;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
const char *remote_id;
const char *remote_url;
gint64 remote_last_visit_time;
@@ -377,7 +377,7 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
*/
dont_upload = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- for (GSList *l = remote_records; l && l->data; l = l->next) {
+ for (GList *l = remote_records; l && l->data; l = l->next) {
remote_id = ephy_history_record_get_id (l->data);
remote_url = ephy_history_record_get_uri (l->data);
remote_last_visit_time = ephy_history_record_get_last_visit_time (l->data);
@@ -393,7 +393,7 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
EPHY_PAGE_VISIT_LINK, FALSE);
if (ephy_history_record_add_visit_time (l->data, local_last_visit_time))
- to_upload = g_slist_prepend (to_upload, g_object_ref (l->data));
+ to_upload = g_list_prepend (to_upload, g_object_ref (l->data));
g_hash_table_add (dont_upload, g_strdup (remote_id));
} else {
@@ -402,7 +402,7 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
/* Different ID, same URL. Keep local ID. */
g_signal_emit_by_name (self, "synchronizable-deleted", l->data);
ephy_history_manager_handle_different_id_same_url (self, record, l->data);
- to_upload = g_slist_prepend (to_upload, g_object_ref (l->data));
+ to_upload = g_list_prepend (to_upload, g_object_ref (l->data));
g_hash_table_add (dont_upload, g_strdup (ephy_history_record_get_id (record)));
} else {
/* Different ID, different URL. This is a new record. */
@@ -415,10 +415,10 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
}
/* Set the remaining local records to be uploaded to server. */
- for (GSList *l = local_records; l && l->data; l = l->next) {
+ for (GList *l = local_records; l && l->data; l = l->next) {
record = EPHY_HISTORY_RECORD (l->data);
if (!g_hash_table_contains (dont_upload, ephy_history_record_get_id (record))) {
- to_upload = g_slist_prepend (to_upload, g_object_ref (record));
+ to_upload = g_list_prepend (to_upload, g_object_ref (record));
}
}
@@ -427,14 +427,14 @@ ephy_history_manager_handle_initial_merge (EphyHistoryManager *self,
return to_upload;
}
-static GSList *
+static GList *
ephy_history_manager_handle_regular_merge (EphyHistoryManager *self,
- GSList **local_records,
- GSList *deleted_records,
- GSList *updated_records)
+ GList **local_records,
+ GList *deleted_records,
+ GList *updated_records)
{
EphyHistoryRecord *record;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
const char *remote_id;
const char *remote_url;
gint64 remote_last_visit_time;
@@ -442,7 +442,7 @@ ephy_history_manager_handle_regular_merge (EphyHistoryManager *self,
g_assert (EPHY_IS_HISTORY_MANAGER (self));
- for (GSList *l = deleted_records; l && l->data; l = l->next) {
+ for (GList *l = deleted_records; l && l->data; l = l->next) {
remote_id = ephy_history_record_get_id (l->data);
record = get_record_by_id (*local_records, remote_id);
if (record) {
@@ -453,7 +453,7 @@ ephy_history_manager_handle_regular_merge (EphyHistoryManager *self,
}
/* See comment in ephy_history_manager_handle_initial_merge. */
- for (GSList *l = updated_records; l && l->data; l = l->next) {
+ for (GList *l = updated_records; l && l->data; l = l->next) {
remote_id = ephy_history_record_get_id (l->data);
remote_url = ephy_history_record_get_uri (l->data);
remote_last_visit_time = ephy_history_record_get_last_visit_time (l->data);
@@ -482,7 +482,7 @@ ephy_history_manager_handle_regular_merge (EphyHistoryManager *self,
/* Different ID, same URL. Keep local ID. */
g_signal_emit_by_name (self, "synchronizable-deleted", l->data);
ephy_history_manager_handle_different_id_same_url (self, record, l->data);
- to_upload = g_slist_prepend (to_upload, g_object_ref (l->data));
+ to_upload = g_list_prepend (to_upload, g_object_ref (l->data));
} else {
/* Different ID, different URL. This is a new record. */
if (remote_last_visit_time > 0)
@@ -502,8 +502,8 @@ merge_history_cb (EphyHistoryService *service,
GList *urls,
MergeHistoryAsyncData *data)
{
- GSList *records = NULL;
- GSList *to_upload = NULL;
+ GList *records = NULL;
+ GList *to_upload = NULL;
if (!success) {
g_warning ("Failed to retrieve URLs in history");
@@ -517,10 +517,10 @@ merge_history_cb (EphyHistoryService *service,
if (!url->sync_id)
continue;
- records = g_slist_prepend (records, ephy_history_record_new (url->sync_id,
- url->title,
- url->url,
- url->last_visit_time));
+ records = g_list_prepend (records, ephy_history_record_new (url->sync_id,
+ url->title,
+ url->url,
+ url->last_visit_time));
}
if (data->is_initial)
@@ -537,15 +537,15 @@ out:
data->callback (to_upload, TRUE, data->user_data);
g_list_free_full (urls, (GDestroyNotify)ephy_history_url_free);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
merge_history_async_data_free (data);
}
static void
synchronizable_manager_merge (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
diff --git a/lib/sync/ephy-open-tabs-manager.c b/lib/sync/ephy-open-tabs-manager.c
index 160b5c0..3baf067 100644
--- a/lib/sync/ephy-open-tabs-manager.c
+++ b/lib/sync/ephy-open-tabs-manager.c
@@ -32,7 +32,7 @@ struct _EphyOpenTabsManager {
/* A list of EphyOpenTabsRecord objects describing the open tabs
* of other sync clients. This is updated at every sync. */
- GSList *remote_records;
+ GList *remote_records;
};
static void ephy_synchronizable_manager_iface_init (EphySynchronizableManagerInterface *iface);
@@ -90,7 +90,7 @@ ephy_open_tabs_manager_finalize (GObject *object)
{
EphyOpenTabsManager *self = EPHY_OPEN_TABS_MANAGER (object);
- g_slist_free_full (self->remote_records, g_object_unref);
+ g_list_free_full (self->remote_records, g_object_unref);
G_OBJECT_CLASS (ephy_open_tabs_manager_parent_class)->finalize (object);
}
@@ -143,7 +143,7 @@ ephy_open_tabs_manager_get_local_tabs (EphyOpenTabsManager *self)
{
EphyOpenTabsRecord *local_tabs;
EphyTabInfo *info;
- GSList *tabs_info;
+ GList *tabs_info;
char *id;
char *name;
@@ -154,19 +154,19 @@ ephy_open_tabs_manager_get_local_tabs (EphyOpenTabsManager *self)
local_tabs = ephy_open_tabs_record_new (id, name);
tabs_info = ephy_tabs_catalog_get_tabs_info (self->catalog);
- for (GSList *l = tabs_info; l && l->data; l = l->next) {
+ for (GList *l = tabs_info; l && l->data; l = l->next) {
info = (EphyTabInfo *)l->data;
ephy_open_tabs_record_add_tab (local_tabs, info->title, info->url, info->favicon);
}
g_free (id);
g_free (name);
- g_slist_free_full (tabs_info, (GDestroyNotify)ephy_tab_info_free);
+ g_list_free_full (tabs_info, (GDestroyNotify)ephy_tab_info_free);
return local_tabs;
}
-GSList *
+GList *
ephy_open_tabs_manager_get_remote_tabs (EphyOpenTabsManager *self)
{
g_return_val_if_fail (EPHY_IS_OPEN_TABS_MANAGER (self), NULL);
@@ -179,7 +179,7 @@ ephy_open_tabs_manager_clear_cache (EphyOpenTabsManager *self)
{
g_return_if_fail (EPHY_IS_OPEN_TABS_MANAGER (self));
- g_slist_free_full (self->remote_records, g_object_unref);
+ g_list_free_full (self->remote_records, g_object_unref);
self->remote_records = NULL;
}
@@ -250,33 +250,33 @@ synchronizable_manager_save (EphySynchronizableManager *manager,
static void
synchronizable_manager_merge (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
EphyOpenTabsManager *self = EPHY_OPEN_TABS_MANAGER (manager);
EphyOpenTabsRecord *local_tabs;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
char *id;
id = ephy_sync_utils_get_device_id ();
- g_slist_free_full (self->remote_records, g_object_unref);
+ g_list_free_full (self->remote_records, g_object_unref);
self->remote_records = NULL;
- for (GSList *l = remotes_updated; l && l->data; l = l->next) {
+ for (GList *l = remotes_updated; l && l->data; l = l->next) {
/* Exclude the record which describes the local open tabs. */
if (!g_strcmp0 (id, ephy_open_tabs_record_get_id (l->data)))
continue;
- self->remote_records = g_slist_prepend (self->remote_records, g_object_ref (l->data));
+ self->remote_records = g_list_prepend (self->remote_records, g_object_ref (l->data));
}
/* Only upload the local open tabs, we don't want to alter open tabs of
* other clients. Also, overwrite any previous value by doing a force upload.
*/
local_tabs = ephy_open_tabs_manager_get_local_tabs (self);
- to_upload = g_slist_prepend (to_upload, local_tabs);
+ to_upload = g_list_prepend (to_upload, local_tabs);
g_free (id);
diff --git a/lib/sync/ephy-open-tabs-manager.h b/lib/sync/ephy-open-tabs-manager.h
index 6096307..e84baa0 100644
--- a/lib/sync/ephy-open-tabs-manager.h
+++ b/lib/sync/ephy-open-tabs-manager.h
@@ -33,7 +33,7 @@ G_DECLARE_FINAL_TYPE (EphyOpenTabsManager, ephy_open_tabs_manager, EPHY, OPEN_TA
EphyOpenTabsManager *ephy_open_tabs_manager_new (EphyTabsCatalog *catalog);
EphyOpenTabsRecord *ephy_open_tabs_manager_get_local_tabs (EphyOpenTabsManager *self);
-GSList *ephy_open_tabs_manager_get_remote_tabs (EphyOpenTabsManager *self);
+GList *ephy_open_tabs_manager_get_remote_tabs (EphyOpenTabsManager *self);
void ephy_open_tabs_manager_clear_cache (EphyOpenTabsManager *self);
G_END_DECLS
diff --git a/lib/sync/ephy-open-tabs-record.c b/lib/sync/ephy-open-tabs-record.c
index a373401..5620d9e 100644
--- a/lib/sync/ephy-open-tabs-record.c
+++ b/lib/sync/ephy-open-tabs-record.c
@@ -37,7 +37,7 @@ struct _EphyOpenTabsRecord {
* @lastUsed: an integer representing the UNIX time in seconds at which the
* tab was last accessed, or 0
*/
- GSList *tabs;
+ GList *tabs;
};
static void json_serializable_iface_init (JsonSerializableIface *iface);
@@ -77,7 +77,7 @@ ephy_open_tabs_record_set_property (GObject *object,
self->client_name = g_strdup (g_value_get_string (value));
break;
case PROP_TABS:
- g_slist_free_full (self->tabs, (GDestroyNotify)json_object_unref);
+ g_list_free_full (self->tabs, (GDestroyNotify)json_object_unref);
self->tabs = g_value_get_pointer (value);
break;
default:
@@ -115,7 +115,7 @@ ephy_open_tabs_record_finalize (GObject *object)
g_free (self->id);
g_free (self->client_name);
- g_slist_free_full (self->tabs, (GDestroyNotify)json_object_unref);
+ g_list_free_full (self->tabs, (GDestroyNotify)json_object_unref);
G_OBJECT_CLASS (ephy_open_tabs_record_parent_class)->finalize (object);
}
@@ -181,7 +181,7 @@ ephy_open_tabs_record_get_client_name (EphyOpenTabsRecord *self)
return self->client_name;
}
-GSList *
+GList *
ephy_open_tabs_record_get_tabs (EphyOpenTabsRecord *self)
{
g_return_val_if_fail (EPHY_IS_OPEN_TABS_RECORD (self), NULL);
@@ -211,7 +211,7 @@ ephy_open_tabs_record_add_tab (EphyOpenTabsRecord *self,
json_object_set_string_member (tab, "icon", favicon);
json_object_set_int_member (tab, "lastUsed", g_get_real_time () / 1000000);
- self->tabs = g_slist_prepend (self->tabs, tab);
+ self->tabs = g_list_prepend (self->tabs, tab);
}
static JsonNode *
@@ -244,11 +244,11 @@ serializable_deserialize_property (JsonSerializable *serializable,
{
if (!g_strcmp0 (name, "tabs")) {
JsonArray *array;
- GSList *tabs = NULL;
+ GList *tabs = NULL;
array = json_node_get_array (node);
for (guint i = 0; i < json_array_get_length (array); i++)
- tabs = g_slist_prepend (tabs, json_object_ref (json_array_get_object_element (array, i)));
+ tabs = g_list_prepend (tabs, json_object_ref (json_array_get_object_element (array, i)));
g_value_set_pointer (value, tabs);
diff --git a/lib/sync/ephy-open-tabs-record.h b/lib/sync/ephy-open-tabs-record.h
index 6b448aa..5bff6c1 100644
--- a/lib/sync/ephy-open-tabs-record.h
+++ b/lib/sync/ephy-open-tabs-record.h
@@ -32,7 +32,7 @@ EphyOpenTabsRecord *ephy_open_tabs_record_new (const char *id,
const char *client_name);
const char *ephy_open_tabs_record_get_id (EphyOpenTabsRecord *self);
const char *ephy_open_tabs_record_get_client_name (EphyOpenTabsRecord *self);
-GSList *ephy_open_tabs_record_get_tabs (EphyOpenTabsRecord *self);
+GList *ephy_open_tabs_record_get_tabs (EphyOpenTabsRecord *self);
void ephy_open_tabs_record_add_tab (EphyOpenTabsRecord *self,
const char *title,
const char *url,
diff --git a/lib/sync/ephy-password-manager.c b/lib/sync/ephy-password-manager.c
index 5c25220..370690e 100644
--- a/lib/sync/ephy-password-manager.c
+++ b/lib/sync/ephy-password-manager.c
@@ -78,8 +78,8 @@ typedef struct {
typedef struct {
EphyPasswordManager *manager;
gboolean is_initial;
- GSList *remotes_deleted;
- GSList *remotes_updated;
+ GList *remotes_deleted;
+ GList *remotes_updated;
EphySynchronizableManagerMergeCallback callback;
gpointer user_data;
} MergePasswordsAsyncData;
@@ -131,8 +131,8 @@ update_password_async_data_free (UpdatePasswordAsyncData *data)
static MergePasswordsAsyncData *
merge_passwords_async_data_new (EphyPasswordManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
@@ -230,7 +230,7 @@ ephy_password_manager_cache_clear (EphyPasswordManager *self)
g_hash_table_iter_init (&iter, self->cache);
while (g_hash_table_iter_next (&iter, &key, &value))
- g_slist_free_full (value, g_free);
+ g_list_free_full (value, g_free);
g_hash_table_remove_all (self->cache);
}
@@ -239,8 +239,8 @@ ephy_password_manager_cache_remove (EphyPasswordManager *self,
const char *hostname,
const char *username)
{
- GSList *usernames;
- GSList *new_usernames = NULL;
+ GList *usernames;
+ GList *new_usernames = NULL;
g_assert (EPHY_IS_PASSWORD_MANAGER (self));
g_assert (self->cache);
@@ -250,12 +250,12 @@ ephy_password_manager_cache_remove (EphyPasswordManager *self,
usernames = g_hash_table_lookup (self->cache, hostname);
if (usernames) {
- for (GSList *l = usernames; l && l->data; l = l->next) {
+ for (GList *l = usernames; l && l->data; l = l->next) {
if (g_strcmp0 (username, l->data))
- new_usernames = g_slist_prepend (new_usernames, g_strdup (l->data));
+ new_usernames = g_list_prepend (new_usernames, g_strdup (l->data));
}
g_hash_table_replace (self->cache, g_strdup (hostname), new_usernames);
- g_slist_free_full (usernames, g_free);
+ g_list_free_full (usernames, g_free);
}
}
@@ -264,7 +264,7 @@ ephy_password_manager_cache_add (EphyPasswordManager *self,
const char *hostname,
const char *username)
{
- GSList *usernames;
+ GList *usernames;
g_assert (EPHY_IS_PASSWORD_MANAGER (self));
g_assert (self->cache);
@@ -273,21 +273,21 @@ ephy_password_manager_cache_add (EphyPasswordManager *self,
return;
usernames = g_hash_table_lookup (self->cache, hostname);
- for (GSList *l = usernames; l && l->data; l = l->next) {
+ for (GList *l = usernames; l && l->data; l = l->next) {
if (!g_strcmp0 (username, l->data))
return;
}
- usernames = g_slist_prepend (usernames, g_strdup (username));
+ usernames = g_list_prepend (usernames, g_strdup (username));
g_hash_table_replace (self->cache, g_strdup (hostname), usernames);
}
static void
-populate_cache_cb (GSList *records,
+populate_cache_cb (GList *records,
gpointer user_data)
{
EphyPasswordManager *self = EPHY_PASSWORD_MANAGER (user_data);
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
EphyPasswordRecord *record = EPHY_PASSWORD_RECORD (l->data);
const char *hostname = ephy_password_record_get_hostname (record);
const char *username = ephy_password_record_get_username (record);
@@ -295,7 +295,7 @@ populate_cache_cb (GSList *records,
ephy_password_manager_cache_add (self, hostname, username);
}
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
}
static void
@@ -334,11 +334,11 @@ ephy_password_manager_new (void)
return EPHY_PASSWORD_MANAGER (g_object_new (EPHY_TYPE_PASSWORD_MANAGER, NULL));
}
-GSList *
+GList *
ephy_password_manager_get_cached_users_for_uri (EphyPasswordManager *self,
const char *uri)
{
- GSList *list;
+ GList *list;
char *hostname;
g_return_val_if_fail (EPHY_IS_PASSWORD_MANAGER (self), NULL);
@@ -440,21 +440,21 @@ ephy_password_manger_store_record (EphyPasswordManager *self,
}
static void
-update_password_cb (GSList *records,
+update_password_cb (GList *records,
gpointer user_data)
{
UpdatePasswordAsyncData *data = (UpdatePasswordAsyncData *)user_data;
EphyPasswordRecord *record;
/* We only expect one matching record here. */
- g_assert (g_slist_length (records) == 1);
+ g_assert (g_list_length (records) == 1);
record = EPHY_PASSWORD_RECORD (records->data);
ephy_password_record_set_password (record, data->password);
ephy_password_manger_store_record (data->manager, record);
g_signal_emit_by_name (data->manager, "synchronizable-modified", record, FALSE);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
update_password_async_data_free (data);
}
@@ -512,7 +512,7 @@ secret_service_search_cb (SecretService *service,
QueryAsyncData *data)
{
GList *matches = NULL;
- GSList *records = NULL;
+ GList *records = NULL;
GError *error = NULL;
matches = secret_service_search_finish (service, result, &error);
@@ -547,7 +547,7 @@ secret_service_search_cb (SecretService *service,
sscanf (timestamp, "%lf", &server_time_modified);
ephy_synchronizable_set_server_time_modified (EPHY_SYNCHRONIZABLE (record),
server_time_modified);
- records = g_slist_prepend (records, record);
+ records = g_list_prepend (records, record);
secret_value_unref (value);
g_hash_table_unref (attributes);
@@ -680,20 +680,20 @@ ephy_password_manager_forget_record (EphyPasswordManager *self,
}
static void
-forget_cb (GSList *records,
+forget_cb (GList *records,
gpointer user_data)
{
EphyPasswordManager *self = EPHY_PASSWORD_MANAGER (user_data);
EphyPasswordRecord *record;
/* We only expect one matching record here. */
- g_assert (g_slist_length (records) == 1);
+ g_assert (g_list_length (records) == 1);
record = EPHY_PASSWORD_RECORD (records->data);
g_signal_emit_by_name (self, "synchronizable-deleted", record);
ephy_password_manager_forget_record (self, record, NULL);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
}
void
@@ -714,7 +714,7 @@ ephy_password_manager_forget (EphyPasswordManager *self,
}
static void
-forget_all_cb (GSList *records,
+forget_all_cb (GList *records,
gpointer user_data)
{
EphyPasswordManager *self = EPHY_PASSWORD_MANAGER (user_data);
@@ -724,13 +724,13 @@ forget_all_cb (GSList *records,
secret_service_clear (NULL, EPHY_FORM_PASSWORD_SCHEMA, attributes, NULL,
(GAsyncReadyCallback)secret_service_clear_cb, NULL);
- for (GSList *l = records; l && l->data; l = l->next)
+ for (GList *l = records; l && l->data; l = l->next)
g_signal_emit_by_name (self, "synchronizable-deleted", l->data);
ephy_password_manager_cache_clear (self);
g_hash_table_unref (attributes);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
}
void
@@ -804,12 +804,12 @@ synchronizable_manager_remove (EphySynchronizableManager *manager,
}
static void
-replace_existing_cb (GSList *records,
+replace_existing_cb (GList *records,
gpointer user_data)
{
ReplaceRecordAsyncData *data = (ReplaceRecordAsyncData *)user_data;
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
/* NULL fields can cause the query to match other records too,
* so we need to make sure we have the record we've been looking for. */
if (!g_strcmp0 (ephy_password_record_get_hostname (records->data),
@@ -855,12 +855,12 @@ synchronizable_manager_save (EphySynchronizableManager *manager,
}
static EphyPasswordRecord *
-get_record_by_id (GSList *records,
+get_record_by_id (GList *records,
const char *id)
{
g_assert (id);
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_password_record_get_id (l->data), id))
return l->data;
}
@@ -869,13 +869,13 @@ get_record_by_id (GSList *records,
}
static EphyPasswordRecord *
-get_record_by_parameters (GSList *records,
+get_record_by_parameters (GList *records,
const char *hostname,
const char *username,
const char *username_field,
const char *password_field)
{
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_password_record_get_username (l->data), username) &&
!g_strcmp0 (ephy_password_record_get_hostname (l->data), hostname) &&
!g_strcmp0 (ephy_password_record_get_username_field (l->data), username_field) &&
@@ -886,28 +886,29 @@ get_record_by_parameters (GSList *records,
return NULL;
}
-static GSList *
-delete_record_by_id (GSList *records,
+
+static GList *
+delete_record_by_id (GList *records,
const char *id)
{
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
if (!g_strcmp0 (ephy_password_record_get_id (l->data), id)) {
g_object_unref (l->data);
- return g_slist_delete_link (records, l);
+ return g_list_delete_link (records, l);
}
}
return records;
}
-static GSList *
+static GList *
ephy_password_manager_handle_initial_merge (EphyPasswordManager *self,
- GSList *local_records,
- GSList *remote_records)
+ GList *local_records,
+ GList *remote_records)
{
EphyPasswordRecord *record;
GHashTable *dont_upload;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
const char *remote_id;
const char *remote_hostname;
const char *remote_username;
@@ -930,7 +931,7 @@ ephy_password_manager_handle_initial_merge (EphyPasswordManager *self,
*/
dont_upload = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- for (GSList *l = remote_records; l && l->data; l = l->next) {
+ for (GList *l = remote_records; l && l->data; l = l->next) {
remote_id = ephy_password_record_get_id (l->data);
remote_hostname = ephy_password_record_get_hostname (l->data);
remote_username = ephy_password_record_get_username (l->data);
@@ -989,10 +990,10 @@ ephy_password_manager_handle_initial_merge (EphyPasswordManager *self,
}
/* Set the remaining local records to be uploaded to server. */
- for (GSList *l = local_records; l && l->data; l = l->next) {
+ for (GList *l = local_records; l && l->data; l = l->next) {
record = EPHY_PASSWORD_RECORD (l->data);
if (!g_hash_table_contains (dont_upload, ephy_password_record_get_id (record)))
- to_upload = g_slist_prepend (to_upload, g_object_ref (record));
+ to_upload = g_list_prepend (to_upload, g_object_ref (record));
}
g_hash_table_unref (dont_upload);
@@ -1000,14 +1001,14 @@ ephy_password_manager_handle_initial_merge (EphyPasswordManager *self,
return to_upload;
}
-static GSList *
+static GList *
ephy_password_manager_handle_regular_merge (EphyPasswordManager *self,
- GSList **local_records,
- GSList *deleted_records,
- GSList *updated_records)
+ GList **local_records,
+ GList *deleted_records,
+ GList *updated_records)
{
EphyPasswordRecord *record;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
const char *remote_id;
const char *remote_hostname;
const char *remote_username;
@@ -1018,7 +1019,7 @@ ephy_password_manager_handle_regular_merge (EphyPasswordManager *self,
g_assert (EPHY_IS_PASSWORD_MANAGER (self));
- for (GSList *l = deleted_records; l && l->data; l = l->next) {
+ for (GList *l = deleted_records; l && l->data; l = l->next) {
remote_id = ephy_password_record_get_id (l->data);
record = get_record_by_id (*local_records, remote_id);
if (record) {
@@ -1028,7 +1029,7 @@ ephy_password_manager_handle_regular_merge (EphyPasswordManager *self,
}
/* See comment in ephy_password_manager_handle_initial_merge. */
- for (GSList *l = updated_records; l && l->data; l = l->next) {
+ for (GList *l = updated_records; l && l->data; l = l->next) {
remote_id = ephy_password_record_get_id (l->data);
remote_hostname = ephy_password_record_get_hostname (l->data);
remote_username = ephy_password_record_get_username (l->data);
@@ -1051,7 +1052,7 @@ ephy_password_manager_handle_regular_merge (EphyPasswordManager *self,
local_timestamp = ephy_password_record_get_time_password_changed (record);
if (local_timestamp > remote_timestamp) {
/* Local record is newer. Keep it, upload it and delete remote record from server. */
- to_upload = g_slist_prepend (to_upload, g_object_ref (record));
+ to_upload = g_list_prepend (to_upload, g_object_ref (record));
g_signal_emit_by_name (self, "synchronizable-deleted", l->data);
} else {
/* Remote record is newer. Forget local record and store remote record. */
@@ -1068,11 +1069,11 @@ ephy_password_manager_handle_regular_merge (EphyPasswordManager *self,
}
static void
-merge_cb (GSList *records,
+merge_cb (GList *records,
gpointer user_data)
{
MergePasswordsAsyncData *data = (MergePasswordsAsyncData *)user_data;
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
if (data->is_initial)
to_upload = ephy_password_manager_handle_initial_merge (data->manager,
@@ -1086,15 +1087,15 @@ merge_cb (GSList *records,
data->callback (to_upload, FALSE, data->user_data);
- g_slist_free_full (records, g_object_unref);
+ g_list_free_full (records, g_object_unref);
merge_passwords_async_data_free (data);
}
static void
synchronizable_manager_merge (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
diff --git a/lib/sync/ephy-password-manager.h b/lib/sync/ephy-password-manager.h
index 8ff5c23..9b027df 100644
--- a/lib/sync/ephy-password-manager.h
+++ b/lib/sync/ephy-password-manager.h
@@ -42,10 +42,10 @@ const SecretSchema *ephy_password_manager_get_password_schema (void) G_GNUC_CONS
G_DECLARE_FINAL_TYPE (EphyPasswordManager, ephy_password_manager, EPHY, PASSWORD_MANAGER, GObject)
-typedef void (*EphyPasswordManagerQueryCallback) (GSList *records, gpointer user_data);
+typedef void (*EphyPasswordManagerQueryCallback) (GList *records, gpointer user_data);
EphyPasswordManager *ephy_password_manager_new (void);
-GSList *ephy_password_manager_get_cached_users_for_uri (EphyPasswordManager *self,
+GList *ephy_password_manager_get_cached_users_for_uri (EphyPasswordManager *self,
const char *uri);
void ephy_password_manager_save (EphyPasswordManager *self,
const char *uri,
diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c
index c871ceb..a11e0f9 100644
--- a/lib/sync/ephy-sync-service.c
+++ b/lib/sync/ephy-sync-service.c
@@ -122,8 +122,8 @@ typedef struct {
EphySynchronizableManager *manager;
gboolean is_initial;
gboolean is_last;
- GSList *remotes_deleted;
- GSList *remotes_updated;
+ GList *remotes_deleted;
+ GList *remotes_updated;
} SyncCollectionAsyncData;
typedef struct {
@@ -239,8 +239,8 @@ sync_collection_async_data_free (SyncCollectionAsyncData *data)
g_object_unref (data->service);
g_object_unref (data->manager);
- g_slist_free_full (data->remotes_deleted, g_object_unref);
- g_slist_free_full (data->remotes_updated, g_object_unref);
+ g_list_free_full (data->remotes_deleted, g_object_unref);
+ g_list_free_full (data->remotes_updated, g_object_unref);
g_slice_free (SyncCollectionAsyncData, data);
}
@@ -1246,13 +1246,13 @@ ephy_sync_service_upload_synchronizable (EphySyncService *self,
}
static void
-merge_collection_finished_cb (GSList *to_upload,
+merge_collection_finished_cb (GList *to_upload,
gboolean should_force,
gpointer user_data)
{
SyncCollectionAsyncData *data = (SyncCollectionAsyncData *)user_data;
- for (GSList *l = to_upload; l && l->data; l = l->next)
+ for (GList *l = to_upload; l && l->data; l = l->next)
ephy_sync_service_upload_synchronizable (data->service, data->manager,
l->data, should_force);
@@ -1260,7 +1260,7 @@ merge_collection_finished_cb (GSList *to_upload,
g_signal_emit (data->service, signals[SYNC_FINISHED], 0);
if (to_upload)
- g_slist_free_full (to_upload, g_object_unref);
+ g_list_free_full (to_upload, g_object_unref);
sync_collection_async_data_free (data);
}
@@ -1308,14 +1308,14 @@ sync_collection_cb (SoupSession *session,
continue;
}
if (is_deleted)
- data->remotes_deleted = g_slist_prepend (data->remotes_deleted, remote);
+ data->remotes_deleted = g_list_prepend (data->remotes_deleted, remote);
else
- data->remotes_updated = g_slist_prepend (data->remotes_updated, remote);
+ data->remotes_updated = g_list_prepend (data->remotes_updated, remote);
}
LOG ("Found %u deleted objects and %u new/updated objects in %s collection",
- g_slist_length (data->remotes_deleted),
- g_slist_length (data->remotes_updated),
+ g_list_length (data->remotes_deleted),
+ g_list_length (data->remotes_updated),
collection);
/* Update sync time. */
diff --git a/lib/sync/ephy-synchronizable-manager.c b/lib/sync/ephy-synchronizable-manager.c
index 64a980d..7abd710 100644
--- a/lib/sync/ephy-synchronizable-manager.c
+++ b/lib/sync/ephy-synchronizable-manager.c
@@ -251,9 +251,9 @@ ephy_synchronizable_manager_save (EphySynchronizableManager *manager,
* @manager: an #EphySynchronizableManager
* @is_initial: a boolean saying whether the collection managed by @manager
* requires an initial sync (i.e. a first time sync)
- * @remotes_deleted: (transfer none): a #GSList holding the #EphySynchronizable
+ * @remotes_deleted: (transfer none): a #GList holding the #EphySynchronizable
* objects that were removed remotely from the server.
- * @remotes_updated: (transfer none): a #GSList holding the #EphySynchronizable
+ * @remotes_updated: (transfer none): a #GList holding the #EphySynchronizable
* objects that were updated remotely on the server.
* @callback: an #EphySynchronizableManagerMergeCallback that will be called
* when the merge is complete.
@@ -267,8 +267,8 @@ ephy_synchronizable_manager_save (EphySynchronizableManager *manager,
void
ephy_synchronizable_manager_merge (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
diff --git a/lib/sync/ephy-synchronizable-manager.h b/lib/sync/ephy-synchronizable-manager.h
index 5add743..8e1804b 100644
--- a/lib/sync/ephy-synchronizable-manager.h
+++ b/lib/sync/ephy-synchronizable-manager.h
@@ -30,7 +30,7 @@ G_BEGIN_DECLS
G_DECLARE_INTERFACE (EphySynchronizableManager, ephy_synchronizable_manager, EPHY, SYNCHRONIZABLE_MANAGER,
GObject)
-typedef void (*EphySynchronizableManagerMergeCallback) (GSList *to_upload, gboolean should_force, gpointer
user_data);
+typedef void (*EphySynchronizableManagerMergeCallback) (GList *to_upload, gboolean should_force, gpointer
user_data);
struct _EphySynchronizableManagerInterface {
GTypeInterface parent_iface;
@@ -51,8 +51,8 @@ struct _EphySynchronizableManagerInterface {
EphySynchronizable *synchronizable);
void (*merge) (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data);
};
@@ -73,8 +73,8 @@ void ephy_synchronizable_manager_save (EphySyn
EphySynchronizable
*synchronizable);
void ephy_synchronizable_manager_merge (EphySynchronizableManager
*manager,
gboolean
is_initial,
- GSList
*remotes_deleted,
- GSList
*remotes_updated,
+ GList
*remotes_deleted,
+ GList
*remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer
user_data);
diff --git a/lib/sync/ephy-tabs-catalog.c b/lib/sync/ephy-tabs-catalog.c
index 252f1e9..795a6cd 100644
--- a/lib/sync/ephy-tabs-catalog.c
+++ b/lib/sync/ephy-tabs-catalog.c
@@ -35,9 +35,9 @@ ephy_tabs_catalog_default_init (EphyTabsCatalogInterface *iface)
*
* Returns the title, URL and favicon URI of every tab of @catalog.
*
- * Return value: (transfer full): a #GSList of #EphyTabInfo
+ * Return value: (transfer full): a #GList of #EphyTabInfo
**/
-GSList *
+GList *
ephy_tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog)
{
EphyTabsCatalogInterface *iface;
diff --git a/lib/sync/ephy-tabs-catalog.h b/lib/sync/ephy-tabs-catalog.h
index 9cc2d61..5754dda 100644
--- a/lib/sync/ephy-tabs-catalog.h
+++ b/lib/sync/ephy-tabs-catalog.h
@@ -31,10 +31,10 @@ G_DECLARE_INTERFACE (EphyTabsCatalog, ephy_tabs_catalog, EPHY, TABS_CATALOG, GOb
struct _EphyTabsCatalogInterface {
GTypeInterface parent_iface;
- GSList * (*get_tabs_info) (EphyTabsCatalog *catalog);
+ GList * (*get_tabs_info) (EphyTabsCatalog *catalog);
};
-GSList *ephy_tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog);
+GList *ephy_tabs_catalog_get_tabs_info (EphyTabsCatalog *catalog);
typedef struct {
char *title;
diff --git a/src/bookmarks/ephy-bookmarks-manager.c b/src/bookmarks/ephy-bookmarks-manager.c
index 7fe9cf4..534670c 100644
--- a/src/bookmarks/ephy-bookmarks-manager.c
+++ b/src/bookmarks/ephy-bookmarks-manager.c
@@ -730,11 +730,11 @@ synchronizable_manager_save (EphySynchronizableManager *manager,
NULL);
}
-static GSList *
+static GList *
ephy_bookmarks_manager_handle_initial_merge (EphyBookmarksManager *self,
- GSList *remote_bookmarks)
+ GList *remote_bookmarks)
{
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
EphyBookmark *bookmark;
GSequence *bookmarks;
GSequenceIter *iter;
@@ -745,7 +745,7 @@ ephy_bookmarks_manager_handle_initial_merge (EphyBookmarksManager *self,
dont_upload = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- for (GSList *l = remote_bookmarks; l && l->data; l = l->next) {
+ for (GList *l = remote_bookmarks; l && l->data; l = l->next) {
const char *id;
const char *url;
char *type;
@@ -809,7 +809,7 @@ next:
!g_sequence_iter_is_end (iter); iter = g_sequence_iter_next (iter)) {
bookmark = g_sequence_get (iter);
if (!g_hash_table_contains (dont_upload, ephy_bookmark_get_id (bookmark)))
- to_upload = g_slist_prepend (to_upload, g_object_ref (bookmark));
+ to_upload = g_list_prepend (to_upload, g_object_ref (bookmark));
}
/* Commit changes to file. */
@@ -821,24 +821,24 @@ next:
return to_upload;
}
-static GSList *
+static GList *
ephy_bookmarks_manager_handle_regular_merge (EphyBookmarksManager *self,
- GSList *updated_bookmarks,
- GSList *deleted_bookmarks)
+ GList *updated_bookmarks,
+ GList *deleted_bookmarks)
{
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
EphyBookmark *bookmark;
double timestamp;
g_assert (EPHY_IS_BOOKMARKS_MANAGER (self));
- for (GSList *l = deleted_bookmarks; l && l->data; l = l->next) {
+ for (GList *l = deleted_bookmarks; l && l->data; l = l->next) {
bookmark = ephy_bookmarks_manager_get_bookmark_by_id (self, ephy_bookmark_get_id (l->data));
if (bookmark)
ephy_bookmarks_manager_remove_bookmark_internal (self, bookmark);
}
- for (GSList *l = updated_bookmarks; l && l->data; l = l->next) {
+ for (GList *l = updated_bookmarks; l && l->data; l = l->next) {
const char *id;
const char *url;
char *type;
@@ -872,7 +872,7 @@ ephy_bookmarks_manager_handle_regular_merge (EphyBookmarksManager *self,
ephy_bookmarks_manager_copy_tags_from_bookmark (self, bookmark, l->data);
timestamp = ephy_synchronizable_get_server_time_modified (l->data);
ephy_synchronizable_set_server_time_modified (EPHY_SYNCHRONIZABLE (bookmark), timestamp);
- to_upload = g_slist_prepend (to_upload, g_object_ref (bookmark));
+ to_upload = g_list_prepend (to_upload, g_object_ref (bookmark));
} else {
/* Different id, different url. Add remote bookmark. */
ephy_bookmarks_manager_add_bookmark_internal (self, l->data, FALSE);
@@ -898,13 +898,13 @@ next:
static void
synchronizable_manager_merge (EphySynchronizableManager *manager,
gboolean is_initial,
- GSList *remotes_deleted,
- GSList *remotes_updated,
+ GList *remotes_deleted,
+ GList *remotes_updated,
EphySynchronizableManagerMergeCallback callback,
gpointer user_data)
{
EphyBookmarksManager *self = EPHY_BOOKMARKS_MANAGER (manager);
- GSList *to_upload = NULL;
+ GList *to_upload = NULL;
if (!ephy_bookmarks_manager_tag_exists (self, "Mobile"))
ephy_bookmarks_manager_create_tag (self, "Mobile");
diff --git a/src/passwords-dialog.c b/src/passwords-dialog.c
index c5b8fbd..cdc6cf7 100644
--- a/src/passwords-dialog.c
+++ b/src/passwords-dialog.c
@@ -42,7 +42,7 @@ struct _EphyPasswordsDialog {
GtkDialog parent_instance;
EphyPasswordManager *manager;
- GSList *records;
+ GList *records;
GtkWidget *passwords_treeview;
GtkTreeSelection *tree_selection;
GtkWidget *liststore;
@@ -117,7 +117,7 @@ ephy_passwords_dialog_dispose (GObject *object)
g_free (dialog->search_text);
dialog->search_text = NULL;
- g_slist_free_full (dialog->records, g_object_unref);
+ g_list_free_full (dialog->records, g_object_unref);
dialog->records = NULL;
G_OBJECT_CLASS (ephy_passwords_dialog_parent_class)->dispose (object);
@@ -179,7 +179,7 @@ forget (GSimpleAction *action,
ephy_password_manager_forget (dialog->manager,
ephy_password_record_get_hostname (record),
ephy_password_record_get_username (record));
- dialog->records = g_slist_remove (dialog->records, record);
+ dialog->records = g_list_remove (dialog->records, record);
g_object_unref (record);
g_value_unset (&val);
@@ -401,17 +401,17 @@ forget_all (GSimpleAction *action,
gtk_list_store_clear (GTK_LIST_STORE (dialog->liststore));
dialog->filled = FALSE;
- g_slist_free_full (dialog->records, g_object_unref);
+ g_list_free_full (dialog->records, g_object_unref);
dialog->records = NULL;
}
static void
-populate_model_cb (GSList *records,
+populate_model_cb (GList *records,
gpointer user_data)
{
EphyPasswordsDialog *dialog = EPHY_PASSWORDS_DIALOG (user_data);
- for (GSList *l = records; l && l->data; l = l->next) {
+ for (GList *l = records; l && l->data; l = l->next) {
EphyPasswordRecord *record = EPHY_PASSWORD_RECORD (l->data);
GtkTreeIter iter;
diff --git a/src/synced-tabs-dialog.c b/src/synced-tabs-dialog.c
index c6a8c13..90d7ea2 100644
--- a/src/synced-tabs-dialog.c
+++ b/src/synced-tabs-dialog.c
@@ -173,7 +173,7 @@ synced_tabs_dialog_populate_from_record (SyncedTabsDialog *dialog,
{
PopulateRowAsyncData *data;
JsonArray *url_history;
- GSList *tabs;
+ GList *tabs;
const char *title;
const char *url;
@@ -194,7 +194,7 @@ synced_tabs_dialog_populate_from_record (SyncedTabsDialog *dialog,
-1);
tabs = ephy_open_tabs_record_get_tabs (record);
- for (GSList *l = tabs; l && l->data; l = l->next) {
+ for (GList *l = tabs; l && l->data; l = l->next) {
title = json_object_get_string_member (l->data, "title");
url_history = json_object_get_array_member (l->data, "urlHistory");
url = json_array_get_string_element (url_history, 0);
@@ -210,7 +210,7 @@ static void
synced_tabs_dialog_populate_model (SyncedTabsDialog *dialog)
{
EphyOpenTabsRecord *record;
- GSList *remotes;
+ GList *remotes;
guint index = 0;
/* Insert local tabs. */
@@ -219,7 +219,7 @@ synced_tabs_dialog_populate_model (SyncedTabsDialog *dialog)
/* Insert remote tabs. */
remotes = ephy_open_tabs_manager_get_remote_tabs (dialog->manager);
- for (GSList *l = remotes; l && l->data; l = l->next)
+ for (GList *l = remotes; l && l->data; l = l->next)
synced_tabs_dialog_populate_from_record (dialog, l->data, FALSE, index++);
g_object_unref (record);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]