[epiphany] ephy-embed-single: remove network status



commit 035fbe726fca2110054ac45965fe699ca8e30eed
Author: Xan Lopez <xan igalia com>
Date:   Wed Mar 14 14:42:14 2012 +0100

    ephy-embed-single: remove network status
    
    We are not using it. Easy enough to bring it back if needed.

 embed/ephy-embed-single.c      |   91 ----------------------------------------
 embed/ephy-embed-single.h      |    5 --
 tests/ephy-embed-single-test.c |   17 -------
 3 files changed, 0 insertions(+), 113 deletions(-)
---
diff --git a/embed/ephy-embed-single.c b/embed/ephy-embed-single.c
index 3062d92..5192156 100644
--- a/embed/ephy-embed-single.c
+++ b/embed/ephy-embed-single.c
@@ -46,56 +46,13 @@
 #define EPHY_EMBED_SINGLE_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_EMBED_SINGLE, EphyEmbedSinglePrivate))
 
 struct _EphyEmbedSinglePrivate {
-  guint online : 1;
-
   GHashTable *form_auth_data;
   SoupCache *cache;
 };
 
-enum {
-  PROP_0,
-  PROP_NETWORK_STATUS
-};
-
 static void ephy_embed_single_init (EphyEmbedSingle *single);
 static void ephy_embed_single_class_init (EphyEmbedSingleClass *klass);
 
-static void
-ephy_embed_single_get_property (GObject *object,
-                                guint prop_id,
-                                GValue *value,
-                                GParamSpec *pspec)
-{
-  EphyEmbedSingle *single = EPHY_EMBED_SINGLE (object);
-
-  switch (prop_id) {
-  case PROP_NETWORK_STATUS:
-    g_value_set_boolean (value, ephy_embed_single_get_network_status (single));
-    break;
-  default:
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-    break;
-  }
-}
-
-static void
-ephy_embed_single_set_property (GObject *object,
-                                guint prop_id,
-                                const GValue *value,
-                                GParamSpec *pspec)
-{
-  EphyEmbedSingle *single = EPHY_EMBED_SINGLE (object);
-
-  switch (prop_id) {
-  case PROP_NETWORK_STATUS:
-    ephy_embed_single_set_network_status (single, g_value_get_boolean (value));
-    break;
-  default:
-    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-    break;
-  }
-}
-
 G_DEFINE_TYPE (EphyEmbedSingle, ephy_embed_single, G_TYPE_OBJECT)
 
 static void
@@ -253,7 +210,6 @@ ephy_embed_single_init (EphyEmbedSingle *single)
   EphyEmbedSinglePrivate *priv;
 
   single->priv = priv = EPHY_EMBED_SINGLE_GET_PRIVATE (single);
-  priv->online = TRUE;
 
   priv->form_auth_data = g_hash_table_new_full (g_str_hash,
                                                 g_str_equal,
@@ -269,8 +225,6 @@ ephy_embed_single_class_init (EphyEmbedSingleClass *klass)
 
   object_class->finalize = ephy_embed_single_finalize;
   object_class->dispose = ephy_embed_single_dispose;
-  object_class->get_property = ephy_embed_single_get_property;
-  object_class->set_property = ephy_embed_single_set_property;
 
   /**
    * EphyEmbedSingle::new-window:
@@ -317,20 +271,6 @@ ephy_embed_single_class_init (EphyEmbedSingleClass *klass)
                 G_TYPE_STRING,
                 G_TYPE_STRING);
 
-  /**
-   * EphyEmbedSingle::network-status:
-   * 
-   * Whether the network is on-line.
-   */
-  g_object_class_install_property
-    (object_class,
-     PROP_NETWORK_STATUS,
-     g_param_spec_boolean ("network-status",
-                           "network-status",
-                           "network-status",
-                           FALSE,
-                           G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
-
   g_type_class_add_private (object_class, sizeof (EphyEmbedSinglePrivate));
 }
 
@@ -455,37 +395,6 @@ ephy_embed_single_clear_auth_cache (EphyEmbedSingle *single)
 }
 
 /**
- * ephy_embed_single_get_nework_status:
- * @single: the #EphyEmbedSingle
- * @offline: %TRUE if the network is on-line
- * 
- * Sets the state of the network connection.
- **/
-void
-ephy_embed_single_set_network_status (EphyEmbedSingle *single,
-                                      gboolean status)
-{
-  if (status != single->priv->online)
-    single->priv->online = status;
-
-  g_object_notify (G_OBJECT (single), "network-status");
-}
-
-/**
- * ephy_embed_single_get_network_status:
- * @single: the #EphyEmbedSingle
- * 
- * Gets the state of the network connection.
- * 
- * Returns: %TRUE iff the network is on-line.
- **/
-gboolean
-ephy_embed_single_get_network_status (EphyEmbedSingle *single)
-{
-  return single->priv->online;
-}
-
-/**
  * ephy_embed_single_open_window:
  * @single: the #EphyEmbedSingle
  * @parent: the requested window's parent #EphyEmbed
diff --git a/embed/ephy-embed-single.h b/embed/ephy-embed-single.h
index bb4ffc6..126dfcb 100644
--- a/embed/ephy-embed-single.h
+++ b/embed/ephy-embed-single.h
@@ -83,11 +83,6 @@ void            ephy_embed_single_clear_cache        (EphyEmbedSingle *single);
 
 void            ephy_embed_single_clear_auth_cache   (EphyEmbedSingle *single);
 
-void            ephy_embed_single_set_network_status (EphyEmbedSingle *single,
-                                                      gboolean         online);
-
-gboolean        ephy_embed_single_get_network_status (EphyEmbedSingle *single);
-
 GSList *        ephy_embed_single_get_form_auth      (EphyEmbedSingle *single,
                                                       const char *uri);
 
diff --git a/tests/ephy-embed-single-test.c b/tests/ephy-embed-single-test.c
index 884efc4..2b4768b 100644
--- a/tests/ephy-embed-single-test.c
+++ b/tests/ephy-embed-single-test.c
@@ -51,21 +51,6 @@ test_embed_single_get_from_shell ()
 }
 
 static void
-test_embed_single_network_status ()
-{
-  EphyEmbedSingle *single;
-
-  single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
-  g_assert (EPHY_IS_EMBED_SINGLE (single));
-
-  /* Defaults to TRUE */
-  g_assert (ephy_embed_single_get_network_status (single));
-
-  ephy_embed_single_set_network_status (single, FALSE);
-  g_assert (ephy_embed_single_get_network_status (single) == FALSE);
-}
-
-static void
 test_embed_single_form_auth ()
 {
   EphyEmbedSingle *single;
@@ -110,8 +95,6 @@ main (int argc, char *argv[])
                    test_embed_single_new);
   g_test_add_func ("/embed/ephy-embed-single/get_from_shell",
                    test_embed_single_get_from_shell);
-  g_test_add_func ("/embed/ephy-embed-single/network_status",
-                   test_embed_single_network_status);
   g_test_add_func ("/embed/ephy-embed-single/form_auth",
                    test_embed_single_form_auth);
 



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