[epiphany/history-rewrite-second] Remove the set_url_property history method



commit a25fc4c60ee4f9af79d9589397f9ca92f6727b6f
Author: Xan Lopez <xan igalia com>
Date:   Wed Feb 29 17:58:54 2012 +0100

    Remove the set_url_property history method
    
    It's not really that useful.

 embed/ephy-browse-history.c        |   10 ++---
 lib/history/ephy-history-service.c |   65 ------------------------------------
 lib/history/ephy-history-service.h |    1 -
 3 files changed, 4 insertions(+), 72 deletions(-)
---
diff --git a/embed/ephy-browse-history.c b/embed/ephy-browse-history.c
index 45d0d1c..08563da 100644
--- a/embed/ephy-browse-history.c
+++ b/embed/ephy-browse-history.c
@@ -142,12 +142,10 @@ ephy_browse_history_set_page_title (EphyBrowseHistory *history,
   g_return_if_fail (EPHY_IS_BROWSE_HISTORY (history));
   g_return_if_fail (url != NULL);
 
-  ephy_history_service_set_url_property (history->priv->history_service,
-                                         url,
-                                         EPHY_HISTORY_URL_TITLE,
-                                         g_variant_new_maybe (G_VARIANT_TYPE_STRING,
-                                                              title ? g_variant_new_string (title) : NULL),
-                                         NULL, NULL);
+  ephy_history_service_set_url_title (history->priv->history_service,
+                                      url,
+                                      title,
+                                      NULL, NULL);
 }
 
 void
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 0b3a2e1..6261a43 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,
@@ -636,69 +635,6 @@ ephy_history_service_get_host_for_url (EphyHistoryService *self,
 }
 
 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,
                                           gpointer *result)
@@ -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 98b48e2..b01dd07 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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]