From d94a2d08d0f46eded4287e5dbd1a936c7a3615d0 Mon Sep 17 00:00:00 2001
From: Xan Lopez <xan@igalia.com>
Date: Wed, 29 Feb 2012 17:58:54 +0100
Subject: Remove the set_url_property history method

It's not really that useful.
---
 lib/history/ephy-history-service.c | 65 --------------------------------------
 lib/history/ephy-history-service.h |  1 -
 2 files changed, 66 deletions(-)

(limited to 'lib/history')

diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 0b3a2e198..6261a4333 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -29,7 +29,6 @@ typedef enum {
   /* WRITE */
   SET_URL_TITLE,
   SET_URL_ZOOM_LEVEL,
-  SET_URL_PROPERTY, /* We only need this SET_ ? */
   ADD_VISIT,
   ADD_VISITS,
   DELETE_URLS,
@@ -635,69 +634,6 @@ ephy_history_service_get_host_for_url (EphyHistoryService *self,
   ephy_history_service_send_message (self, message);
 }
 
-static gboolean
-ephy_history_service_execute_set_url_property (EphyHistoryService *self,
-                                               GVariant *variant,
-                                               gpointer *result)
-{
-  GVariant *value, *mvalue;
-  gchar *url_string;
-  EphyHistoryURL *url;
-  EphyHistoryURLProperty property;
-
-  g_variant_get (variant, "(s(iv))", &url_string, &property, &value);
-
-  url = ephy_history_url_new (url_string, NULL, 0, 0, 0);
-  g_free (url_string);
-
-  if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
-    g_variant_unref (value);
-    ephy_history_url_free (url);
-
-    return FALSE;
-  }
-
-  switch (property) {
-  case EPHY_HISTORY_URL_TITLE:
-    if (url->title)
-      g_free (url->title);
-    mvalue = g_variant_get_maybe (value);
-    if (mvalue) {
-      url->title = g_variant_dup_string (mvalue, NULL);
-      g_variant_unref (mvalue);
-    } else {
-      url->title = NULL;
-    }
-    break;
-  default:
-    g_assert_not_reached();
-  }
-  g_variant_unref (value);
-
-  ephy_history_service_update_url_row (self, url);
-  ephy_history_service_schedule_commit (self);
-
-  return TRUE;
-}
-
-void
-ephy_history_service_set_url_property (EphyHistoryService *self,
-                                       const char *url,
-                                       EphyHistoryURLProperty property,
-                                       GVariant *value,
-                                       EphyHistoryJobCallback callback,
-                                       gpointer user_data)
-{
-  GVariant *variant = g_variant_new ("(s(iv))", url, property, value);
-
-  EphyHistoryServiceMessage *message =
-    ephy_history_service_message_new (self, SET_URL_PROPERTY,
-                                      variant, (GDestroyNotify)g_variant_unref,
-                                      callback, user_data);
-
-  ephy_history_service_send_message (self, message);
-}
-
 static gboolean
 ephy_history_service_execute_delete_urls (EphyHistoryService *self,
                                           GList *urls,
@@ -744,7 +680,6 @@ ephy_history_service_quit (EphyHistoryService *self,
 static EphyHistoryServiceMethod methods[] = {
   (EphyHistoryServiceMethod)ephy_history_service_execute_set_url_title,
   (EphyHistoryServiceMethod)ephy_history_service_execute_set_url_zoom_level,
-  (EphyHistoryServiceMethod)ephy_history_service_execute_set_url_property,
   (EphyHistoryServiceMethod)ephy_history_service_execute_add_visit,
   (EphyHistoryServiceMethod)ephy_history_service_execute_add_visits,
   (EphyHistoryServiceMethod)ephy_history_service_execute_delete_urls,
diff --git a/lib/history/ephy-history-service.h b/lib/history/ephy-history-service.h
index 98b48e275..b01dd076f 100644
--- a/lib/history/ephy-history-service.h
+++ b/lib/history/ephy-history-service.h
@@ -62,7 +62,6 @@ void                     ephy_history_service_query_urls              (EphyHisto
 void                     ephy_history_service_set_url_title           (EphyHistoryService *self, const char *url, const char *title, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_set_url_zoom_level      (EphyHistoryService *self, const char *url, const double zoom_level, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_get_host_for_url        (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
-void                     ephy_history_service_set_url_property        (EphyHistoryService *self, const char *url, EphyHistoryURLProperty property, GVariant *value, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_get_url                 (EphyHistoryService *self, const char *url, EphyHistoryJobCallback callback, gpointer user_data);
 void                     ephy_history_service_delete_urls             (EphyHistoryService *self, GList *urls, EphyHistoryJobCallback callback, gpointer user_data);
 G_END_DECLS
-- 
cgit v1.2.3