[epiphany] ephy-zoom-control: remove, there are no zoom toolbar items anymore



commit a9397985aaf2dd1f4279b7b355de0c14f628f814
Author: Xan Lopez <xan igalia com>
Date:   Wed Dec 14 21:45:43 2011 +0100

    ephy-zoom-control: remove, there are no zoom toolbar items anymore

 lib/widgets/Makefile.am         |    4 +-
 lib/widgets/ephy-zoom-action.c  |   44 +------
 lib/widgets/ephy-zoom-control.c |  265 ---------------------------------------
 lib/widgets/ephy-zoom-control.h |   66 ----------
 tests/Makefile.am               |    6 +-
 tests/ephy-zoom-control.c       |   78 ------------
 6 files changed, 5 insertions(+), 458 deletions(-)
---
diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am
index f9a114e..941a954 100644
--- a/lib/widgets/Makefile.am
+++ b/lib/widgets/Makefile.am
@@ -16,9 +16,7 @@ libephywidgets_la_SOURCES = \
 	totem-glow-button.c			\
 	totem-glow-button.h			\
 	ephy-zoom-action.h			\
-	ephy-zoom-action.c			\
-	ephy-zoom-control.c			\
-	ephy-zoom-control.h
+	ephy-zoom-action.c
 
 libephywidgets_la_CPPFLAGS = \
 	-I$(top_builddir)/lib		\
diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c
index 0d42b9c..86d8a06 100644
--- a/lib/widgets/ephy-zoom-action.c
+++ b/lib/widgets/ephy-zoom-action.c
@@ -19,13 +19,12 @@
  */
 
 #include "config.h"
-
-#include <glib/gi18n.h>
-
 #include "ephy-zoom-action.h"
-#include "ephy-zoom-control.h"
+
 #include "ephy-zoom.h"
 
+#include <glib/gi18n.h>
+
 /**
  * SECTION:ephy-zoom-action
  * @short_description: A #GtkAction implementing a zoom control
@@ -61,41 +60,6 @@ static guint signals[LAST_SIGNAL] = { 0 };
 G_DEFINE_TYPE (EphyZoomAction, ephy_zoom_action, GTK_TYPE_ACTION)
 
 static void
-zoom_to_level_cb (EphyZoomControl *control,
-		  float zoom,
-		  EphyZoomAction *action)
-{
-	g_signal_emit (action, signals[ZOOM_TO_LEVEL_SIGNAL], 0, zoom);
-}
-
-static void
-sync_zoom_cb (GtkAction *action, GParamSpec *pspec, GtkWidget *proxy)
-{
-	EphyZoomAction *zoom_action = EPHY_ZOOM_ACTION (action);
-
-	g_object_set (G_OBJECT (proxy), "zoom", zoom_action->priv->zoom, NULL);
-}
-
-static void
-connect_proxy (GtkAction *action, GtkWidget *proxy)
-{
-	if (EPHY_IS_ZOOM_CONTROL (proxy))
-	{
-		/* Ensure the sync is done when the item is added to
-		   the toolbar */
-		sync_zoom_cb (action, NULL, proxy);
-
-		g_signal_connect_object (action, "notify::zoom",
-					 G_CALLBACK (sync_zoom_cb), proxy, 0);
-	
-		g_signal_connect (proxy, "zoom_to_level",
-				  G_CALLBACK (zoom_to_level_cb), action);
-	}
-
-	GTK_ACTION_CLASS (ephy_zoom_action_parent_class)->connect_proxy (action, proxy);
-}
-
-static void
 proxy_menu_activate_cb (GtkMenuItem *menu_item, EphyZoomAction *action)
 {
 	gint index;
@@ -195,8 +159,6 @@ ephy_zoom_action_class_init (EphyZoomActionClass *class)
 	object_class->set_property = ephy_zoom_action_set_property;
 	object_class->get_property = ephy_zoom_action_get_property;
 
-	action_class->toolbar_item_type = EPHY_TYPE_ZOOM_CONTROL;
-	action_class->connect_proxy = connect_proxy;
 	action_class->create_menu_item = create_menu_item;
 
 	/**
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bb538d8..75fcb79 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,8 +2,7 @@ noinst_PROGRAMS = \
 	test-ephy-download \
 	test-ephy-embed-single \
 	test-ephy-location-entry \
-	test-ephy-search-entry \
-	test-ephy-zoom-control
+	test-ephy-search-entry
 
 INCLUDES = \
 	-I$(top_srcdir)/embed    \
@@ -44,6 +43,3 @@ test_ephy_location_entry_SOURCES = \
 
 test_ephy_search_entry_SOURCES = \
 	ephy-search-entry.c
-
-test_ephy_zoom_control_SOURCES = \
-	ephy-zoom-control.c



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