diff options
author | Xan Lopez <xan@src.gnome.org> | 2009-02-23 15:22:11 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2009-02-23 15:22:11 +0800 |
commit | 6d91806986ef863f087676d246f76fb50096b260 (patch) | |
tree | ad99b5dd4d722a1b9e4e6b2f3d04bbfc915ab9c8 /lib/widgets/ephy-zoom-control.c | |
parent | 20e78e3ebc2d902d601f0e5a440c107fc140cfdc (diff) | |
download | gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar.gz gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar.bz2 gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar.lz gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar.xz gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.tar.zst gsoc2013-epiphany-6d91806986ef863f087676d246f76fb50096b260.zip |
ephy-zoom-control: use G_DEFINE_TYPE, remove unneeded includes.
svn path=/trunk/; revision=8808
Diffstat (limited to 'lib/widgets/ephy-zoom-control.c')
-rw-r--r-- | lib/widgets/ephy-zoom-control.c | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c index b719ace71..6a18b1eb4 100644 --- a/lib/widgets/ephy-zoom-control.c +++ b/lib/widgets/ephy-zoom-control.c @@ -19,13 +19,10 @@ #include "config.h" +#include <glib/gi18n.h> + #include "ephy-zoom-control.h" -#include "ephy-marshal.h" #include "ephy-zoom.h" -#include "ephy-debug.h" - -#include <gtk/gtk.h> -#include <glib/gi18n.h> #define EPHY_ZOOM_CONTROL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_ZOOM_CONTROL, EphyZoomControlPrivate)) @@ -50,39 +47,11 @@ enum static guint signals[LAST_SIGNAL]; -static GObjectClass *parent_class = NULL; - static void ephy_zoom_control_class_init (EphyZoomControlClass *klass); static void ephy_zoom_control_init (EphyZoomControl *control); static void ephy_zoom_control_finalize (GObject *o); -GType -ephy_zoom_control_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - const GTypeInfo our_info = - { - sizeof (EphyZoomControlClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) ephy_zoom_control_class_init, - NULL, - NULL, /* class_data */ - sizeof (EphyZoomControl), - 0, /* n_preallocs */ - (GInstanceInitFunc) ephy_zoom_control_init, - }; - - type = g_type_register_static (GTK_TYPE_TOOL_ITEM, - "EphyZoomControl", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EphyZoomControl, ephy_zoom_control, GTK_TYPE_TOOL_ITEM) static void combo_changed_cb (GtkComboBox *combo, EphyZoomControl *control) @@ -199,8 +168,6 @@ ephy_zoom_control_class_init (EphyZoomControlClass *klass) GObjectClass *object_class; GtkToolItemClass *tool_item_class; - parent_class = g_type_class_peek_parent (klass); - object_class = (GObjectClass *)klass; tool_item_class = (GtkToolItemClass *)klass; @@ -238,7 +205,7 @@ ephy_zoom_control_finalize (GObject *o) g_object_unref (control->priv->combo); - G_OBJECT_CLASS (parent_class)->finalize (o); + G_OBJECT_CLASS (ephy_zoom_control_parent_class)->finalize (o); } /** |