From a9397985aaf2dd1f4279b7b355de0c14f628f814 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Wed, 14 Dec 2011 21:45:43 +0100 Subject: ephy-zoom-control: remove, there are no zoom toolbar items anymore --- lib/widgets/ephy-zoom-action.c | 44 +++--------------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) (limited to 'lib/widgets/ephy-zoom-action.c') diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c index 0d42b9ce9..86d8a06f8 100644 --- a/lib/widgets/ephy-zoom-action.c +++ b/lib/widgets/ephy-zoom-action.c @@ -19,13 +19,12 @@ */ #include "config.h" - -#include - #include "ephy-zoom-action.h" -#include "ephy-zoom-control.h" + #include "ephy-zoom.h" +#include + /** * SECTION:ephy-zoom-action * @short_description: A #GtkAction implementing a zoom control @@ -60,41 +59,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) { @@ -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; /** -- cgit v1.2.3